picp and the 18F4550
For a while i’ve been playing with microchip PIC chips. I have an olimex PIC-MCP-USB programmer which I use with picp under linux, and recently ran into some problems with 18F4550 chips. It would program just fine, but not erase the memory properly (took me a while to figure that out!). So I installed mplab on a windows machine, and sniffed the sequence of bytes going over the wire. Just for anyone who is fooling around with this as well, here is the proper picdevrc entry for the 18F4550:
[18F4550] ; pic definition
0 ; config word: code protect bit mask
0 ; config word: watchdog bit mask
4 ; Word alignment for writing to this device
300000 ; Configuration memory start address
200000 0 ; ID Locations addr and size
f00000 ; Data eeprom address
0 ; number of words in cfg bits with factory set bits
0 0 0 0 0 0 0 0 ; fixed bits mask
WARP OLIMEX ; bit map of supporting programmers
[18F4550:def]
40 00 ; size of program space
ff ff ; width of address word
ff ff ; width of data word
0f 0f ; width of ID
0f 0f ; ID mask
cf 3f ; width of configuration word
cf 3f ; configuration word mask
00 ff ; EEPROM data width
00 ff ; EEPROM data mask
00 00 ; Calibration width
00 00 ; Calibration mask
00 00 ; ??
40 00 ; ??
00 00 ; address of ID locations
04 ; size of ID locations
00 00 ; address of configuration bits
07 ; size of configuration register
00 00 ; address of data space
01 00 ; size of data space
00 00 ; address of internal clock calibration value
00 00 ; size of clock calibration space
03 ; additional programming pulses for C devices
13 ; main programming pulses for C devices
1e 0f ; ?? ZIF configuration ??
[18F4550:defx]
05 00 1f 1f
83 00 00 85
c0 0f e0 0f
40 0f 00 00
cf 3f 1f 3f
87 00 00 e5
c0 0f e0 0f
40 0f 00 00
