0

I have an ATMEGA16 lying around that was in an old robot I'd bought. It was in a socket, so I pulled it out and was thinking of using this page to use it with Arduino IDE. Is there a way for me to backup the chip's current state, so as to be able to restore it if I mess up? I don't have an SPI programmer with me, but I do have a Arduino Uno available at hand

1
  • Comments are not for extended discussion; this conversation has been moved to chat. Commented May 1, 2020 at 18:57

1 Answer 1

1

A detailed how to is here its for the ATMega16 but check connections with the circuit diagram. Flash ATMEGA16 with UNO

Use this command for backup of flash

 avrdude -c avrisp2 -p m16 -P /dev/ttyUSB0 -b 115200 -U flash:r:Old_flash_backup_file.hex:h 

Backup EEPROM (just in case there is something stored there)

avrdude -c avrisp2 -p m16 -P /dev/ttyUSB0 -b 115200 -U eeprom:r:eeprom_backup_file.hex:h

and this for writing the new bootloader / backup back

 avrdude -c avrisp2 -p m16 -P /dev/ttyUSB0 -b 115200 -U flash:w:New_BootLoader.hex:i -v

and this for EEPROM writing back

avrdude -c avrisp2 -p m16 -P /dev/ttyUSB0 -b 115200 -U eeprom:w:new_eeprom_file.hex:h

As your avr-dude outputis

lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

there seems to be no lock on the chip. As you are on LINUX when reading youhave tospecify the format :h hex when reading

1
  • Comments are not for extended discussion; this conversation has been moved to chat. Commented May 1, 2020 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.