MAX232, ATMega328, not in sync

So I finally got my ATMega328 chip in the other day and I was so excited to build my own arduino. I did a LOT of research, and all signs pointed to I can use the max232 to bootload my atmega. I did a loop test on my max232 using hyperterminal (after i did a loop test on my serial port) and i would get back what i sent. initial tests look good. So then it was time to get everything going. i used this site http://www.jameco.com/Jameco/workshop/JamecoBuilds/arduinocircuit.html to build my barebones arduino on my breadboard. So after building the circuit, I was ready to hook everything up. I connect my (crude) max232 circuit to my serial port, then connect the max to the atmega (via respective RX/TX lines) and open up the arduino program to bootload my chip. I set it for Arduino Duemilanove W/Atmega328 via COM1 (upon writing this, should it be com1 or should there be a selection for serial?) and then proceed to bootload. It starts up and initially it seems good, but I get that sync error. avrdude: stk500_getsync(): not in sync: resp=0x00 I did a little more research and found that you can pull reset pin high by using a resistor valued between 110ohm and 124ohm. That didnt work either. So i decided to go another route. I followed the steps here http://arduino.cc/en/Hacking/ParallelProgrammer And tried that. I got the error that it couldn't find the giveio program and failed to open port 1pt1. So, yea. I'm kinda lost. I keep doing research and finding troubleshooting options only to come up with...none of them seem to work. Am I doing something wrong? I have a feeling it's gotta be with max232 and where its connected. Max232 Atmega328 pin12 pin2 pin11 pin3

Any help would be greatly appreciated!

I was not aware that you could load the bootloader on to a chip using RS232.

As far as I am aware the bootloader has to be loaded through the SPI pins using another microcontroller, and the serial is only for uploading sketches.

I think the confusing bit on that page is:

If your ATmega328 chip is preprogrammed, you should be in business! If not, there are a few more steps necessary to program it.

By "programmed", I think they mean "has a sketch uploaded to it", not "has the bootloader installed".

You will need to use another Arduino to install the bootloader (see the many tutorials on doing this around the place).

Eh, I thought that might be the case. Oh wellz. I don't have a HEX inverter so I won't be going down that road. I'm getting my arduino uno this weekend so in the least I have two ATMega328's I can interchange (and PROGRAM without hassle...or, at least, much hassle). It was a fun experience up to this point. Now time for the real deal :D Much thankso!

gtr_stitch: Eh, I thought that might be the case. Oh wellz. I don't have a HEX inverter so I won't be going down that road. I'm getting my arduino uno this weekend so in the least I have two ATMega328's I can interchange (and PROGRAM without hassle...or, at least, much hassle). It was a fun experience up to this point. Now time for the real deal :D Much thankso!

You can use the arduino as a programmer it's very simple thing to do. You will have to burn a bootloader onto those existing 328's before they can be programmed in the arduino and at that point you can program them via the max232's as well.

it couldn't find the giveio program

Did you install giveio? (Direct download link: http://web.mit.edu/6.115/www/miscfiles/giveio.zip) A parallel programmer would probably be the easiest way to burn the bootloader IMO (without an actual programmer).

Why do you need Giveio?, if the serial port apears in the Arduino IDE then you don't need giveio. The ideal reset pull up resistor is 10k, are you using the rts line on the serial port to pull the at328's reset down, you don't really need the rts line as when you press compile on the IDE wait for the sketch size to apear then reset the at328 with a pushbutton this circuit is not mine but is similar in that it uses rts line to reset Arduino

this circuit is not mine

Thank goodness for that, dead set that's about the worse schematic I've ever seen. I've saved it for my "hall of (in)fame" artical I plan to write one day :)


Rob

Oh my god! That is fantastic!

Never in all my life have I seen such a beautiful work of art as that schematic!

Amazing!

(leaving sarcastic mode)

It's about normal for Eagle users :P

Why do you need Giveio?

Giveio lets avrdude and other utilities talk to the parallel port, which, according to OP, isn't working.

Yeah i know the schematic was bad, i pulled it off the internet to demonstrate the use of the rts line to reset atmega

It's about normal for Eagle users smiley-razz

Unfortunately that's true, there seems to be something about Eagle that almost forces you to draw a bad schematic. I know it's often used by newbies and that would explain a lot, but I've seen "professional" schematics drawn in Eagle that were just atrocious.

I'm not joking about the article, I'll have enough material soon :)


Rob