• AVR Freaks

Hot!dsPIC30F4012 & PICkit3 Programming Problem

Author
RogerAF
Super Member
  • Total Posts : 250
  • Reward points : 0
  • Joined: 2007/06/30 20:48:04
  • Location: 0
  • Status: offline
2019/03/21 11:54:52 (permalink)
0

dsPIC30F4012 & PICkit3 Programming Problem


I have a dsPIC30F4012 (28-pin dip) on a solderless breadboard with a 4MHz crystal oscillator and a 5v supply that measures 4.85v. MCLR (pin-1) has 10K ohm resistor to 5v. I'm trying to blink a LED on RD0 (pin-15). I have the PICkit3 connected to pins with no connections other than the PICkit3.
 
When I tried to program in MPLABX IPE it failed. So I tried erasing then reading. I got the following error messages after erasing then reading:
 
Device Erased...


Programming...


The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0xfff
configuration memory
User Id Memory
configuration memory
Address: f8000e Expected Value: 80 Received Value: 0
Failed to program device

Reading...

The following memory area(s) will be read:
program memory: start address = 0x0, end address = 0xfff
configuration memory
User Id Memory
Read complete
Warning: Debug bit is set on target image. This may not run correctly in production.


 
Then I thought since the debug bit is set, I'll run it in debug in MPLABX IDE. I clicked "Debug Main Project" and got "Connection Failed".
 
Any suggestions?
 
#1

5 Replies Related Threads

    RogerAF
    Super Member
    • Total Posts : 250
    • Reward points : 0
    • Joined: 2007/06/30 20:48:04
    • Location: 0
    • Status: offline
    Re: dsPIC30F4012 & PICkit3 Programming Problem 2019/03/23 06:06:27 (permalink)
    0
    So here's an update on my situation. The ZIF socket adapter board that came with the PICkit3 has faded printing on the pins for PGC & PGD. I have fading vision, so I got the pins mixed up. Ooops. After fixing the connections I tried again to program the dsPIC30F4012. This time I was at least able to read the chip (I think) but programming still failed.
    According to the dsPIC30F Family Reference the dsPIC30F4012 requires a 13v programming voltage on MCLR pin. I'm skeptical that this PICkit3 is providing that. (But I haven't tried to meter it yet.)
    Can someone confirm whether or not this is the case?
    Would inserting an open-collector buffer with a 13v supply on MCLR pin help?
    Thanks for your attention.
    #2
    MBedder
    Circuit breaker
    • Total Posts : 6773
    • Reward points : 0
    • Joined: 2008/05/30 11:24:01
    • Location: Zelenograd, Russia
    • Status: offline
    Re: dsPIC30F4012 & PICkit3 Programming Problem 2019/03/23 07:12:19 (permalink)
    0
    RogerAFThe ZIF socket adapter board that came with the PICkit3...
    The ZIF socket adapter board never came with original PICkit3.


    #3
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 3143
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: dsPIC30F4012 & PICkit3 Programming Problem 2019/03/23 10:37:28 (permalink)
    0
    I did a search for address F8000E in the ref. manual and did not find any info on it.
     
    1. FOSC (0xF80000): Oscillator Configuration Register.
    2. FWDT (0xF80002): Watchdog Timer Configuration Register.
    3. FBORPOR (0xF80004): BOR and POR Configuration Register.
    4. FGS (0xF8000A): General Code Segment Configuration Register.
    5. FICD (0xF8000C): Debug Configuration Register.

    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.
    #4
    qhb
    Superb Member
    • Total Posts : 9998
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: dsPIC30F4012 & PICkit3 Programming Problem 2019/03/23 14:29:18 (permalink)
    0
    RogerAF
    According to the dsPIC30F Family Reference the dsPIC30F4012 requires a 13v programming voltage on MCLR pin. I'm skeptical that this PICkit3 is providing that. (But I haven't tried to meter it yet.)

    A meter is not good for observing it, you need a scope. It's only a short pulse.
     

    Would inserting an open-collector buffer with a 13v supply on MCLR pin help?

    Probably not. The PK3 needs to be able to very quickly set that pin to 0V, 5V or 13V as part of the programming algorithm.
     

    Nearly there...
    #5
    RogerAF
    Super Member
    • Total Posts : 250
    • Reward points : 0
    • Joined: 2007/06/30 20:48:04
    • Location: 0
    • Status: offline
    Re: dsPIC30F4012 & PICkit3 Programming Problem 2019/03/27 12:13:41 (permalink)
    0
    I did a search for address F8000E in the ref. manual and did not find any info on it.

    From document: dsPIC30F Flash Programming Specification DS70102K. Section 2.2: "Locations 0xF80000 through 0xF8000E are reserved for the Configuration registers." But the only other mention is in FIGURE 2-2: PROGRAM MEMORY MAP. Looking at TABLE 5-8:dsPIC30F CONFIGURATION REGISTERS (FOR dsPIC30F2010, dsPIC30F4011/4012 AND dsPIC30F6010/ 6011/6012/6013/ 6014) only shows locations: 0xF80000 through 0xF8000C. So I don't know what to make of it.
    #6
    Jump to:
    © 2019 APG vNext Commercial Version 4.5