Can somebody confirm that this programmer actually works with the dsPIC33EP512MC502 ?
The author just assumes function because one device from the family was tested.
It is wrong to just ASSUME these things.
The pickit3 also supports the dsPIC33 family but not the 512k FlashRAM versions.
However if somebody could confirm that it supports other PICs with 512k FlashRAM, I would take the risk to build this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The 33FJ128GP802 which I am also using for my project programs fine on my PICkit3 too.
I just saw you have 24EP512GP202 written in bold in supported devices and it turns out that the dsPIC33EP512MC502 is confusingly in the same data sheet. I would have thought with it's DSP and ECAN ability it would deserve it's own data sheet but now I am somewhat hopeful that your solution might work.
Coincidentally the project I am building that uses six of these tricky dsPIC33EP512MC502 also uses a 18LF25K50 for the USB com, which I could first 'lend' to make a vastly simplified version of your programmer on a Veroboard running directly on 3.3V, perfect for the dsPIC33 and don't have to wait 2-3 weeks until I get that chip.
Will report back if it works or not.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can select the dsPIC33EP512MC502
I skip the 3.3V check. I am only using the ICSP port which does not carry the 3.3V from regulator I am using.
Write starts OK but then this:
all configs 0xFF
device ID 0x0000
unknown device
Erasing ... completed
writing code ... completed
Error verifying :
mostly reads FCFC00 instead of the data that should be written
exceed maximum number of errors (200)
Takes several minutes then write interrupted
Read shows most cells containing FF00FC00
and takes 229s.
I measure only around 5V for Vpp and on pin 13 for the generation of Vpp 0V, no pulses on my oscilloscope.
If I run the hardware test there is 13.65V on Vpp
Other hardware tests pass too.
Why does your programmer disable Vpp here ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The device is clearly not entering program mode, otherwise you would see the chip ID.
When using ICSP you have to be careful about loads attached to VDD; ideally your board would isolate the target VDD when programming (this is recommended by Microchip as well).
I'm not sure why you don't have the 3.3V regulator, the target is supposed to handle 3.3V max voltage.
VPP is set at 5V and current limited by a 10k resistor (on the expansion board) so you should replicate this arrangement.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The target IS using 3.3V which I mentioned above but maybe not clear enough.
The dsPIC33 is just on a naked board with the 3.3V regulator, usual caps including the 10µF Vcap in ceramic and the MCLR resistor to Vdd which Vpp is connected to. There are no shorts.
If it is not entering programming mode, why is it still writing, albeit gibberish?
Edit: I just re-read that you said "Vpp is set to 5V" and that is what I am measuring, well actually 4.8V. So this must be LVP yet it doesn't work.
I removed the MCLR pull-up resistor(was 100k) and Vpp is in series with 10k but there is no voltage drop.
Still the same behaviour as above except I get a device ID 0xF800
Sometimes the application crashes, just randomly closes while it is writing.
. What am I missing here?
Last edit: catweasle 2025-05-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Device ID should be 1781; I don't think you wrote anything, it is just random disturbances on undriven IO lines.
Can you draw the exact schematic you're using?
There is no HV ICSP for this device.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It does show the data when I read from it and it is mostly FCFC00 as mentioned above so it is not that random.
The programmer is built like your schematic with the 18F2550 and 12Mhz quartz but omitting the connections for the daughter boards. The layout of the ICSP port has been corrected to be compatible with the PICkit3.
The programmer works fine with the PICkit3 daughter board (with the textool socket) and programmed a PIC16F630 flawlessly in HPV.
100Ω resisters are used for clk and data.
The schematic of my disPIC33 daughter board, taken from the data sheet, is shown below .
The pins of the ICSP connector from left to right are:
Vppu, Vddu, GND, PGD (from RB5), PGC (from RB6)
There seems to be an error on your schematic related to the PIC 24-30-33 daughter board which I forgot to to point out earlier.
The ICSP port which you label ICSP-LV has the Vdd_L from the 3.3V regulator on pin 2.
If that were to be plugged like that on your mainboard it would be shorted to VddU which is 5V when active.
Then you have a port labeled ICSP-IN on the mainboard. It's function is unclear to me and I initially thought that might be to program the 18F2550 on board but now I am not sure as it's header is labeled CONN4 and you have a CONN43 on the daughter board.
If you where to connect it like that to the mainboard you would have Vdd directly from the USB 5V shorted to Vdd_L and most likely certain death of the PIC.
Last edit: catweasle 2025-05-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm not sure why you want to connect CONN43 to CONN5 or CONN4.
Its function is to provide ICSP signals to a target requiring 3.3V signals.
CONN5 does the same for 5V targets.
CONN4, as you write, can be used to update the on-board firmware by connecting to another programmer; during this procedure you're supposed to unplug from USB.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Because that is where I get the signals from and didn't realise it was an isolated connector.
I thought conn43 is connected to conn5 ICSP which I indicated on my diagram.
I got confused because you have D and CK labeled on conn43 and the 33x socket but I didn't see the D and CK on the left where the diodes are, which I thought were for other chips when I saw the D_5V and CL_5V labels.
Your schematics have no wire connections drawn and I missed that. I am 70 y/o and my eyesight sucks.
In any case I have additionally to the resistors clamped D and CK to 3.3V but nothing changes. Now the application keeps crashing a lot.
Last edit: catweasle 2025-05-13
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
...oops, I missed your other post further above about AVDD and AVSS and added those.
The ICSP port pinout has been changed so I can use my PICkit3 40pin Textool adaptor board with it and that works fine.
I managed to fire up an even older Windows laptop (the one I was using is already 10 years old and one of it's USB ports didn't detect your programmer but the others did) and now the application doesn't crash mid programming and finally it worked.
Device ID 0x1785 and code verified an all 6 dsPIC33EP512MC502
although I did have to restart the app a few times until the correct device ID showed up.
Thanks for your help
:D
Last edit: catweasle 2025-05-13
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Application crash is very strange; I don't remember it ever doing so.
I tried Win10 and Win11 on multiple hardware.
Do you see anny error message when started from command line?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Never used the command line version.
I tried starting the GUI version from a cmd window.
First I programmed a spare 18F2550 which went well.
Then I simply loaded the 512k hex file for the disPIC33 and the app shut down.
No message in the DOS window.
Maybe a buffer/memory issue while handling these large hex files
but I can not replicate that on the other laptop where I finally had the success.
Both are very old Dell, the app crashes on an Inspiron and works on my Latitude.
I mentioned above that one USB port refused to accept the board (device manger complained) but the others seem to work. That was the Inspiron. Therefore could be hardware related although the PICkit works fine on all the ports.
Last edit: catweasle 2025-05-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Can you give me some information about the programming of DsPIC33f???
Can I do with this programmer?
Thanks!
To program PIC33 you have to build an adapter board.
You can see the list of supported devices on the website.
Can somebody confirm that this programmer actually works with the dsPIC33EP512MC502 ?
The author just assumes function because one device from the family was tested.
It is wrong to just ASSUME these things.
The pickit3 also supports the dsPIC33 family but not the 512k FlashRAM versions.
However if somebody could confirm that it supports other PICs with 512k FlashRAM, I would take the risk to build this.
The largest dsPIC33 I verified was a 33FJ128GP802, 44KW or 128 KB.
I don't have anything bigger currently.
The 33FJ128GP802 which I am also using for my project programs fine on my PICkit3 too.
I just saw you have 24EP512GP202 written in bold in supported devices and it turns out that the dsPIC33EP512MC502 is confusingly in the same data sheet. I would have thought with it's DSP and ECAN ability it would deserve it's own data sheet but now I am somewhat hopeful that your solution might work.
Coincidentally the project I am building that uses six of these tricky dsPIC33EP512MC502 also uses a 18LF25K50 for the USB com, which I could first 'lend' to make a vastly simplified version of your programmer on a Veroboard running directly on 3.3V, perfect for the dsPIC33 and don't have to wait 2-3 weeks until I get that chip.
Will report back if it works or not.
You are right, they call the same write function with the same parameters.
Not working :(
I can select the dsPIC33EP512MC502
I skip the 3.3V check. I am only using the ICSP port which does not carry the 3.3V from regulator I am using.
Write starts OK but then this:
all configs 0xFF
device ID 0x0000
unknown device
Erasing ... completed
writing code ... completed
Error verifying :
mostly reads FCFC00 instead of the data that should be written
exceed maximum number of errors (200)
Takes several minutes then write interrupted
Read shows most cells containing FF00FC00
and takes 229s.
I measure only around 5V for Vpp and on pin 13 for the generation of Vpp 0V, no pulses on my oscilloscope.
If I run the hardware test there is 13.65V on Vpp
Other hardware tests pass too.
Why does your programmer disable Vpp here ?
The device is clearly not entering program mode, otherwise you would see the chip ID.
When using ICSP you have to be careful about loads attached to VDD; ideally your board would isolate the target VDD when programming (this is recommended by Microchip as well).
I'm not sure why you don't have the 3.3V regulator, the target is supposed to handle 3.3V max voltage.
VPP is set at 5V and current limited by a 10k resistor (on the expansion board) so you should replicate this arrangement.
The target IS using 3.3V which I mentioned above but maybe not clear enough.
The dsPIC33 is just on a naked board with the 3.3V regulator, usual caps including the 10µF Vcap in ceramic and the MCLR resistor to Vdd which Vpp is connected to. There are no shorts.
If it is not entering programming mode, why is it still writing, albeit gibberish?
Edit: I just re-read that you said "Vpp is set to 5V" and that is what I am measuring, well actually 4.8V. So this must be LVP yet it doesn't work.
I removed the MCLR pull-up resistor(was 100k) and Vpp is in series with 10k but there is no voltage drop.
Still the same behaviour as above except I get a device ID 0xF800
Sometimes the application crashes, just randomly closes while it is writing.
. What am I missing here?
Last edit: catweasle 2025-05-11
Device ID should be 1781; I don't think you wrote anything, it is just random disturbances on undriven IO lines.
Can you draw the exact schematic you're using?
There is no HV ICSP for this device.
It does show the data when I read from it and it is mostly FCFC00 as mentioned above so it is not that random.
The programmer is built like your schematic with the 18F2550 and 12Mhz quartz but omitting the connections for the daughter boards. The layout of the ICSP port has been corrected to be compatible with the PICkit3.
The programmer works fine with the PICkit3 daughter board (with the textool socket) and programmed a PIC16F630 flawlessly in HPV.
100Ω resisters are used for clk and data.
The schematic of my disPIC33 daughter board, taken from the data sheet, is shown below .
The pins of the ICSP connector from left to right are:
Vppu, Vddu, GND, PGD (from RB5), PGC (from RB6)
Last edit: catweasle 2025-05-12
You should connect AVDD and AVSS as well.
In you drawing, the ICSP connector follows a different pinout; make sure to route the correct signals.
There seems to be an error on your schematic related to the PIC 24-30-33 daughter board which I forgot to to point out earlier.
The ICSP port which you label ICSP-LV has the Vdd_L from the 3.3V regulator on pin 2.
If that were to be plugged like that on your mainboard it would be shorted to VddU which is 5V when active.
Then you have a port labeled ICSP-IN on the mainboard. It's function is unclear to me and I initially thought that might be to program the 18F2550 on board but now I am not sure as it's header is labeled CONN4 and you have a CONN43 on the daughter board.
If you where to connect it like that to the mainboard you would have Vdd directly from the USB 5V shorted to Vdd_L and most likely certain death of the PIC.
Last edit: catweasle 2025-05-12
I'm not sure why you want to connect CONN43 to CONN5 or CONN4.
Its function is to provide ICSP signals to a target requiring 3.3V signals.
CONN5 does the same for 5V targets.
CONN4, as you write, can be used to update the on-board firmware by connecting to another programmer; during this procedure you're supposed to unplug from USB.
Because that is where I get the signals from and didn't realise it was an isolated connector.
I thought conn43 is connected to conn5 ICSP which I indicated on my diagram.
I got confused because you have D and CK labeled on conn43 and the 33x socket but I didn't see the D and CK on the left where the diodes are, which I thought were for other chips when I saw the D_5V and CL_5V labels.
Your schematics have no wire connections drawn and I missed that. I am 70 y/o and my eyesight sucks.
In any case I have additionally to the resistors clamped D and CK to 3.3V but nothing changes. Now the application keeps crashing a lot.
Last edit: catweasle 2025-05-13
...oops, I missed your other post further above about AVDD and AVSS and added those.
The ICSP port pinout has been changed so I can use my PICkit3 40pin Textool adaptor board with it and that works fine.
I managed to fire up an even older Windows laptop (the one I was using is already 10 years old and one of it's USB ports didn't detect your programmer but the others did) and now the application doesn't crash mid programming and finally it worked.
Device ID 0x1785 and code verified an all 6 dsPIC33EP512MC502
although I did have to restart the app a few times until the correct device ID showed up.
Thanks for your help
:D
Last edit: catweasle 2025-05-13
Application crash is very strange; I don't remember it ever doing so.
I tried Win10 and Win11 on multiple hardware.
Do you see anny error message when started from command line?
Never used the command line version.
I tried starting the GUI version from a cmd window.
First I programmed a spare 18F2550 which went well.
Then I simply loaded the 512k hex file for the disPIC33 and the app shut down.
No message in the DOS window.
Maybe a buffer/memory issue while handling these large hex files
but I can not replicate that on the other laptop where I finally had the success.
Both are very old Dell, the app crashes on an Inspiron and works on my Latitude.
I mentioned above that one USB port refused to accept the board (device manger complained) but the others seem to work. That was the Inspiron. Therefore could be hardware related although the PICkit works fine on all the ports.
Last edit: catweasle 2025-05-14