dsPIC - starting with these in 2024, opinions? - Page 1
Forum section: electronics / general

author: Buriedcode
author_rank: Super Contributor
timestamp: August 30, 2024, 11:44:48 pm
content: Hi,Over the years I've mostly used microchip parts (PIC16/18 for smaller apps) and AVRs - sometimes XMEGAs for the nicer peripherals, but for the most part the peripheral set is pretty good. For heavier applications I switched to the PIC24 (the later ones are surprisingly good), STM32 and even the ESP32.But going through the (long) list of projects I've got on a to-do list there's quite a lot that don't need much in the way of raw MIPS or maths (but fixed point hardware multiply/divide is always nice for test gear), but do require a fair bit of fast(ish) analogue - we're talking comparators with response times of <80ns, opamps with GBW of >5MHz, high speed ADCs, and DACs - which are nice for setting offsets and controlling external analogue stuff. I would look at TI offerings, but I'm already familiar with MPLABX and have the programming hardware.I kind of skipped over the dsPIC series purely because I never really had an application they were suited for, plus, when they first came out I read a fair bit of errata that put me off. But that was like 15 years ago, its 2024, and I wanted to know about the state of their analogue peripherals. I'm not expecting things like uV offsets or anything, but "good enough" to replace external devices.By that I mean, I kind of assume that the opamps and comparators on-board MCU's tend to have specs that are "meh". Not bad, but you won't see low input offset, or in the case of comparators, they can have wild response times (an exception seem to be the PIC16F1704, measured those comparators at 45ns both rising and falling). Not complaining, they're for the convenience of reducing chip count not for anything precise. I tend to think of PIC analogue peripherals being slightly better than AVRs, but thats based onolddevices, and I don't need to go full-on DSP but mostly test/measurement gear, perhaps a wee cheeky MCU controlled SMPS or two.So if anyone has experience with dsPICs peripherals, mostly the analogue, but also the capture and PWM modules - I'd appreciate some pointers/input/reviews. Kind of directing this toJPortici, but an open thread is nicer than a PM.Cheers

author: JPortici
author_rank: Super Contributor
timestamp: September 01, 2024, 02:24:15 pm
content: Love themjust skip the whole MCC bullshit, program bare metal.I suggest you always use the latest tools (which would be XC16 v2.10, or XC-DSC 3.10, though 3.20 should be out "soon" with some nice fixes, hopefully its being delayed because they are going to add clangd-server so we can use VSCode and whatever other new IDE is coming out this fall - sadly I won't be at EU Masters to check that out in person)I suggest you use dsPIC33CK, there is no real reason to use other families if you need all the analog interconnects, and other goodies unless- you NEED a ton of timers and PWMs, or need USB so it's only dsPIC33EP MU series for you (16 dedicated IC, 16 dedicated OC, 9 16bit Timers, up to 14PWMs - actually 7 but you can double each module if you sacrifice phase offset).... but Security is almost non existant, the same as PIC16 read protect. Aux segment for secure bootloader is borked, and was never fixed.- you NEED 5V I/O, so it's only dsPIC33EV series for you (but the IO system is old, and you can't put the IO in TTL input mode.. which is a pain if you want to interface with 3V3 peripherals)- you WANT the dual core, so it's dsPIC33CH, but developing for multicore systems is always a pain, i don't find microchip's way to be more painful than others... still a pain.then there would be the dsPIC33A, all of the above plus 32bit core and double precision FPU, but i couldn't find the devboards outside of microchip direct, no samples for the foreseeable future (and i hoped the launch family to be more feature packed..)If you're familliar with PIC16/18 then the workflow's almost the same, though you get to work with GCC, so mixing assembly modules with C code is actually possible without dirty hacks.

author: Buriedcode
author_rank: Super Contributor
timestamp: September 01, 2024, 10:56:45 pm
content: Ahh cheers JPortici - pretty much exactly the info I was looking for - you know how daunting it is when you see a new MCU family, and... oh theres hundreds.I can't say I'll need USB, many many timers - nice to know there are ones with >10 PWM available though - or 5V IO. So I'll check out the CK seriesAfter I posted, I noticed that there is the PIC16F1788/9 that also has fastish comparators, opamps and a DAC, which will probably do for some projects: things like LCR meter, AWG, small, small custom hand-held test gear that I could buy, but like to build so I can customise. But, this is a great excuse to try some dsPICs in those applications and see just where in projects they best fit in. Also the specs of the analogue modules in the CK seem to be very high speed (20MHz GBW?) so I could try and have some fun making small power supplies too.Cheers!

author: jm_sanz
author_rank: Contributor
timestamp: September 09, 2024, 12:46:08 pm
content: Hello!,dsPIC33A looks quite nice. It seems like the published dsPIC33AK128MC106 family is the first family of its generation. In the document"dsPIC33CK to dsPIC33AK Migration and Performance Enhancement Guide"they stand out their new 78 ps PWM resolution but I assume this family will not be ready in some time.However, this upcomming functionality along with 2x72-bit accumulators, 5 nS Analog Comparators, 100 MHz Operational Amplifiers and 40 Msps conversion rateis something I have not seen yet on the market and for sure can help.Let's see if this comes with documentation and minimun silicon erratas. I do power electronics and I am kind of afraid of these devices lacking all kind of design examples. Other manufacturers like TI, Infineon or ST have have tons of these. I guess through time this will change but not in the short term.TI (TMS320F) has been my must have in the recent years but lets see if this device can change my mind.