Monday, November 24, 2008

ICSP pinouts


ICSP Overview

In-circuit Serial Programming (ICSP)

PICs are programmed using 5 signals. The data is transferred using a two wire synchronous serial scheme, with the clock always controlled by the programmer. The ICSP signals are:


Negative power input to the PIC and the ground reference for the remaining signals. Voltages of the other signals are implicitly with respect to GND unless otherwise specified.


This is the positive power input to the PIC. Some programmers require this to be provided by the circuit (circuit must be at least partially powered up), some programmers expect to drive this line themselves and require the circuit to be off, while others can be configured either way (like the Microchip ICD2). The Embed Inc programmers expect to drive the Vdd line themselves and require the target circuit to be off during programming.


Programming mode voltage. This must be connected to the MCLR pin of the target PIC. To put the PIC into programming mode, this line must be in a specified range that varies between PICs, but is always above Vdd. The highest maximum allowed Vpp voltage that we know of is 13.5 volts. There is no one Vpp voltage that is within the valid Vpp range of all PICs.


Clock line of the serial data interface. This line swings from GND to Vdd and is always driven by the programmer. Data is transferred on the falling edge.


Serial data line. The serial interface is bi-directional, so this line can be driven by either the programmer or the PIC depending on the current operation. In either case this line swings from GND to Vdd. A bit is transferred on the falling edge of PGC.

No comments: