[quote author="robots"]Looks much better :-) Should i wait till the fuse writing is working?
[/quote] Probably Yes, it will only be 1-2 more days, and currently the code adds no functionality beyond my previous patch, that already added code read/write ability for the 18F2553.
[quote author="robots"]http://ww1.microchip.com/downloads/en/DeviceDoc/39622L.pdf
Programming specification states that you should set all the TBLPRTx registers.
[/quote]
The link to the document is naturally the same one I'm looking at.
I don't think the document says I need to set all 3 TBLPRTx registers between writes.
I think the note on section 3.6 regarding setting the full address only relates to not using the 0xD command (write 2 bytes and post-increment).
I set all 3 TBLPRTx registers at the beginning, then for the next configuration writes, set only the new low address. I think this is consistent with their example as well. Even/Odd writes are separate, and they change only the lowest address register between writes.
In any case, if I will test this as well, just to be sure (this should be quick).
[quote author="robots"]So the fuse writing code would be like:
setup fuse write:
iface->PIC416Write(0x00, 0x8EA6); //setup PIC - BSF EECON1, EEPGD
iface->PIC416Write(0x00, 0x8CA6); //setup PIC - BSF EECON1, CFGS
// set table ptrs
iface->PIC416Write(0x00, 0x0e30); //movlw 0x30
iface->PIC416Write(0x00, 0x6ef8); //movwf TBLPTRU
iface->PIC416Write(0x00, 0x0e00); //movlw 0x00
iface->PIC416Write(0x00, 0x6ef7); //movwf TBLPTRH
cycle through fuses:
the same thing you have.
If this won't help, only analyzer will.
Page 10 suggest that you have only 8 (16bit config words), thats 16writes.[/quote]
I'm more worried about the write delay as set by the Bus Pirate. It is defined to be 1ms, which is what the spec says, with no safety margins.I'll take a look with the OLS to see what the actual delay is.