• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Which PIC to use :O)

Not open for further replies.


New Member
Hi all,

I am new to the forum... (I can sense the groaning and cringing from here.)

I have read the 'Newcomers, please read! (PIC regarded) Upd. 0xD' sticky, which answered some but not all of my questions.

Some years back I briefly played around with PIC 16F84A's, which is the extent of my knowledge.

I am (re)learning all the basics in order to eventually build myself some single channel low voltage (12v) halogen, hardware based PWM dimming modules.

If I can get my head around everything I would like to include CAN-bus network control of the device / module.

Would someone please suggest which PIC would be best suited for the job.


Used to control a single 12v Halogen dichroic light (found in the ceiling of most modern houses) I believe most are either 20W or 50W's these days.

I'd prefer to use on board hardware-based PWM

CAN-bus connectivity (on board or interfaced via USART. On board preferred for ease of use.) Each module/light uniquely addressable within the network, etc.

The control of said lights/modules would come from a PC and/or a wall plate (also PIC based.)

I have read various different spec sheets for PIC's however I don't want to buy a Ferrari when a middle of the range processor will do the job just as well. If I like what I create I will build 40 or 50 of these to occupy the ceiling space of my house.

Cost is not a major factor, flexibility and future expansion is.

Any and all help is greatly appreciated.



Well-Known Member
I'd recommend the 18F series and give Microchips MAP selector a try. UART, PWM and CAN can be selected and it'll even let you see side by side features.


Coop Build Coordinator
Forum Supporter
I have not done CAN.

In general I like the 18F family. Free C compiler and I am told it is easier to program in assembly. There are versions with CAN bus support and I recall Microchip has a ECAN stack you can download. The PIC18F2585 is a 28 pin chip with CAN support.

Chips are maybe $3 to $6. You did not fill in your location on the CP. If you are in the US Newark has the best prices on PICS.


Well-Known Member

I used the 18F4585 and tested all possible ways of CAN. They all worked in the first try.

Just follow exactly what the manual says to configurate every register and it will work.

Against all reccomendations I did set up a network with three nodes of mine instead of hooking one to a working network. It also worked with little difficulty.

Just one caveat: the manual describes wrongly the way to access the CAN-related registers through the "window" specific for that.

I had no time for posting about but could it in the future. Traveling as much as I do, leaves little time for all this.

Buena suerte.

PD: do not forget to include the transceivers, otherwise it will be not complete. And start your tests in "loopback" mode.

I work in Assembler. I have the feeling that it helps to understand the whole thing, but that is me.
Last edited:


Well-Known Member
In my case

To the original poster:

If you have the will to check the instruction sets for the 16F and 18F family you will easily realize that several bad things (for the 16F) were solved. I doubt I would use any of them again. In fact I ported already ALL my macros and canned routines to the 18F.

I started with the 16C57, then the 16F84A so I can say that things were really improving. Digression is over.

I am glad it went well. I plan to give it a try using C this summer.
Yes, I am glad too!!. I decided to be strict in my progress and forget anxiety. It worked.

I still resist the idea of learning C because I feel quite well knowing what is actually going with the innards of the chip. (Please do not take this as an attempt to start another stupid war. I never participate!!!).

Right now, in the same disciplined way I started to test the Power control PWM section of the 18F4431 with good success. Step by step I am saving time at the end.

I expect some two weeks testing a pair of ideas I have and then I will see what could I do with the board that collected so many answers from another post of mine.

Be well.
Last edited:
Not open for further replies.

Latest threads

EE World Online Articles