Designing A PIC ISCP Programmer

Discussion in 'Embedded Systems and Microcontrollers' started by crazyengineer, Jul 29, 2011.

  1. crazyengineer

    Thread Starter Member

    Dec 29, 2010
    Hello. I've been working with mostly atmega microcontrollers. I'm planning on learning on how to use pic microcontrollers because I'm impressed by the pic microcontroller's simple programming library compared to atmega.

    I was to design a pic development board but I found out that a iscp header for pic microcontroller is not just connecting the right wires to the right pins. Can someone point me to a sample schematic?
  2. nerdegutta


    Dec 15, 2009
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    Microchips In Circuit Serial Programmer (ICSP) works off a 6 pin connector:

    pin Function Comment
    1 Vpp Programming voltage, connect to MCLR pin
    2 Vdd + Supply voltage
    3 Vss - supply voltage (ground)
    4 Data Serial Data Line
    5 Clock Serial Clock Line
    6 NC No Connection

    Where these connect to the PIC depends on which PIC you pick. Data and clock have several names for the same thing over many chips.
  4. jj_alukkas

    Distinguished Member

    Jan 8, 2009
    I would suggest buying a PICKIT2 or if you have access to a working pic programmer, you could build a pickit clone. Its very simple to build and runs off USB. It will have a 6 pin ICSP header of which 5 pins are used for any PIC uC. Just check the datasheet for your pic, wire it on a breadboard and connect to whatever you need. The ICSP header runs directly to the pins of the pic's so a development board even isnt necessary.
  5. crazyengineer

    Thread Starter Member

    Dec 29, 2010
    I know that the ISCP connector needs 6 pins, but I thought it wasn't just straight "connect". I thought I read somewhere that reset needs a RC circuit.
  6. AlexR

    Well-Known Member

    Jan 16, 2008
    Basically it is as simple as connecting the header to the appropriate PIC pins but there are a couple of things to look out for.

    1. For the chip to go into programming mode the MCRL/Vpp pin gets raised to approx 13 volt so you need a large enough pull-up resistor on MCLR (usually 10K) to prevent Vpp getting into the rest of your circuit. Alternatively you could put a diode in series with the MCLR pull-up to block Vpp from the Vdd line.

    2. During programming pins PGC and PGD get set as inputs and are used to supply clock and programming data to the chip. Make sure that there are no capacitors, diodes or inductors hanging off those pins that could distort the signals on the clock or data lines. If you can't avoid having diodes capacitors etc on those pins then provide a way to disconnect the external devices during programming e.g. through the use of jumpers.

    For more info take a look at AN910 from Microchip
    crazyengineer likes this.
  7. bertus


    Apr 5, 2008
    crazyengineer likes this.
  8. jj_alukkas

    Distinguished Member

    Jan 8, 2009
    Dont worry, Its straight enough.. I have tried programming several projects which involve using all the pins and having all pins tied to leds except the MCLR pin as sometimes it might throw a checksum error.. It is very stable and never been an issue like the messy serial/parallel port programmers.. I made a small board with a ic socket to plug in the pic, with a cable connector header to interface to pickit, a reset button and an led and strip pins to pluginto a breadboard.. so if some peripheral messes up, just unplug it. I know it works only for a few chips, but I use these low pin midrange chips for most projects.