• AVR Freaks

Hot!ATmega32 w/ PICkit 4 + MPLAB X IPE - connection/programming problems

Author
Richard Rasker
Starting Member
  • Total Posts : 66
  • Reward points : 0
  • Joined: 2013/02/14 09:03:07
  • Location: 0
  • Status: offline
2019/06/14 04:42:12 (permalink)
0

ATmega32 w/ PICkit 4 + MPLAB X IPE - connection/programming problems

Hello,
I'm upgrading the hardware of a somewhat older product line containing an ATmega32-16 controller, thus the need arises to program these devices with an existing HEX file.
From what I understand and see, this should be possible with the PICkit 4 programmer/debugger and the MPLAB X IPE.
The IPE (v5.15) correctly identifies the PICkit 4, I can choose the ATmega32 device from the list, and the HEX file also loads without a problem.
Unfortunately, this is as far as I get.
When I connect the target PCB to the PICkit 4 and power it up, and then click Connect, I get the following error message:
 
The VDD voltage desired is out of range. It is below the minimum voltage of 1.5V.
Connection Failed.
 
I checked and double-checked all connections, searching on the Internet (and of course Microchip forums) for a solution or even a hint as to what I'm doing wrong, but I can't find anything so far.
 
These are the connections between PICkit 4 and the ATmega32:
1: nc
2: +5V VDD - ATmega pins 5, 17, 38
3: GND - ATmega pins 6, 18, 28, 39
4: MISO - ATmega pin 2 (PB6)
5: SCK - ATmega pin 3 (PB7)
6: !RESET - ATmega pin 4
7: MOSI - ATmega pin 1 (PB5)
8: nc
 
The +5V VDD is present, so the error message is rather puzzling. When I enter the IPE's Advanced Mode and indicate that I power the target from the tool, the VDD error message disappears, but it still fails to connect to the ATmega device (let alone that I can program it).
 
Could it be that this device isn't supported after all? Or do I need something else to program the device?
 
Thanks in advance for any hints,
 
Richard
#1

13 Replies Related Threads

    DevMod1
    Administrator
    • Total Posts : 464
    • Reward points : 0
    • Joined: 2009/02/10 09:34:30
    • Location: 0
    • Status: offline
    Re: ATmega32 w/ PICkit 4 + MPLAB X IPE - connection/programming problems 2019/06/14 10:15:24 (permalink)
    0
    What is the exact part# you are using??
     
    Also, could you please try MPLAB X v5.20 and see if you see the same issue?
     

    _____________________________

    Please read the forum posting guidelines. Do not double post, please help keep these forums professional and comments respectful.
    Please notify the moderators of problems/spam/trolls.
    #2
    MBedder
    Circuit breaker
    • Total Posts : 6786
    • Reward points : 0
    • Joined: 2008/05/30 11:24:01
    • Location: Zelenograd, Russia
    • Status: offline
    Re: ATmega32 w/ PICkit 4 + MPLAB X IPE - connection/programming problems 2019/06/14 10:55:55 (permalink)
    0
    Hasn't he already stated three times that he's using ATmega32?
    #3
    Richard Rasker
    Starting Member
    • Total Posts : 66
    • Reward points : 0
    • Joined: 2013/02/14 09:03:07
    • Location: 0
    • Status: offline
    Re: ATmega32 w/ PICkit 4 + MPLAB X IPE - connection/programming problems 2019/06/14 13:42:32 (permalink)
    0
    The exact device in question is the ATmega32-16U-TW.
    After upgrading to MPLAB X IDE/IPE 5.20, some changes occurred:
    • Connect is now grayed out, apparently because the PICkit 4 was automatically recognized.
    • When loading the HEX file and clicking Program, this is what happens:
      2019-06-14 22:28:17 +0200 - Hex file loaded successfully.
          2019-06-14 22:29:23 +0200 - Programming...

          *****************************************************

          Connecting to MPLAB PICkit 4...

          Currently loaded versions:
          Application version............0.14.228
          Vdd at 4V, should be above 4,5V.

          The VDD voltage desired is out of range. It is below the minimum voltage of 1.5V.
          Connection Failed.
    So according to MPLAB X IPE, VDD is too low, even though my voltmeter says it's 4.99 volts. And that is ignoring the even sillier message about VDD being 4V.
     
    After enabling the Advanced 'Power Tarwet circuit from tool' option, this is what happens:
    Connecting to MPLAB PICkit 4...

    Currently loaded versions:
    Application version............0.14.228

    *****************************************************

    Erasing...
    No device detected. (32)
    Programming did not complete.

     
    So it no longer complains about VDD, but it still won't recognize the target device. In essence, nothing changed.
    #4
    ric
    Super Member
    • Total Posts : 23581
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: ATmega32 w/ PICkit 4 + MPLAB X IPE - connection/programming problems 2019/06/14 15:23:33 (permalink)
    0
    I have to ask what may be a stupid question.
    Is there any chance you have the PK4 connections mirrored?
    i.e. 8 -> 1 rather than 1 -> 8 ?
     

    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!
    #5
    Richard Rasker
    Starting Member
    • Total Posts : 66
    • Reward points : 0
    • Joined: 2013/02/14 09:03:07
    • Location: 0
    • Status: offline
    Re: ATmega32 w/ PICkit 4 + MPLAB X IPE - connection/programming problems 2019/06/14 15:33:08 (permalink)
    0
    This is a completely legitimate question, but no, I didn't accidentally swap connectors on either side.
    When I pull out the connector on the PICkit 4 side just a little bit, and measure the voltage on pin 2 (the one right next to the indicator arrow) with respect to the voltage on pin 3, I read 4.99 volts.
     
    In other words: the PICkit 4 device most definitely gets a VDD of +5V between pins 2 and 3. It somehow isn't recognized as such, though.
    #6
    groschh
    Starting Member
    • Total Posts : 35
    • Reward points : 0
    • Joined: 2009/09/17 01:29:18
    • Location: 0
    • Status: offline
    Re: ATmega32 w/ PICkit 4 + MPLAB X IPE - connection/programming problems 2019/06/29 05:32:10 (permalink)
    0
    Hi Richard,
    did you solve the Problem with the message "The VDD voltage desired is out of range. It is below the minimum voltage of 1.5V.
    Connection Failed"
    I have exactly the same message but with the ATMEL-ICE!
    I guess that sounds like a BUG in MPLABx rather than a hardware issue.
    regards
    Heiko
    #7
    Richard Rasker
    Starting Member
    • Total Posts : 66
    • Reward points : 0
    • Joined: 2013/02/14 09:03:07
    • Location: 0
    • Status: offline
    Re: ATmega32 w/ PICkit 4 + MPLAB X IPE - connection/programming problems 2019/06/29 05:54:02 (permalink)
    0
    Hello Heiko,
    No, I haven't found a solution yet for the problems with the Atmel controller.
    On my last attempt, I did notice a yellow circle next to the device name in the IPE, signaling that the device is not (yet) fully supported, so I gave up trying until it gets the green light.
     
    For the time being, I'll have to depend on another party who still have a fully functioning Atmel development and programming environment -- which is a bit of extra hassle, but then again, it saves me the time of programming batches of products.
     
    #8
    groschh
    Starting Member
    • Total Posts : 35
    • Reward points : 0
    • Joined: 2009/09/17 01:29:18
    • Location: 0
    • Status: offline
    Re: ATmega32 w/ PICkit 4 + MPLAB X IPE - connection/programming problems 2019/06/29 07:46:55 (permalink)
    0
    OK,
    thank you for your post.
    Would you think it makes sense to report this bug to microchip and issue a ticket?
    I'm very keen to switch from AVR Studio 7 to MPLABx IDE as I'm a "microchip native" wink: wink
    Maybe it heals on its own with versions 5.20++ ...
    post edited by groschh - 2019/06/29 07:48:23
    #9
    Richard Rasker
    Starting Member
    • Total Posts : 66
    • Reward points : 0
    • Joined: 2013/02/14 09:03:07
    • Location: 0
    • Status: offline
    Re: ATmega32 w/ PICkit 4 + MPLAB X IPE - connection/programming problems 2019/06/29 08:25:09 (permalink)
    0
    Would you think it makes sense to report this bug to microchip and issue a ticket?

    The ATmega32 device is not yet marked as fully supported, so Microchip is probably already aware of issues. Then again, maybe they'll be more inclined prioritize this if tickets are received about this one.
    In my experience, tickets are addressed quite fast, even if only with a simple reply stating that they're already aware of or even working on the issue.
     
    Of course I have no insight in current development priorities within Microchip, but I'm under the impression that they're running ahead of themselves, creating new products while somewhat neglecting to implement support for older stuff.
    #10
    Nereo
    New Member
    • Total Posts : 10
    • Reward points : 0
    • Joined: 2007/11/06 09:25:35
    • Location: Germany
    • Status: offline
    Re: ATmega32 w/ PICkit 4 + MPLAB X IPE - connection/programming problems 2019/08/19 12:31:33 (permalink)
    4 (1)
    Hello All,
    I was testing the first Atmega 2560 and I had the same error. While 8 bit MCU it could be the same voltage readout problem.
     
    I have played a little with the bench power supply to test the PICKIT 4 voltage readout. I have seen that if you set the board voltage slightly higher than 5V (I have tested at 5.1V and 5.2V) the programming error was gone and the device got programmed. 
     
    I would assume that the programmer is doing a simple test on 5V, and if it is lower it throws the error message.
     
    I have tested also the board by 3V just to check the voltage that was reported back from the programmer. At 3V the programmer could report the "right" voltage read out, while for 4.93V was reporting 4V.
     
    I think the system team are testing their setup with a voltage which is slightly higher than 5V and they have not seen the problem.
     
    Ciao,
     
    Nereo
     
    #11
    Xelrebrus
    New Member
    • Total Posts : 21
    • Reward points : 0
    • Joined: 2010/08/08 22:39:13
    • Location: 0
    • Status: offline
    Re: ATmega32 w/ PICkit 4 + MPLAB X IPE - connection/programming problems 2019/08/20 19:01:01 (permalink)
    0
    I'm working with an atmega2560 as well and I'm having the same issue. "The VDD voltage desired is out of range. It is below the minimum voltage of 1.5V. Connection Failed." I can verify setting my bench power supply to 5.2volts allows pickit 4 to read but then it throws the error "Wrong signature, expected 0x1E 0x97 0x05, got 0x1E 0x98 0x01" and goes back to the previous error. Any updates? I'm using my pickit 4 to flash the firmware to two mks 3d printer boards, the atmega1284p board flashes no problem, (and is much easier to use than avrdude). Hoping they fix the bug soon. 
    #12
    judd
    New Member
    • Total Posts : 10
    • Reward points : 0
    • Joined: 2019/04/15 22:30:22
    • Location: 0
    • Status: offline
    Re: ATmega32 w/ PICkit 4 + MPLAB X IPE - connection/programming problems 2019/08/21 06:22:57 (permalink)
    0
    A workaround is to edit the .PIC file in the DFP:
    install-path/packs/Microchip/ATmega_DFP/<version>/edc/<device>.PIC
    Lowering the "minvoltage" field should make it work
     
    <edc:Power>
    <edc:VDD edc:maxvoltage="5.5" edc:minvoltage="4.5" edc:nominalvoltage="5.000"/>
    </edc:Power>
    #13
    Richard Rasker
    Starting Member
    • Total Posts : 66
    • Reward points : 0
    • Joined: 2013/02/14 09:03:07
    • Location: 0
    • Status: offline
    Re: ATmega32 w/ PICkit 4 + MPLAB X IPE - connection/programming problems 2019/08/23 00:58:13 (permalink)
    0
    This is of Not Good - what's the use of voltage checks if they sometimes(!) give the wrong numbers? It also reminds me of the issue I had with PIC12F508 devices, where Vpp would not reach the required 12 volts minimum value (I got 10.3 volts max), resulting in programming failure.
     
    With regard to my original problem: I found someone with an old programmer and dito software who could update the boards for me, so my problem is solved for the time being.
     
    Thank you for researching the issue and your feedback,
     
    Regards,
     
    Richard
    #14
    Jump to:
    © 2019 APG vNext Commercial Version 4.5