Hi to all,
I am trying to make a programmer for PIC18F micro's and I have encountered some problems. For the moment I am using a PIC18F452 provided from a friend, though I will use more advanced ones in the future. I am using an ARM based evaluation board as the programmer, so all the I/O pins are @3.3V levels. Under Vdd = 3.3V the low voltage programming was not responding (using /MCLR,PGD,PGC,PGM), so I've tried to do it with the high-voltage way (using /MCLR-VPP,PGD,PGC and a maximum +12V for the /MCLR-VPP) but again with Vdd and I/O @ 3.3V. I was successful at reading the Device IDs by setting the Table Pointer @ 0x3FFFFE and doing two consecutive "Table Read,Post Increment" (see the 4-bit commands of the ICSP) and I get 0x26 and 0x04 for Device ID byte 1 and 2, which are within the expected values. The weird thing is that I cannot do it for a second time even if I set again the Table Pointer @ 0x3FFFFE. I've read that a reset won't change the value of the Table Pointer nor of the Table Latch register, but I don't understand why I cannot set the Table Pointer for a second time since I do that by executing core instructions through the ICSP 4-bit commands. Note that I have to disconnect both the PIC and the evaluation board from power to be again able to read the Device IDs. Any ideas what could be wrong?
Apart from that, is it possible to write the flash in a per byte fashion rather than doing all the block write things that might differ from older to newer devices and from smaller to bigger flash memories and thus saving some programming time?
Thanks
PS: I have posted this to the Microchip forum but I haven't got an answer.
It is the following
http://www.microchip.com/forums/tm.aspx?tree=true&m=622790
you can click on the yellow "error" image and the image of the schematic will pop-up, plus there is some of the code.
I am trying to make a programmer for PIC18F micro's and I have encountered some problems. For the moment I am using a PIC18F452 provided from a friend, though I will use more advanced ones in the future. I am using an ARM based evaluation board as the programmer, so all the I/O pins are @3.3V levels. Under Vdd = 3.3V the low voltage programming was not responding (using /MCLR,PGD,PGC,PGM), so I've tried to do it with the high-voltage way (using /MCLR-VPP,PGD,PGC and a maximum +12V for the /MCLR-VPP) but again with Vdd and I/O @ 3.3V. I was successful at reading the Device IDs by setting the Table Pointer @ 0x3FFFFE and doing two consecutive "Table Read,Post Increment" (see the 4-bit commands of the ICSP) and I get 0x26 and 0x04 for Device ID byte 1 and 2, which are within the expected values. The weird thing is that I cannot do it for a second time even if I set again the Table Pointer @ 0x3FFFFE. I've read that a reset won't change the value of the Table Pointer nor of the Table Latch register, but I don't understand why I cannot set the Table Pointer for a second time since I do that by executing core instructions through the ICSP 4-bit commands. Note that I have to disconnect both the PIC and the evaluation board from power to be again able to read the Device IDs. Any ideas what could be wrong?
Apart from that, is it possible to write the flash in a per byte fashion rather than doing all the block write things that might differ from older to newer devices and from smaller to bigger flash memories and thus saving some programming time?
Thanks
PS: I have posted this to the Microchip forum but I haven't got an answer.
It is the following
http://www.microchip.com/forums/tm.aspx?tree=true&m=622790
you can click on the yellow "error" image and the image of the schematic will pop-up, plus there is some of the code.