go_away

Author Topic: dsPIC not responding  (Read 4591 times)

0 Members and 1 Guest are viewing this topic.

Offline dsPICgyTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
dsPIC not responding
« on: October 20, 2008, 06:50:59 AM »
Hi,

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 8). 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
...Connected
Setting Vdd source to MPLAB ICD 2
ICDWarn0020: Invalid target device id (expected=0x629, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
...Passed
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.

Offline ArcMan

  • Supreme Robot
  • *****
  • Posts: 519
  • Helpful? 4
  • Mmmm... Plasma
Re: dsPIC not responding
« Reply #1 on: October 20, 2008, 09:01:05 AM »
I assume that dsPIC would use its internal FRC oscillator.

I use PIC 16F's, not dsPICs, so take my post with a grain of salt.

You can't assume anything.  You have to set your FUSEs to define the oscillator, low-voltage programming (LVP), etc.  Make sure you shut off LVP unless you are going to use it.

Offline dsPICgyTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: dsPIC not responding
« Reply #2 on: October 20, 2008, 09:17:34 AM »
Many thanks for your input, however I did try with a 14.7456MHz crystal (with the associated capacitance) and I ran into the same problem.

Offline szhang

  • Robot Overlord
  • ****
  • Posts: 140
  • Helpful? 1
Re: dsPIC not responding
« Reply #3 on: October 20, 2008, 01:40:49 PM »
From what I see, ICD can't identify your device.  You should be able to program it even without an oscillator, so that probably isn't your problem.

Also, I lied, you can't use a .1uF cap.  For me the programmer and most peripherals worked, but interrupts go wonky if that capacitor is off.  Be sure to use a tantalum capacitor for that (I think ceramic disks works too).
« Last Edit: October 20, 2008, 01:46:49 PM by szhang »

Offline ellize

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: dsPIC not responding
« Reply #4 on: October 26, 2008, 08:48:27 PM »
Hi there!

May I ask if you could give me a copy of the MPLAB ICD 2 installer?

Offline jka

  • Full Member
  • ***
  • Posts: 78
  • Helpful? 4
Re: dsPIC not responding
« Reply #5 on: October 27, 2008, 04:40:56 AM »
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).
Try to use a 1-10uF tantalum capacitor as the datasheet says. Even though out-of-spec capacitors work for other users, it might not work in all cases.

 


Get Your Ad Here