I built a dsPIC board using dsPIC33FJ128MC802 (a 28-pin DIL package IC). I have been trying to get it to work but no luck so far. As a DC source, I use a USB connector B which is connected to my PC. This gives +5V to the board which I feed to LM317 voltage regulator. The output of this regulator is fed to VDD of my dsPIC. I have connected 100nF decoupling capacitors between AVDD (pin 27) and AGND (pin 28), and also between VDD (pin 13) and GND (pin
. AVDD and AGND are connected to VDD and GND respectively. For MCLR pin, I have a pull-up of 10kOhm and a 1kOhm in series to MCLR pin. I also have a 100nF decoupling to MCLR pin. Lastly, I have a 220nF ceramic capacitor connected across VDDC (pin 20) and GND (pin 19). I know that the datasheet requires a capacitor with capacitance of min 1uF and max 10uF. However, I have seen in a recent post that .1uF capacitor is also okay (see the post "dsPIC refuses to run!" by szhang on 3 Oct 08). I have not connected any crystal on OSC1 and OSC2 pins. I assume that dsPIC would use its internal FRC oscillator.
As a programmer I use MPLAB ICD 2 and I make a connection to ICD 2 using a 6-pin RJ11 socket where I connected: MCLR to pin 1 of RJ11, VDD to pin 2 of RJ11, GND to pin 3 of RJ11, TX/PGD to pin 4 of RJ11 and RX/PGC to pin 5 of RJ11.
I put all of my components on a stripboard. I have the following voltage measurement on the pins:
MCLR (pin 1): 3.48V
VDD (pin 13): 3.52V
VDDC (pin 20): 2.60V
AVDD (pin 28): 3.52V
The rest of the pins have 0.0V
These measurements were obtained using my multimetre. To this end, everything seems fine. I then connected MPLAB ICD 2 and I obtain the following message:
Connecting to MPLAB ICD 2
Setting Vdd source to MPLAB ICD 2
ICDWarn0020: Invalid target device id (expected=0x629, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
MPLAB ICD 2 Ready
It seems that my dsPIC is not responding at all. Any suggestion, help or comment is greatly appreciated.
Note that I have also tried using crystal oscillator. I do not have a 8MHz crystal, but I have a 14.7456MHz crystal. Connected this crystal with the associated capacitors to OSC1 and OSC2 pins, I ran into the same problem. Tried with another dsPIC33FJ128MC802 IC, I had the same message from MPLAB. I really run out of idea. Please guide me.... Many thanks in advance.