Wednesday, September 02, 2009

How to connect icd3 ac162049 with a PIC microcontroller.

I confess I'm a hopeless beginner when it comes to Microchip's PIC microcontrollers. After playing around several years with AVR microcontrollers I figured it was time to go for the hobbyists second choice - the PIC.

My first impression is that Atmel has outpriced themselves after earlier being able to deliver cheap developer boards like the STK500. I wanted a programming device that was able to program DIL devices for rapid prototyping and for hobby projects and ended up buying an Microchip ICD3. I also bought a AC162049 universal programming module to be able to program several different DILs without having to make circuit boards first.

I am familiar with some other chips from Microchip, and have always found the datasheets quite understandable. With the ICD3 it was a completely different story. I was not able to connect to the dsPIC33FJ128MC that I knew was compatible with the ICD3. After looking around a bit I found out how to communicate with the device:

  1. Connect a 4.7-10 kOhm pullup resistor from one of the two VDD wires to the _MCLR pin.
  2. Connect all other wires except VPP to the pins in the datasheet for the microcontroller. GND wires should be connected to Vss. PGC and PGD should be connected to any of the pins starting with PGC or PGD. I used PGC1 and PGD1.
  3. Open MPLAB IDE and choose "Configure-Select Device". Choose the device you are using.
  4. Open "Programmer-Select Programmer"and select "MPLAB ICD3".
  5. Open "Programmer-Settings-Power" and check "Power target circuit from MPLAB ICD3".
Now you should be able to connect to the microcontroller. For me it was the setting for the power that I missed. After using a voltmeter I found that the microcontroller didn't have any power.