Hey,
I've implemented a serial programmer for the PIC17F628A via a xilinx CPLD and additional hardware. I am able to move about to various location in program memeory and configuration memory and my write/verify routines work fine. I can also read the device ID and rev # at address 0x2006 in the configuration memory.
The problem is that once I set the fuses Low voltage enabled, HS, MCLR enabled, Power up timer enabled, brown out detection disabled e.t.c, I am no longer able to access the device. It almost seems like I have put the device in some weird state. If I don't touch the configuration bit (I have a few of these pics to try thing sout on), then the program memory is flashed fine. And I am able to write and read to/from the device. The only issue is that the default value for the config word is all 1's, therefore the RC oscillator selection is chosen and I do not get any clock output on RA6 (code won't work). Even when I program the configuration word with the HS setting, I do not see any clock output on RA6. I am having problems using ICD 2 to program the device. Flacky behaviour (it was always working then all of a sudden stopped. Can't read the device ID.... expected 0x83 read 0x0).
I am really confused. I have a PIC that I flashed fine (with the same hex file) with ICD2 and I see the clock on RA6 via the scope. Problem is that LVP was disabled in this hex file and I can't read back all locations to see if there is something I am missing (and now ICD2 doesn't work anymore!!!!)
I notice that after programming the condfiguration word the output on Ra6 goes to about 3V from 1V (VDD is at 5). I am starting to think that the device is not comming out of reset? The device seems to be unresponsive after setting the Power Up Timer fuse??????
Any ideas............. Any help wold be greatly appreciated. Sorry for the lenghty post.