I've built an OpenProg with a 3.3V adapter and tried to program PIC18F46K22. PIC is mounted on another PCB so I use ICSP connector. I've tried several times but always have 1 error during programming Flash and 1 error programming EEPROM. Programmed PIC doesn't work correctly - looks like executing prograam but with random glitches and bugs. If I flash my PIC with PicKit4 there's no problem, programming goes smoothly and apllication runs without bugs.
What should I do?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It took a while, but I finally found the problem; it's just a verification bug, there are no real errors in the log.
EEPROM verification is done in the same write packet, and the current code is incorrectly parsing the result, because it gets fooled when the value written is equal to the instruction to be found.
In line 18867 you see instruction 22 (SHIFT_TABLAT) being equal to the payload 22.
Code @ progP18.c:1300 looks for the istruction code in reverse and instead finds the payload.
I'll write a fix but for now you can ignore this error.
As for the original problem, it's most likely due to a wrong configuration word.
Try to read the device after programming it with the pickit: is there a difference in config words?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello!
I've built an OpenProg with a 3.3V adapter and tried to program PIC18F46K22. PIC is mounted on another PCB so I use ICSP connector. I've tried several times but always have 1 error during programming Flash and 1 error programming EEPROM. Programmed PIC doesn't work correctly - looks like executing prograam but with random glitches and bugs. If I flash my PIC with PicKit4 there's no problem, programming goes smoothly and apllication runs without bugs.
What should I do?
You need to be more precise.
Save a log and the errors you see.
I've lso tried to run
op
with-l
option but don't know where logs are saved. Specifing location after-l
doesn't work, log file is not saved.The location is where OP is started from. Otherwise you specify a file with -l=filename
Log file in the attachment.
It took a while, but I finally found the problem; it's just a verification bug, there are no real errors in the log.
EEPROM verification is done in the same write packet, and the current code is incorrectly parsing the result, because it gets fooled when the value written is equal to the instruction to be found.
In line 18867 you see instruction 22 (SHIFT_TABLAT) being equal to the payload 22.
Code @ progP18.c:1300 looks for the istruction code in reverse and instead finds the payload.
I'll write a fix but for now you can ignore this error.
As for the original problem, it's most likely due to a wrong configuration word.
Try to read the device after programming it with the pickit: is there a difference in config words?