How to flash the "atmega328" with AVRDUDE?
This seems to be quite a common problem, and there are a number of problems, each with their own solution.


Make sure you have selected the right chip
Make sure you have selected the right serial port (when you unplug your board, it should disappear).
Make sure you do not have anything plugged in to the tx &amp; rx pins (usually 0 and 1).
Make sure your Atmega chip has a bootloader on it
Try another cable
There may be a problem with your computer - try another computer
If using another helps, try reinstalling the USB serial driver
Try unplugging the Arduino board, holding down the reset switch, then plugging it in (still holding down reset); continue to hold down reset for about 5 seconds.
make sure nothing else is trying to use your serial port
Does your chip have a bootloader? Chips bought as part of an Arduino will, otherwise, it almost certainly doesn't, unless it specifically says (in the description of what you bought).


If it does not have a bootloader (or may not have a bootloader) you will need to set this up. You can either use the instructions here: https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard (which I never got working) or you can use an ICSP like the http://www.freetronics.com.au/products/usbasp-icsp-programmer-for-avr-arduino#.VlIY_2xifXs (which is what I use) - works great. They can be had for a few dollars from China.