EditCables and Tools for PIC Programming
Microchip uses a consistent programming technique for most of its Flash based CPUs (ranging from the PIC12F to the PIC18F series, at least) The programming method utilises 3 wire (plus Ground) to initiate, clocks and send data to the CPU. The lines are MCLR/VPP which initiates programming mode, CLK to signal data into the chip, and DATA the data being sent to/from the chip.
Assuming the circuit board has been designed appropriately, the Microchip CPUs can be reprogrammed in-situ. This simplifies upgrades, and also development, by allowing the programmer to be attached directly to the CPU or through an interface plug. This is known as the ICSP interface (In Circuit Serial Programming)
EditThe PicKit 2
 PicKit 2 | The PicKit 2 is a device provided by Microchip, and has been cloned by many other manufacturers into items like the iCP01. It has a USB interface for PC connection, and its own Windows Based programming software. The programmer can be used either with a plug-in CPU socket board (which we won't do), or can be connected directly with the finished circuit board. |
EditInterfacing the PicKit 2
 PK2 Pinout (click to enlarge) | Pins 1,3,4 & 5 only are used. NB All clones copy the same pinout order, even if the plug used is a different style. |
EditFlying Lead Cable
The Flying Lead cable is basically some wire on the end of plug. The wire insulation is stripped back slightly to provide about 2mm of bare wire. Its these ends which will be lightly soldered onto the Scalextric InCar chip, connecting the appropriate wire to the appropriate solder pad. The pad names are clearly labelled on the Rev E boards.
It should be noted that the pinout order on the PicKit2 is different from the pinout order used by Scalextric. Therefore its important the cable is properly connected.
| PicKit 2 | Pk2 pin | InChip Rev E |
|---|
| MCLR | 1 | MCLR | | Vdd | 2 | (not used) | | GND | 3 | GND | | PGD | 4 | DATA | | PGC | 5 | CLK | | Aux | 6 | (not used) |
| |  My Car Programming Flying Lead (click to enlarge) |
|
EditPinout Lead Cable
This cable can be used to 'plug into' the various main boards produced by Scalextric (including PB6, PB4, PLG). In this case, the cable is a simple plug to socket cable, to convert the PicKit output to the board inputs.
Note that the Pinout Lead connection order is different from the flying lead, and so they are
not interchangeable.
| PicKit 2 | Pk2 pin | Scalextric PBs | PB pin |
|---|
| MCLR | 1 | MCLR | 5 | | Vdd | 2 | 5V | 1 | | GND | 3 | GND | 2 | | PGD | 4 | DATA | 4 | | PGC | 5 | CLK | 3 | | Aux | 6 | (not used) | |
| |  My PB Pinned Programming Lead (click to enlarge) |
|
Ian Harding, Christchurch, New Zealand