How can make HVPP for Atmega644A-PU Whit Arduino Mega r3 or Atmega328p

Go To Last Post
24 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This my Story, I was using an atmega 644A-PU, i was try writing the fuses but the atmega is bloquet, now i need using HVPP but i dont have idea hwo make that.

i was try whit external clock pulse from 1mhz, 8 mhz, but the usb asap isn´t work
I already read the recovery forum but it doesn't work

i was try modifi the fuses for using ext clock from 16mhz crystal afther this the MCU doesn't work  
anyone can help me whit sketch for HVPP pls 
my error in usbasp is.... 

 

avrdude.exe: set SCK frequency to 32000 Hz
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: error: program enable: target doesn't answer. 1 
avrdude.exe: initialization failed, rc=-1
             Double check connections and try again, or use -F to override
             this check.
 

the connections is fine and i was try use -b 10 too

pd: sorry for the broken english but isn't my first language   

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i was try whit external clock pulse from 1mhz, 8 mhz,

Where did you feed to clock into? How is the chip wired? HVPP is extremely rarely required.

 

1MHz clock with a 125KHz programming clock frequency is usually all that is required unless the hardware is a mess which in some cases it is.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

“Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?” - Brian W. Kernighan
“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” - Antoine de Saint-Exupery

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i used an oscillator circuit with 555 but after that i used a this C program

#include <avr / io.h>

int main (void) {
    DDRB = 0xFF;
    while (1) {
        PORTB ^ = 0xFF;
    }
}

 

 i used an atmega 328p whit clock/div8 and tried whitout it   1Mhz and 8mhz, i used pin XTAL 1 and i used Frecuency 32khz to 125khz in usbasp
the usbasp is working with him i can program in the 328p

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

An ATmega644 has a dedicated RESET pin, so I don't think it's possible to mis-program it in a way that requires HVPP...

 

Also, I don't think an ATmega328 has enough pin to be become a HVPP programmer.  (it'd be close.  I count 18pins for the connections to the 644, and you probably need 2 for talking to the serial port to issue commands, which is the full 20 pins available on a Uno.)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:
An ATmega644 has a dedicated RESET pin, so I don't think it's possible to mis-program it in a way that requires HVPP...

does it not have a fuse to disable the RESET function ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:
An ATmega644 has a dedicated RESET pin, so I don't think it's possible to mis-program it in a way that requires HVPP...
This.

 

You simply cannot have done anything to that chip that would make it uncontactable using ISP. There is no reason on earth you need HVPP.

 

Make sure you read the link in #3

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

westfw wrote:
An ATmega644 has a dedicated RESET pin, so I don't think it's possible to mis-program it in a way that requires HVPP...
This.

 

You simply cannot have done anything to that chip that would make it uncontactable using ISP. There is no reason on earth you need HVPP.

 

Make sure you read the link in #3

 

i was read that post, but doesn't work,i don't know how have a blocked, I think it was some interference while writing the fuses

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ivan Anistro wrote:
 I think it was some interference while writing the fuses

What fuse values were you writing?

It would help if you can post a clear picture of your setup.

Jim

 

 

Keys to wealth:

Invest for cash flow, not capital gains!

Wealth is attracted, not chased! 

Income is proportional to how many you serve!

Lets go Brandon!

Last Edited: Mon. May 17, 2021 - 07:05 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

post a clear picture of your setup.

Maybe I wasn't clear enough in my post above #2 cheeky

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ivan Anistro wrote:
i used an atmega 328p whit clock/div8 and tried whitout it   1Mhz and 8mhz, i used pin XTAL 1 and i used Frecuency 32khz to 125khz in usbasp
the usbasp is working with him i can program in the 328p

your Mega328 clock source chip should be running at at least 8MHz to make sure the actual clock signal that is output will be 1MHz or more.

So if you ran it with the internal RC oscillator the clkdiv8 fuse should be cleared for sure to let it run on the 8mHz clock source. You have not mentioned that the 328 Clock source chip actually runs on the internal RC or if you have an external ocsillator attached.

Keep in mind that the Mega644 also has a Clkdiv8 fuse. So when you feed it with 1MHz of an unstable source the programming frequency should be below 125KHz.

Now the Mega644 has JTAG and as such you can disable the ISP interface. In Atmel studio you will get loads of warnings, but if you made a mistake in the fuse settings you might have disabled that. If you have a JTAg ice you could try to connect that and see if you can talk to it that way.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:

post a clear picture of your setup.

Maybe I wasn't clear enough in my post above #2 cheeky

 

unfortunately I do not have a photo of the fuses, I had asked for confirmation to return to the C0 fuse, I said no but the avr did a load

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My 328p has the div8 fuse on high, its Frequency is 8mhz, I tried all the values that the usbasp allows me from 1khz to 750khz but still it does not allow me to connect with the 644p, I tried to put an external 16mhz crystal between xtal1 and xtal2, unfortunately I don't have a jtag,

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

unfortunately I do not have a photo of the fuses  

We want a photo of the hardware and a diagram not the fuses.

 

I tried to put an external 16mhz crystal between xtal1 and xtal2

That may not work. You need an external clock on Xtal1.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Make sure all the grounds are connected with each other.

“Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?” - Brian W. Kernighan
“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” - Antoine de Saint-Exupery

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

orange = reset

brown = miso

yelow = mosi

red = SKT

 

atmega 328p clock div/8 set on 1 8mhz 

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You must connect Avcc and Agnd even if not using the ADC.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Where are your decoupling capacitors?

 

See here...

 

https://www.avrfreaks.net/forum/...

 

...the principles are the same for all AVRs.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

...and on top of the above some chips will not program is the programming cable is too long as it is in your case.

 

...and you MUST wire up VCC and GND to the ISP connector.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If I think the blocking problem was due to the long cable vcc and gnd if they are connected to the isp
It had never affected me not to connect avcc aref even without the capacitors I was able to program the 328p and the 644A

 

I will still correct my circuit for future projects thx

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It had never affected me not to connect avcc aref even without the capacitors I was able to program the 328p and the 644A

surprise Yeah, I don' wear seat belts or use air bags in my car, what are the chances of me having an accident anyway......Or do you mean you NEVER read the data sheets for those products? Or in fact any other processor?

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ivan Anistro wrote:

It had never affected me not to connect avcc aref even without the capacitors I was able to program the 328p and the 644A

 

It's called luck. There are loads of posts here that fall into the 'It used to work but now it doesn't" category. And magically, in 99% of cases, when the design is done properly with the NECESSARY decoupling capacitors it all works again.

 

https://www.avrfreaks.net/forum/...

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:
It's called luck.

Also, if brown-out is enabled that would trip in the real world.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ivan Anistro wrote:

It had never affected me not to connect avcc aref even without the capacitors I was able to program the 328p and the 644A

Brian Fairchild wrote:
It's called luck. There are loads of posts here that fall into the 'It used to work but now it doesn't" category. And magically, in 99% of cases, when the design is done properly with the NECESSARY decoupling capacitors it all works again.

Indeed - the "Proven Product" Syndrome

 

http://www.8052mcu.com/forumchat... - not that links will need to be changed from "8052.com" to "8052mcu.com"

 

https://www.avrfreaks.net/commen...

 

https://www.avrfreaks.net/commen...

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...