user55213: 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

user64075: A detailed how to is here its for the ATMega16 but check connections with the circuit diagram. 

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

55213: <p>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</p>
 64075: <p>A <a href="https://hardwarefun.com/tutorials/use-arduino-as-an-isp-programmer-to-program-non-arduino-avr-microcontrollers" rel="nofollow noreferrer">detailed how to is here</a> its for the ATMega16 but check connections with the circuit diagram. 
<a href="https://i.stack.imgur.com/VI9vw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VI9vw.png" alt="Flash ATMEGA16 with UNO"></a></p>

<p>Use this command for backup of flash </p>

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

<p>Backup EEPROM (just in case there is something stored there)</p>

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

<p>and this for writing the new bootloader / backup back</p>

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

<p>and this for EEPROM writing back</p>

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

<p>As your avr-dude outputis </p>

<pre><code>lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
</code></pre>

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