• AVR Freaks

Production code only runs when the pickit 3 is plugged in

Author
MPaulHolmes
Junior Member
  • Total Posts : 76
  • Reward points : 0
  • Joined: 2009/10/31 10:52:40
  • Location: 0
  • Status: offline
2020/01/23 17:22:29 (permalink)
0

Production code only runs when the pickit 3 is plugged in

In the past, with a pickit 3 and MPLab 8 and a dsPIC30F, I would set it to "release" and build/program the board.  Then, when I remove power, and disconnect the pickit 3, the next time I would turn on the power to the board, the program would run.  Isn't that what should be happening with MPLab X?  I click "Production-> build project", then either "run project" or "make and program device".  Then, as long as the pickit 3 is plugged in, it runs the code.  But if I remove the power, disconnect the pickit 3, and then turn on the power, nothing happens.  I'm using MPLab 5.25, and xc32 free compiler ver. 2.30 with optimizations set to zero, and also using a pic32mk.  I clicked through all of the options in "Production -> Set Project Configuration -> Customize" and didn't see anything specific that would hint at the problem.  Any suggestions? 
 
As a separate issue, during programming, it seems to toggle the TDO pin as an output.  And... yep, that's in the errata datasheet!  haha.  I guess I don't have that question anymore.  lol
#1

4 Replies Related Threads

    ric
    Super Member
    • Total Posts : 25502
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Production code only runs when the pickit 3 is plugged in 2020/01/23 17:47:02 (permalink)
    0
    Well I have to ask (as you didn't mention it).
    Do you have a pullup resistor on MCLR ?
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    MPaulHolmes
    Junior Member
    • Total Posts : 76
    • Reward points : 0
    • Joined: 2009/10/31 10:52:40
    • Location: 0
    • Status: offline
    Re: Production code only runs when the pickit 3 is plugged in 2020/01/23 17:52:38 (permalink)
    0
    Yes, I have this:
    +3.3v ------------- 10k Resistor ------------  0.1uF cap ----------- ground
    and
    I have a 1k resistor from the point where the 10k and the 0.1uF cap connect to the Mclear pin of the micro.  Then, I have the mclear pin connect to the mclear pin of the pickit 3.
     
    I guess I coudl doublecheck to see if the 10k resistor floated on top of the solder like a little water skipper.  that's been known to happen with my soldering jobs.
    #3
    MPaulHolmes
    Junior Member
    • Total Posts : 76
    • Reward points : 0
    • Joined: 2009/10/31 10:52:40
    • Location: 0
    • Status: offline
    Re: Production code only runs when the pickit 3 is plugged in 2020/01/23 18:09:39 (permalink)
    0
    I doublechecked the 10k 0.1uF, and 1k and they are all good.  I am going straight to the crystal oscillator and not switching from the secondary slow one.  I wonder if that has anything to do with it.  There are so many variables.  It's all totally new to me.
    #4
    MPaulHolmes
    Junior Member
    • Total Posts : 76
    • Reward points : 0
    • Joined: 2009/10/31 10:52:40
    • Location: 0
    • Status: offline
    Re: Production code only runs when the pickit 3 is plugged in 2020/01/23 18:13:21 (permalink)
    4 (1)
    Oh my gosh, I "boosted the kickstart of the oscillator" and now it works.  haha
     
    #5
    Jump to:
    © 2020 APG vNext Commercial Version 4.5