Good book on programming dsPIC controllers - Page 1
Forum section: electronics / general

author: perdrix
author_rank: Frequent Contributor
timestamp: July 27, 2021, 04:35:17 pm
content: I'm faced with the task of understanding and then modifying some motor control code running on a PIC (to be specific a dsPIC33FJ12MC201).Never programmed one of these before, so need a good book to help me get up to speed.Your recommendations most gratefully received ...ThanksDavid

author: JPortici
author_rank: Super Contributor
timestamp: July 27, 2021, 04:50:02 pm
content: lucio di jasio's books, definetly.Programming 16-Bit PIC Microcontrollers in C: Learning to Fly the PIC 24though it's a bit outdated if you program bare metal you won't have any problem

author: DavidAlfa
author_rank: Super Contributor
timestamp: July 27, 2021, 08:37:49 pm
content: Also: Intelligent Sensor Design Using the Microchip dsPIC , Creed Huddleston

author: perdrix
author_rank: Frequent Contributor
timestamp: July 28, 2021, 08:03:11 am
content: Thank you both ...David

author: rooppoorali
author_rank: Regular Contributor
timestamp: July 18, 2022, 01:12:41 pm
content: This one may help too:https://vdocuments.mx/programming-dspic-in-c.html

author: clairemattockskth67
author_rank: Newbie
timestamp: August 24, 2022, 10:31:02 am
content: Quote from: rooppoorali on July 18, 2022, 01:12:41 pmThanks so!

author: tszaboo
author_rank: Super Contributor
timestamp: August 24, 2022, 11:17:58 am
content: Quote from: perdrix on July 27, 2021, 04:35:17 pmI used dsPIC33 about 12 years ago in a design. I still have PTSD from it.Did they already write the C libraries for all the peripherals?I'm just asking because when I tried to use UART4, the functions were only declared, but the body of the function was empty. And the only way to use the ADC the way I wanted was to figure out each configuration bit by hand.

author: SiliconWizard
author_rank: Super Contributor
timestamp: August 24, 2022, 05:55:35 pm
content: There was a peripheral library I think, but I absolutely never used it on any of the PICs I ever had to work with (from PIC16, 18, dsPIC30, 33.. and PIC32MX.) Wouldn't know how complete the lib was.The great thing with PICs is that they are rather easy to program directly without using any vendor libraries - certainly much easier than with the more complex ARM Cortex that are all around these days (for which it is also possibly BTW, but really on PICs that's much easier.)The OP would have to browse the source code of his project to know what it was using exactly.First thing I recommend the OP to read is the... datasheet.

author: JPortici
author_rank: Super Contributor
timestamp: August 24, 2022, 09:47:12 pm
content: Quote from: tszaboo on August 24, 2022, 11:17:58 amThat's on you for wanting to use manufacturer's peripheral libraries.Configuration is trivial, documentation is good.Itmayhave been that you use one of the earlier dsPIC33FJ, an absolute piece of garbage full of hardware bugs.Nobody uses dsPIC33FJ. Luckily for me the only board i have that uses one is a project from someone else i don't have to mantain.But apart from those (and the old turds dsPIC30F / PIC24K) the architecture and docs and compilers is among the nicest, probably the best of the bunch.dsPIC33E/C and PIC24FJ are the nicest platforms and if you contact support 9 out of 10 times you get people from the 16bit team instead of first level support

author: tszaboo
author_rank: Super Contributor
timestamp: August 25, 2022, 09:22:00 am
content: Quote from: JPortici on August 24, 2022, 09:47:12 pmYeah, silly me for trying to use the support for the parts that are available from everyone else.