Closed eballetbo closed 7 years ago
Hi, still not tried with PIC24FJ family, I have a custom board sitting on my desk since March but still not worked on it.
I'll try to look into this on friday, in the mean time: 1) I expect the programming specs to be quite similar. One thing to check is the timings 2) Have you set up a working picberry instance with another PIC? For example a PIC18F24J50?
Hi,
[1] http://ww1.microchip.com/downloads/en/DeviceDoc/39768d.pdf [2] pic24fj-timings.txt
Right, some additional clock cycles are required on first SIX instruction after reset. Unfortunately, I still had no time to check this issue, I hope to find some during this week
No problem, I had some few time to look a bit more, I'll try to first read the ID and the configuration words, for some reason still doesn't work (something silly I'm missing that I can't see now) but if you have a pic24fj and want to test I execute the code like this.
picberry -d -g 66,67,60 -f pic24fj_ga0
[1] https://github.com/eballetbo/picberry [2] https://github.com/eballetbo/picberry/commit/80a224f63a6a3559a0fdae467348378c3fd46889
Needs more testing but I have a preliminary working version. I am able to erase and program the firmware.
# picberry -e -g 66,67,60 -f pic24fjxxxga0xx
picberry PIC Programmer v0.1
Device Name: PIC24FJ64GA002
Device ID: 0x00000447
Revision: 0x00003046
Bulk Erase...DONE!
Press ENTER to exit program mode...
# picberry -w fw.hex -g 66,67,60 -f pic24fjxxxga0xx
picberry PIC Programmer v0.1
Device Name: PIC24FJ64GA002
Device ID: 0x00000447
Revision: 0x00003046
Writing chip...[[[5DONE!
Press ENTER to exit program mode...
The code is available here: https://github.com/eballetbo/picberry/tree/topic/pic24fjxxxga0xx
Well done! When you will be confident for this to work, feel free to create a pull request. Thanks!
Nice work! I was finding a tool like this to program a PIC24FJ64GA002 and by chance I found your project. I saw that in theory PIC24FJ should work but I've problems trying to read the device id of a PIC24FJ64GA002 device.
I think your code is based on [2] but the programming specs for my chip is slightly different [1]. At the moment I tried to modify the code to adapt to [1] without luck. Any clue is welcome. Which device did you test?
[1] http://ww1.microchip.com/downloads/en/DeviceDoc/39768d.pdf [2] http://ww1.microchip.com/downloads/en/DeviceDoc/30010057d.pdf