Hot!dsPIC33CK256MP202 communicating with PICKIT 3

Author
KCARRIGAN
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2010/09/25 16:17:24
  • Location: 0
  • Status: offline
2019/01/12 11:01:36 (permalink)
0

dsPIC33CK256MP202 communicating with PICKIT 3

Hi,
I have an expansion SSOP to DIN with dsPIC33 mounted, and using PGC1/PGD1 to PICKIT for CLK and DATA, along with MCLR and VDD and VSS. I bridged all AVss, VSS (2) for ground, AVdd, Vdd  (2) with .1uF across. MCLR has 10k SMD to Vdd.
Connecting 3.3VDC and using PICKIT 3, MPLAB-X IDE it finds the lastest dsPIC33CK driver, and then it bombs out saying can not connect to PICKIT 3 to download. I'm very frustrated, as this is a super simple layout.
I know the chip is OK, as I used a sharp pencil iron to solder the SSOP 28 pin, under a magnifying glass. No cross talk. (I did wave solder some too, but though maybe I fried the chips in oven.
 
Any pointers appreciated. IN looking at MPLAB-X code (used code configurator) PGC1/D1 is configured correctly.
HELP...  its a EXCELLENT chip and love to use it.
 
post edited by KCARRIGAN - 2019/01/12 11:20:58

Attached Image(s)

#1

18 Replies Related Threads

    Nikolay_Po
    Super Member
    • Total Posts : 1788
    • Reward points : 0
    • Joined: 2012/04/01 13:49:27
    • Location: Russia, Novorossiysk
    • Status: offline
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/12 11:41:23 (permalink)
    0
    Show where the capacitors? Have you missed the PICkit3 header direction? Have you checked DC value on the pins of uC?
    #2
    KCARRIGAN
    New Member
    • Total Posts : 14
    • Reward points : 0
    • Joined: 2010/09/25 16:17:24
    • Location: 0
    • Status: offline
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/12 12:16:42 (permalink)
    0
    Its a .22uF cap and 10k SMD. See underside photo.
     

    Attached Image(s)

    #3
    KCARRIGAN
    New Member
    • Total Posts : 14
    • Reward points : 0
    • Joined: 2010/09/25 16:17:24
    • Location: 0
    • Status: offline
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/12 12:30:33 (permalink)
    0
    I have checked the voltage and its 3.30VDC which is ideal. Also rechecked and checked many times the MCLR is white wire and goes to 'marker' on PICKIT 3, pin 1, then red (3.3V), blk (gnd) then the PGD1, then PGC1 leads.
    I changed the PGD1/C1 leads and MPLAB-X complained more, so know they are correct.
    Here is what MPLAB-X gives with PICKIT 3.
    Connecting to MPLAB PICkit 3...
    ------------------------------------------------------
    Currently loaded firmware on PICkit 3
    Firmware Suite Version.....01.54.00
    Firmware type..............Enhanced Midrange

    Now Downloading new Firmware for target device: dsPIC33CK256MP202
    Downloading AP...
    AP download complete
    Programming download...

    Currently loaded firmware on PICkit 3
    Firmware Suite Version.....01.54.00
    Firmware type..............dsPIC33CK

    Target voltage detected
    Target Device ID (0x0) is an Invalid Device ID. Please check your connections to the Target Device.
    DEVSN0 = 00000000
    DEVSN1 = 00000000

    Device Erased...

    Programming...

    The following memory area(s) will be programmed:
    program memory: start address = 0x0, end address = 0x7ff
    Failed to program device


    #4
    Les
    Super Member
    • Total Posts : 210
    • Reward points : 0
    • Joined: 2011/02/23 04:27:28
    • Location: UK
    • Status: offline
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/12 14:19:51 (permalink)
    0
    how long are your wires to the PK3 ? 
    #5
    Nikolay_Po
    Super Member
    • Total Posts : 1788
    • Reward points : 0
    • Joined: 2012/04/01 13:49:27
    • Location: Russia, Novorossiysk
    • Status: offline
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/12 14:29:07 (permalink)
    0
    Try to disconnect external voltage source completely (including ground) and set PICkit3 to supply the power to the target.
    Ideally, you need to check PGD/PGC pins by an oscilloscope. The readings of device ID zero means the data pin doesn't go high. To test the PICkit3, connect PGD pin to PICkit's Vdd and try to communicate the "target". The readings of zeros should change to FF.
    #6
    KCARRIGAN
    New Member
    • Total Posts : 14
    • Reward points : 0
    • Joined: 2010/09/25 16:17:24
    • Location: 0
    • Status: offline
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/12 15:19:56 (permalink)
    0
    I did try no external power, and what came back was VDD of 3.25 is applied by 3.1vdc is sensed, you may need to apply external power. (I have a I3 older computer but generally can power and program pic16, pic12 MCU just fine.)
    I'll try the OSCOPE method and see if the transitions are square.
    The lead lengths are about 2" max, to the PICKIT 3, from the board.
    Any way you know of to "slow down" data rate of PICKIT 3 to dsPIC33CK? Could be clock is so fast (not sure how fast) that 2" lines become impedance lines.  
    #7
    MBedder
    Circuit breaker
    • Total Posts : 6624
    • Reward points : 0
    • Joined: 2008/05/30 11:24:01
    • Location: Zelenograd, Russia
    • Status: offline
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/12 15:43:32 (permalink)
    0
    Try reconnecting the PICkit3 to PGx2 pair.
    #8
    Les
    Super Member
    • Total Posts : 210
    • Reward points : 0
    • Joined: 2011/02/23 04:27:28
    • Location: UK
    • Status: offline
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/12 16:27:29 (permalink)
    0
    do you have .1uf cap on all power pins ?
     
    #9
    KCARRIGAN
    New Member
    • Total Posts : 14
    • Reward points : 0
    • Joined: 2010/09/25 16:17:24
    • Location: 0
    • Status: offline
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/12 17:29:24 (permalink)
    0
    I measure with OSCOPE the clock and data lines from PICKIT to MCU board, and as expected very nice high/low transitions.
    Just one .22uF on power Vdd <-> Vss as the traces are so close to each other, power is nicely DC 3.30V with less than 5mV ripple (OSCOPE looks like DC on AC scale 5 mv) on the board.
    I can try PGD2 PGC2,  but what is the reasoning. The MPLAB-X control Config is set for PGD1/C1.
    I just can't understand why this is telling me "Target Device ID (0x0) is an Invalid Device ID".
    #10
    davekw7x
    Entropy++
    • Total Posts : 1614
    • Reward points : 0
    • Joined: 2012/01/16 12:01:07
    • Location: Left Coast, USA
    • Status: offline
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/12 20:21:13 (permalink)
    0
    KCARRIGAN
    Its a .22uF cap and 10k SMD. See underside photo.
     



     
    The message "Target Device ID (0x0) is an Invalid Device ID. Please check your connections to the Target Device" means that it could not enter programming mode.  Common problems are with signal integrity, insufficient/improper decoupling, incorrect ICSP connections (PGC/PGD lines crossed, for example), or excessive loading on MCLR, PGD or PGC lines.
     
    (I assume that you have checked to make sure there are no adjacent-pin shorts on the package.)
     
    I think you got it right, but here are the correct Power/Gnd and Decoupling Cap connections. I highly recommend separate decoupling caps for each Pwr/Gnd pair.
     
    Power/Gnd connections for dsPIC33CK256MP202/dsPIC33CK256MP502
                    28-TSSOP

    3.3V:
        Pin  5  - AVdd
        Pin  7  - Vdd
        Pin 20  - Vdd

    GND:
        Pin  6  - AVss
        Pin  8  - Vss
        Pin 19  - Vss

    Decoupling Capacitors 0.1uF MLCC
        Pins    5 -  6
        Pins    7 -  8
        Pins   19 - 20




    Photo shows my evaluation/test setup with a TSSOP breakout board on a Solderless Breadboard.  I have used this with a PICkit 3 and with a SNAP, connected with a 16 cm cable.  I use same setup for dsPIC33CH128MP502 as shown by the other breakout board in the photo.
     
    I always use external power rather than getting power from the PICkit.  I run this at 100 MIPS with FRC-PLL and with PRI-PLL (8 MHz crystal shown).  I put decoupling caps directly on the breakout board, and I put 27 pF crystal caps on the breakout board and plug the crystal into the Solderless Breadboard when I want to.  Note generous use of decoupling along Power/Gnd rails of the Solderless Breadboard.
     
     
    Regards,
     
    Dave
    post edited by davekw7x - 2019/01/12 20:53:07

    Attached Image(s)


    Sometimes I just can't help myself...
    #11
    NKurzman
    A Guy on the Net
    • Total Posts : 16754
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/12 22:01:24 (permalink)
    0
    Yes, All power and all grounds must be connected.
    #12
    KCARRIGAN
    New Member
    • Total Posts : 14
    • Reward points : 0
    • Joined: 2010/09/25 16:17:24
    • Location: 0
    • Status: offline
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/13 06:35:39 (permalink)
    0
    Well, this give me hope. I have bridged 5, 7, 20 to 3.30V, and 6, 8, and 19 for Vss with just a single .22uF smd. BUT next I'll put caps across 5,6; 7,8, and 19,20. Outside of this, do you use PGD1/C1 for programming? 
    I also use 10k SMD on MCLR to Vdd. Should this be lower?
     
    With the VERY FAST PICKIT clock and data lines (Used OSCOPE to see this) I'm shocked that solderless breadboard works for programming. The capacitance between adjacent plug-ins high enough to round translations to high and low. But, if yours works, that great news.
    -----------------------------------
    -----------------------------------
    Well, I put capacitors .1uF SMD on all 3.3V & gnds. Picture enclosed.
    I'm thinking the device board is OK, but something else is bad. I've check all traces and none bridge adjacent. caps all over on pins 5&6, 7&8, 19&20 of .1uF.  3.30 VDC pure no ripple (white & black). The pinouts on the bottom board are not the same as top. On the top I bridged 5&7 and 6&8 (not shown on the bottom).
     
    changing the leads of PGD1/C1 to C1/D1 into PICKIT 3 does nothing. I get the same:
    -------
    Target voltage detected
    Target Device ID (0x0) is an Invalid Device ID. Please check your connections to the Target Device.
    --------
    Maybe MCLR is not working right (4.7k SMD to Vdd) for putting device in programming mode for PGD1/C1? 
    I'm really out of ideas...
    -----------------------
    -----------------------
    Thinking this through, external power 3.3VDC is applied to Vdd & GND to Vss pins, and MCLR is also tied to external 3.3V.
    PICKIT 3 PULLS MCLR pin to gnd for programming (normally high). So what is the reference supply at PICKIT that ties it to 'external' 3.3V, in order to shut this to ground?  I would guess inside PICKIT has MOSFET Source to ground and open Drain - to board.
    So that 3.3V external is shunted to PICKIT 3 ground.  ??  PICKIT 3 and external ground needs to be ensured... I think I've done with PICKIT 3 gnd, to external power ground. Hummm
     
    post edited by KCARRIGAN - 2019/01/13 09:38:10

    Attached Image(s)

    #13
    davekw7x
    Entropy++
    • Total Posts : 1614
    • Reward points : 0
    • Joined: 2012/01/16 12:01:07
    • Location: Left Coast, USA
    • Status: offline
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/13 09:39:14 (permalink)
    0
    KCARRIGAN
    ... 3.30 VDC pure no ripple (white & black). ..

    With external power supply on a PC board, in addition to  0.1 uF caps at  Vdd/Vss connections on the IC ---and sprinkling a few others around the landscape--- I have always used bulk cap of  something like 10 uF MLCC (or Tantalum in the old days) at the point of power connection on the board.  I have not found this necessary on my SBB with the little power supply I showed (powered from a 9V wall-wart).
    KCARRIGAN
    Maybe MCLR is not working right (4.7k SMD to Vdd) for putting device in programming mode

    I used 10K, but I feel sure that 4.7K is OK for a PICkit.
     
    The SBB in the picture I showed uses PGC2/PGD2, but I have used others as well.  Note that connecting a 'scope to one or both the ICSP pins sometimes causes problems (due, I guess, to delays caused by capacitance of the 'scope probe).  I have seen posts on this forum where people with breadboard problems reported success with a small cap on one (and only one) of the ICSP lines (PGC, I think, but I don't remember exactly).
     
    I have been using the SNAP programmer lately, but, just to be sure, I reprogrammed using PICkit3 (a "real" Microchip product, not a clone).  Screenshot is attached.
     
    Final note: Same considerations (SBB capacitance, for example) with certain dsPIC33EP devices sometimes prevent running at highest speeds, but I haven't had programming problems using a Solderless Breadboard with reasonably dressed leads, as shown in my previous photo. 
     
    I use a SBB because it gives a stable platform for connecting power, ground, ICSP, serial converter, and a convenient way to connect other devices like the little module I showed.  I can't really see where your neat little setup would give problems for initial investigation, but...
     
    Regards,
     
    Dave
     
    post edited by davekw7x - 2019/01/13 10:02:10

    Attached Image(s)


    Sometimes I just can't help myself...
    #14
    NorthGuy
    Super Member
    • Total Posts : 5149
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/13 10:06:21 (permalink)
    0
    I think you dig too deep and in the wrong direction. I can guarantee you this is not a SI problem. Basic programming will work just fine even without decoupling capacitors - at least getting the device id would work.
     
    Everything looks Ok on your pictures. So, it's most likely something silly - bad soldering, or yellow/green wires swapped when connecting to PICkit, or the resistor on MCLR has failed and shorted, or something of that sort.
     
    #15
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2808
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: online
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/13 10:41:53 (permalink)
    0
    It would have been better to use header blocks so you don't have to keep re/soldering.
    You need to get a microscope, chances are there is a tiny solder bridge.
    post edited by Gort2015 - 2019/01/13 10:45:27

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #16
    Nikolay_Po
    Super Member
    • Total Posts : 1788
    • Reward points : 0
    • Joined: 2012/04/01 13:49:27
    • Location: Russia, Novorossiysk
    • Status: offline
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/13 10:50:17 (permalink)
    4 (1)
    Or the chip itself is dead.
     
    KCARRIGAN
    I did try no external power, and what came back was VDD of 3.25 is applied by 3.1vdc is sensed, you may need to apply external power.



    This is suspicious  and means the target creates too heavy load to PICkit3 which should not be the case for single chip in reset state. Connect the controller to power supply only and check current consumption of the IC when MCLR pin is held low (remove pulling high resistor to not sink additional current from Vdd. The controller shouldn't sink even a mA of current in reset state.
    #17
    KCARRIGAN
    New Member
    • Total Posts : 14
    • Reward points : 0
    • Joined: 2010/09/25 16:17:24
    • Location: 0
    • Status: offline
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/13 14:01:29 (permalink)
    0
    Exactly,
    BAD SOLDER job was the culprit!  Silly for sure.. Thanks so much for all this advice. If you ZOOM INTO my Top view, it looks OK, but looking further, I epoxied the chip on before I soldered, and thus the chip solder pads did not set exactly on the board, so when I soldered them, the leads 'appeared' soldered but were floating above the board. ZOOM in and you can see it too. I used a 10X magnifying glass to solder, but you really need 40X to see the SSOP chip leads.
    Work nice now, thankgoodness... 
    #18
    du00000001
    Just Some Member
    • Total Posts : 2350
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: dsPIC33CK256MP202 communicating with PICKIT 3 2019/01/13 14:31:20 (permalink)
    0
    Absolutely no need to glue when hand-soldering!
    Start with soldering one of the corner pins (chip coarsely adjusted), adjust the chip on the diagonally opposite side and solder that too.
    The rest is easy peasy...

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #19
    Jump to:
    © 2019 APG vNext Commercial Version 4.5