Hi,
I was able to program PIC16F18857 with PICKIT2.
1.It is necessary to create 14 new scripts.
2.It is necessary to minimize-recompile "PICkit2_PCAppSource_V2_61".
3.It is necessary to?describe Reverse lower 14-bit's deviceID in the Script. (ICSP MSB Fist Device only.)
18857's DeviceID:3074 ->
00.11.00.00.01.11.01.00 ->
00.00.10.11.10.00.00.11 -> 0B83
Attach the changed host and device file.
<ICSP compatibility>
?Load PC Adress AAF2 BB01 AAE7 BB01 AAF2 BB80 AAF2 BB07 AAF2 BB00
F2 01 WRITE_BYTE_LITERAL 01 //0000.0001 -> 1000.0000 Load PC Address(80)
E7 01 DELAY_SHORT 01 //TDLY
F2 80 WRITE_BYTE_LITERAL 80 //1000.0000 -> 0000.0001 0x01 //Adress U
F2 07 WRITE_BYTE_LITERAL 07 //0000.0111 -> 1110.0000 0xE0 //Adress H
F2 00 WRITE_BYTE_LITERAL 00 0x00 //Adress L
?Load for NVM AAF2 BB00 AAE7 BB01 AAF2 BB00 AAF1 AAF1
F2 00 WRITE_BYTE_LITERAL 00 //0000.0000 -> 0000.0000 Load for NVM(00)
E7 01 DELAY_SHORT 01 //TDLY
F2 00 WRITE_BYTE_LITERAL 00 //Data U *Send "0"
F1 WRITE_BYTE_BUFFER //Data L *Replace H/L and LSB/MSB Sort inside the host after sending.
F1 WRITE_BYTE_BUFFER //Data H *
?Read from NVM AAF2 BB3F AAE7 BB01 AAEF AAF0 AAF0
F2 3F WRITE_BYTE_LITERAL 3F //0011.1111 -> 1111.1100 Read from NVM(FC)
E7 01 DELAY_SHORT 01 //TDLY
EF READ_BYTE //Data U *Receive only (Not use Buffer)
F0 READ_BYTE_BUFFER //Data L *Replace H/L and LSB/MSB Sort inside the host before receiving.
F0 READ_BYTE_BUFFER //Data H *
?Other commands
LAB <-> MSB only Sort
F2 18 WRITE_BYTE_LITERAL 18 //0001.1000 -> 0001.1000 Bulk Erase Memory(18)
F2 0F WRITE_BYTE_LITERAL 0F //0000.1111 -> 1111.0000 Raw Erase Memory(F0)
F2 1F WRITE_BYTE_LITERAL 1F //0001.1111 -> 1111.1000 Increment Address(F8)
F2 07 WRITE_BYTE_LITERAL 07 //0000.0111 -> 1110.0000 Begin Program(E0)
Referred to:
http://www.microchip.com/forums/m1011325.aspxbest regards,
Dan