Is it possible to read a program off the Atmega 16

I am new to Arduino and have a programmed ATmega 168 but would like to download the program from the chip and save it before modifying it.

If so, how do you do it????

You'll need a programmer. But don't expect what you suck out of it to look anything like what you programmed.

The short answer is no :)

Compilation is effectively a one way process. You can't get back the code that was written into the IDE. You could use it to reprogram the arduino with the same code at a push, but you can't get back anything that will look like what went in.

Would that be a human or software programmer???

Does the Arduino software do this???

Bare bones AVR/Arduino programmer :

http://cgi.ebay.co.uk/USBtinyISP-Programmer-For-ARDUINO-Bootloader_W0QQitemZ140365347991QQcmdZViewItemQQptZLH_DefaultDomain_3?hash=item20ae6d3c97

Thanks Pluggy..

Do you need special software??

I've just used one for burning the bootloader which is built into the IDE,

AVRdude which is freely available would probably be able to pull the contents of the Flash out and save it.

I thought the ability to read back the contents of flash memory depended on the setting of the lock bit(s). If set then contents cannot be read back. Erasing the lock bits also erases the flash contents, so it's purpose was to allow a form of copy protection. At least that was my understanding and I've not researched if the Arduino IDE locks the flash contents after uploading?

Lefty

I would like to know how can I upload the code inside in arduino to my PC...

I put the code in arduino and after that my computer was formatted by me by error... and I have lost all code .....

thanks

I would like to know how can I upload the code inside in arduino to my PC...

I put the code in arduino and after that my computer was formatted by me by error... and I have lost all code .....

thanks

Everything you can read off an AVR will be compiled machine code, so the best you will get is Assembler. Working out how this translates back into C/library calls will be hell.

Rewrite it better!