• AVR Freaks

Hot!Bonehead Help v2.0

Page: 12 > Showing page 1 of 2
Author
jweir43
New Member
  • Total Posts : 17
  • Reward points : 0
  • Joined: 2019/05/22 13:43:05
  • Location: Grass Valley, 60 miles north of Sacramento
  • Status: offline
2019/06/17 13:45:17 (permalink)
0

Bonehead Help v2.0

I'm having the usual newbie problems, never having programmed a microprocessor in my life.
 
Trying to program a 12F609 using a PICkit4 and MPLAB X, both IDE and IPE versions 5.15.  Both versions are throwing programming errors just trying to erase and look at the chip.  I see and read the errors, but after reading the PICkit instructions on what the errors mean, I'm totally confused.  Perhaps one of you might be able to set me on the right path.
 
Four files attached, two each from IDE and IPE.
 
Connections between the PICkit4 and the 12F609:
 
PICKIT4   Pins    1   2   3   4   5
12F609    Pins    4   1   8   7   6    +5 volt supply direct to pin 1   47K resistor between pins 1 and 4.
 
Any help gratefully accepted.  Please don't tell me the 12F609 is an "old" part.  I understand that, but it is the only one I found that I can use.
 
 

Attachment(s)

Attachments are not available: Download requirements not met
#1

33 Replies Related Threads

    malaugh
    Super Member
    • Total Posts : 398
    • Reward points : 0
    • Joined: 2011/03/31 14:04:42
    • Location: San Diego
    • Status: online
    Re: Bonehead Help v2.0 2019/06/17 14:38:12 (permalink)
    0
    Cannot say what you problem is, but when MPLab-X says "Target 0x0 is an invalid device", this indicates a hardware problem.  The first programming step in MPLAB-X is to read the Chip ID from the MCU, and compare it with the selected chip on MPLAB-X, and give an error if there is no match.  A Chip ID of 0x0 occurs when the chip ID cannot be read.
     
     
    #2
    jweir43
    New Member
    • Total Posts : 17
    • Reward points : 0
    • Joined: 2019/05/22 13:43:05
    • Location: Grass Valley, 60 miles north of Sacramento
    • Status: offline
    Re: Bonehead Help v2.0 2019/06/17 15:06:41 (permalink)
    0
    Well, I'm going to review my board setup carefully and try another device of the same part number.  I bought 5 of them on the off chance that I would blow a couple of them being hamhanded, but I don't see where in the pin/out-pin/in I've made an error connecting the PICkit to the PIC.  I'll go over it carefully before I try another device, but I really don't want to just keep on blowing up chips if I'm doing something wrong.
     
    Thanks for your kind response (P.S. where in San Diego do you live?  I was born in Naval Hospital Balboa Park, lived downtown when Dad was overseas, moved to Lemon Grove, then North Park, then Clairemont, then TierraSanta, and then to Northern California when I was 35.)
     
    Jim
    post edited by jweir43 - 2019/06/17 15:10:58
    #3
    ric
    Super Member
    • Total Posts : 22768
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Bonehead Help v2.0 2019/06/17 15:26:36 (permalink)
    0
    jweir43
    Connections between the PICkit4 and the 12F609:
    PICKIT4   Pins    1   2   3   4   5
    12F609    Pins    4   1   8   7   6    +5 volt supply direct to pin 1   47K resistor between pins 1 and 4.

    Is anything else connected to any of those signals? (Apart from ground)
    Note, if you are powering the part from the PK4, and have lots of capacitance on Vdd, that can upset things by causing Vdd to rise too slowly.
     

    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!
    #4
    NKurzman
    A Guy on the Net
    • Total Posts : 17519
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: Bonehead Help v2.0 2019/06/17 15:39:34 (permalink)
    0
    Is there a 0.1uF from Vcc to Gnd?
    Is the PICKit 4 set to Power the PIC (or does it have external Power?)
    what is Vcc?
    has the PIC been programmed before.
    #5
    jweir43
    New Member
    • Total Posts : 17
    • Reward points : 0
    • Joined: 2019/05/22 13:43:05
    • Location: Grass Valley, 60 miles north of Sacramento
    • Status: offline
    Re: Bonehead Help v2.0 2019/06/17 15:45:01 (permalink)
    0
    I'm doing the basic "Flash An LED" first program.  If I can get that working, I can program the world.
     
    I do have a 470R resistor from pin 5 (I/O portA.2) to the anode of an LED, and the cathode to ground.
     
    How does the chip know to set all the I/O pins to inputs or outputs for programming?
     
    There is zero capacitance on Vdd, none.  Didn't see where it called for any.   I can't get the PK4 to power the chip.  That is a secondary problem.  I'm using a lab power supply for the +5.  Should there be a 0.1u capacitor from +Vdd to ground?
     
    47K resistor from pin 1 to pin 4.  Is a 47k resistor from +5 to /MCLR enough or should it be another value?
     
    Six hours ago the PIC was a virgin, right out of the tube from Mouser.  I looked with a glass; the chip is marked correctly.
     
    Thanks,
     
    Jim
    post edited by jweir43 - 2019/06/17 15:49:21

    The Titanic was built by expert engineers and a reputable company.  The Ark was built by amateurs at home.
    #6
    ric
    Super Member
    • Total Posts : 22768
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Bonehead Help v2.0 2019/06/17 15:51:51 (permalink)
    0
    jweir43
    I'm doing the basic "Flash An LED" first program.  If I can get that working, I can program the world.

    Indeed! :)
     

    I do have a 470R resistor from pin 5 (I/O portA.2) to the anode of an LED, and the cathode to ground.

    That's fine, it has nothing to do with programming
     

    How does the chip know to set all the I/O pins to inputs or outputs for programming?

    Programming starts with a reset, which sets all GPIO pins as inputs.
    On that device, the MCLR pin is pulsed up to about 13V to get it into programming mode.
     

    There is zero capacitance on Vdd, none.  Didn't see where it called for any.

    A small bypass capacitor (about 100nF) is always a good idea on a digital IC.
     

     I can't get the PK4 to power the chip.  That is a secondary problem.  I'm using a lab power supply for the +5.

    Why not? It should just be a setting on the PK4 settings screen. What happens when you try?
     

    Is a 47k resistor from +5 to /MCLR enough or should it be another value?

    47k is fine.
     
    n.b. SOME old 8 pins devices have a potential problem if they have previously been programmed with the following settings.
    * MCLR pin disabled
    * Internal oscillator
    * Power up timer disabled
    * Code which sets the ICSP pins to output mode very soon after startup.
     
    Those chips can often be recovered by powering the chip from the programmer, and setting the programmer to use "VPP before VDD" mode.
     
    post edited by ric - 2019/06/17 15:55:47

    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!
    #7
    NorthGuy
    Super Member
    • Total Posts : 5501
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: Bonehead Help v2.0 2019/06/17 15:52:24 (permalink)
    0
    Most likely it is some sort of bad contact, bad soldering, or something of that sort. In this situation, I would start probing directly on the PIC's pins to see if the signals from PICki4 actually reach the pins.
    #8
    jweir43
    New Member
    • Total Posts : 17
    • Reward points : 0
    • Joined: 2019/05/22 13:43:05
    • Location: Grass Valley, 60 miles north of Sacramento
    • Status: offline
    Re: Bonehead Help v2.0 2019/06/17 18:09:33 (permalink)
    0
    NorthGuy
    Most likely it is some sort of bad contact, bad soldering, or something of that sort. In this situation, I would start probing directly on the PIC's pins to see if the signals from PICki4 actually reach the pins.


    I can't see it being a "bad" anything as the proto board and the PIC4 are both brand new.  THere is no soldering involved, it is all copper hardwired.  Remember, I'm a newbie.  I can probe the pins all day long but i don't know what I am looking for.   Thanks,  Jim
    post edited by jweir43 - 2019/06/17 18:18:20

    The Titanic was built by expert engineers and a reputable company.  The Ark was built by amateurs at home.
    #9
    jweir43
    New Member
    • Total Posts : 17
    • Reward points : 0
    • Joined: 2019/05/22 13:43:05
    • Location: Grass Valley, 60 miles north of Sacramento
    • Status: offline
    Re: Bonehead Help v2.0 2019/06/17 18:17:24 (permalink)
    0
    ric
    jweir43
    I'm doing the basic "Flash An LED" first program.  If I can get that working, I can program the world.

    Indeed! :)   Yes indeedy doo-doo.  My Basic ain't too bad once I get to know how the chip works.
     

    I do have a 470R resistor from pin 5 (I/O portA.2) to the anode of an LED, and the cathode to ground.

    That's fine, it has nothing to do with programming    K.
     

    How does the chip know to set all the I/O pins to inputs or outputs for programming?

    Programming starts with a reset, which sets all GPIO pins as inputs.
    On that device, the MCLR pin is pulsed up to about 13V to get it into programming mode.  K.
     

    There is zero capacitance on Vdd, none.  Didn't see where it called for any.

    A small bypass capacitor (about 100nF) is always a good idea on a digital IC.  Yessir, but I wanted to get the chip programmed and THEN start making the thing right.  With CMOS and TTL I always figured a capacitor for each 4 packages and that worked pretty well.
     

     I can't get the PK4 to power the chip.  That is a secondary problem.  I'm using a lab power supply for the +5.

    Why not? It should just be a setting on the PK4 settings screen. What happens when you try?  It gives exactly the same error messages but it also says that it is being powered by the PIC4
     

    Is a 47k resistor from +5 to /MCLR enough or should it be another value?

    47k is fine.   K.
     
    n.b. SOME old 8 pins devices have a potential problem if they have previously been programmed with the following settings.
    * MCLR pin disabled
    * Internal oscillator
    * Power up timer disabled
    * Code which sets the ICSP pins to output mode very soon after startup.  As I said, as of this morning (about 6 hours ago) the chips were virgins in rail packaging from a reliable MC distributor.
     
    Those chips can often be recovered by powering the chip from the programmer, and setting the programmer to use "VPP before VDD" mode.   Did that.  Absolutely no change in the error message(s).

     





    The Titanic was built by expert engineers and a reputable company.  The Ark was built by amateurs at home.
    #10
    jweir43
    New Member
    • Total Posts : 17
    • Reward points : 0
    • Joined: 2019/05/22 13:43:05
    • Location: Grass Valley, 60 miles north of Sacramento
    • Status: offline
    Re: Bonehead Help v2.0 2019/06/17 18:23:15 (permalink)
    0
    NKurzman
    Is there a 0.1uF from Vcc to Gnd?  WIth one or not, it makes no difference.
    Is the PICKit 4 set to Power the PIC (or does it have external Power?)  Both ways, it makes no difference
    what is Vcc?  Too many years of bipolar discrete transistor design.  Vcc (Collector voltage) and Vee (Emitter voltage) correspond directly to Vdd (Drain Voltage) and Vss (Source voltage) on Field Effect devices.
    has the PIC been programmed before.  Came in a standard tube of 5 direct from Mouser, one of uC's biggest distributors.  I would bet not.





    The Titanic was built by expert engineers and a reputable company.  The Ark was built by amateurs at home.
    #11
    ric
    Super Member
    • Total Posts : 22768
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Bonehead Help v2.0 2019/06/17 18:32:16 (permalink)
    0
    Could you post a photo of your board with the PK4 connected?
     

    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!
    #12
    mpgmike
    Super Member
    • Total Posts : 179
    • Reward points : 0
    • Joined: 2014/01/23 17:27:06
    • Location: NJ
    • Status: offline
    Re: Bonehead Help v2.0 2019/06/17 18:40:54 (permalink)
    0
    Jim, check your ME Labs Forum PM box.

    I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.
    #13
    dan1138
    Super Member
    • Total Posts : 3123
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: Bonehead Help v2.0 2019/06/17 18:47:32 (permalink)
    0
    @jweir43,
     
    I have a PICkit4 but not a PIC12F609. The oldest device I can lay my hands on right now is a PIC16F876A.
     
    Assembled this on a solder-less breadboard just so I could have crap signal integrity and left off the 100nF bypass cap.
     
    I had some "issues" with MPLABX IPE v5.15 that gave me that same results you have been seeing.
     
    So after closing and opening the IPE a few times, trying a PICkit3, then going in and out of Advanced mode a few times, it started to work.
     
    I have no idea of what actually got it to work.
    Attachments are not available: Download requirements not met
    post edited by dan1138 - 2019/06/17 18:50:15

    Attachment(s)

    Attachments are not available: Download requirements not met
    #14
    ric
    Super Member
    • Total Posts : 22768
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Bonehead Help v2.0 2019/06/17 18:58:10 (permalink)
    +1 (1)
    dan1138
    ...
    I have no idea of what actually got it to work.

    [joke]
    Plugging the USB cable into the PK4?
    [/joke]

    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!
    #15
    dan1138
    Super Member
    • Total Posts : 3123
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: Bonehead Help v2.0 2019/06/17 19:05:08 (permalink)
    0
    ric
    dan1138
    ...
    I have no idea of what actually got it to work.

    [joke]
    Plugging the USB cable into the PK4?
    [/joke]

    Funny!
     
    Did you also notice that the external DC is not connected?
    #16
    jweir43
    New Member
    • Total Posts : 17
    • Reward points : 0
    • Joined: 2019/05/22 13:43:05
    • Location: Grass Valley, 60 miles north of Sacramento
    • Status: offline
    Re: Bonehead Help v2.0 2019/06/17 19:52:54 (permalink)
    +1 (1)
    ric
    Could you post a photo of your board with the PK4 connected?

    It wants a URL.  How do I upload an image from my computer directly?
    Jim
    What a royal pain the labonza.  Attached.   Jim
     
     
    post edited by jweir43 - 2019/06/17 20:06:48

    Attachment(s)

    Attachments are not available: Download requirements not met

    The Titanic was built by expert engineers and a reputable company.  The Ark was built by amateurs at home.
    #17
    ric
    Super Member
    • Total Posts : 22768
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Bonehead Help v2.0 2019/06/17 20:01:35 (permalink)
    +1 (1)
    If you use the "Open Full Version" link to open the full editor Window, there is an "Attach images" button.
    However, be prepared for more forum bugs.
    Uploading the photo onto an image sharing site, then using that URL can sometimes avoid this pain.
     

    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!
    #18
    PStechPaul
    Super Member
    • Total Posts : 2303
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: offline
    Re: Bonehead Help v2.0 2019/06/17 20:22:51 (permalink)
    0
    I think there is a tab that opens an option to upload images to the Microchip server. Or, you can use an image hosting service like www.use.com or www.tinypic.com.
     
     Apparently the Microchip website no longer allows images from an http: server, so my images now look like this:
     
    https://www.microchip.com...rue&openFull=true#

     
    #19
    ric
    Super Member
    • Total Posts : 22768
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Bonehead Help v2.0 2019/06/17 20:25:05 (permalink)
    0
    Image looks fine to me Paul.
     

    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!
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2019 APG vNext Commercial Version 4.5