Since some of you may already read some of my posts here where I wrote that I preferred AVRs/ARMs may wonder why now I want to know something about PICs.
Though one may like them or hate them, they offer many advantages at [very] low prices (CANbus and Ethernet, RTCC, many I2C & SPI & UART ports).
Finally they seem to be among some of the most widely MCUs used in the industry (beside for instance the 8051 which although old is still widely used), so learning them might be positive for a job.
Therefore I wanted to ask: what MCU architecture would you choose among the many available? PIC16/PIC18/PIC24F/PIC24H/dsPIC30/dsPIC33/PIC32?
I ask that because it seems to me that their architectures is very different one from the other. Therefore assembly instructions will differ significantly. I don't really if in C these differences are less important.
I know you can't really give me a "general" answer since each MCU is best suited for one specific application, but I hope you can give me tips to maybe avoid using some deprecated MCUs and choose newer ones for ~ the same price.
This is AFAIK where they'd be better suited for:
- PIC12/PIC16/PIC18: basic circuits (LED controls, switchs, basic ADC, DAC, SPI&I2C&UART), 8 bits [basically what you do with any AVR] (very cheap)
- PIC24F/PIC24H: more complex circuits, ethernet MAC, 16 bits
- dsPIC30/dsPIC33: operations involving digital signal processing (I don't plan doing those at the moment)
- PIC32: most complex circuits, CAN/CANbus, ethernet MAC, 32 bits (relatively expensive)
Since I already have some projects in mind I'll illustrate what I'd chose for some small applications, so that you may prove me I'm wrong :)
- Energy meter: PIC32, since with SPI/I2C it will communicate to a power meter IC, while CAN/CANbus will pass the measured informations to a host (basically a distributed energy meter system with on meter on each [significant] plug)
- DC/DC converter, battery charger, ...: PIC12/PIC16/PIC18/PIC24F/PIC24H, basically to do a PWM and negative feedback with ADC
I'll accept any statement on which MCUs to prefer/avoid for one particular application. I know some of you may want to use AVRs/ARMs/MSP430 and each MCU has its own application field. And, BTW, I'm not saying I only on using PICs. Just that for starters it may be better to use not all architectures at once.
For instance in my opinion:
- I'd take a MSP430 for low-power applications or for integrated >= 16 bits ADC
- I'd take an AVR for very fast instruction set (most are 1 cycle instructions)
- I'd take an ARM for more advanced features and speed/memory
However since PICs are usually the cheapest and with most periferals, I think it's best to know the characteristics of each PIC family. I don't know if nowadays PIC12/PIC16 are deprecated, expecially since I heard some bad things about their "complicated instruction set", but AFAIK nowadays that's a bit better.