Now we’re going to invoke the Avrdude command to do something; in this case copy the flash contents of an ATmega328p chip to a file named “flash.bin” in the current directory.
In the screenshot we see the command being invoked. avrdude runs the command, while -p m328p tells Avrdude we’re programming an ATmega328p chip.
-P tells Avrdude where to look for the USB programmer. On my Linux computer, it’s at /dev/ttyUSB0.
On Windows, the command used is based on the programmer being used. If it’s USB-based, than you can put usb after -P, if it’s on a parallel port it’s probably LPT1, or if it’s serial, COM1. If you can’t find it, you can always look in Device Manager to find out.
OSX users have it tough. If you have the Arduino IDE installed, look under the serial ports option and see where your Arduino is…..
The stuff after -c is the programmer you’re using. For the ISP Shield 2.0, use avrisp. Look at the documentation on yours to find out.
Penultimately, the number after -b is the new baud rate. I could only get the ISP Shield 2.0 on a Duemilanove to work with a rate of 19200. Common baud rates also include 9600. Leave this option off and see if it works. If it doesn’t work, and you have the right programmer location, try the two above. Otherwise, Google is your friend.
And finally -U flash:r:flash.bin:r is the command for reading the flash memory and saving it in raw format to “flash.bin”. Replacing flash:r:flash.bin:r with flash:w:flash.bin will write the contents of “flash.bin” to the chip