Serial Programmer Atmega328p

I'm trying to design a super cheap programmer. I have a USB to RS232 adapter, and a Max232 chip. I used http://chuckontech.com/?p=147 as a guide to configure my Max232, I also put the chip in echo mode (connecting pins 9 and 10 together), sent commands with Putty and got them back. Now I am trying to tie the Max232 to the TXD and RXD pins of my Atmega328p to program it, but it does not seem to work. It is a blank IC (no bootloader or anything). I've tried using AVRDude to write to the chip, read from it, and even erase it, but I cannot seem to get communication going between my computer and the Atmega. Can someone help me out with this? Could my Atmega328p be bad?

"It is a blank IC (no bootloader or anything). "

Need a bootloader first or it won't talk to the serial port for sketch downloading.

Bootloader is installed over the SPI pins: SCK, MISO, MOSI, Reset, +5, GND.

You can't upload sketches to the serial port if you don't have a bootloader installed.

If the USB-to-Serial chip you have is an FTDI chip like on the Arduino Diecimila or Duemilanove then you might be able to use the FTDI chip as a "bitbang" serial programmer: Arduino Playground - AvrdudeFTDIBitbang

It's going to be hard to produce a programmer that can sell for less than $4 like the USBasp programmers available from HongKong. Yes, that $4 includes shipping to the USA:

But if you do, you can deliver a lot faster then delivery from China.

I was under the impression that the boatloader was only needed if you wanted to program wit the Arduino IDE. If I just want to upload HEX files made from AVR-C with AVRDude I still need a boatloader installed?

You would load that HEX file thru the same SPI pins as installing a bootloader: SCK, MOSI, MISO, Reset, +5, GND, using an AVR ISP programmer and the IDE's File:Upload Using Programmer selection (or perhaps AVRDUDE can do that too).
Easier (in my opinion) to just select File:Upload Using Programmer in the IDE after compiling/error checking.

Makes perfect sense now, thanks for the clarification!

I finally got my USBASP (the one from China never came so I ordered one from within the US) but now I am having trouble with it. I connected it and got the drivers installed, but when I tell AVRDude to use it, it comes back and says: avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc
When I go into device manager and look at the properties of the USBASP it does indeed have vid 0x16C0 and pid 0x5DC, so I am not sure what the problem is.

Which one did you get?

http://item.mobileweb.ebay.com/viewitem?itemId=170912513888

You may have to add an entry to programmers.txt.

This is what I needed for this programmer:
http://www.mdfly.com/index.php?main_page=product_info&cPath=5&products_id=415

usbasp.name=MDFLY
usbasp.protocol=usbasp

I don't know what it'd be for yours.

That didn't do anything. I've tried burning the bootloader with the Adruino IDE, I've even tried running AVRDude from command prompt just sending the erase command. Is there something I can do to test my programmer to make sure it is even working? Like I said before Windows 7 detects it fine and the drivers are installed.

neo55378008:
That didn't do anything. I've tried burning the bootloader with the Adruino IDE, I've even tried running AVRDude from command prompt just sending the erase command. Is there something I can do to test my programmer to make sure it is even working? Like I said before Windows 7 detects it fine and the drivers are installed.

You could ask AVRDUDE to list some signatures of the chip:

avrdude -p m328p -c usbasp -U lock:r:lock.txt:h -U efuse:r:efuse.txt:h -U hfuse:r:hfuse.txt:h -U lfuse:r:lfuse.txt:h -U signature:r:signature.txt:h

I'm not sure whether you need to specify the port for a USB device (-P usb).

Still nothing :-/
I also noticed if I launch AVRStudio and open its burning tool it does not list anything but the virtual testing tool.

I plugged my programmer into a Linux machine and tried running it from there, same error. So it doesn't seem like a driver issue. Could my programmer simply be bad?

This one works?

avrdude -p atmega328p -c usbasp -P usb