I am unable to upload programs to the chip from the IDE using the circuit above. I have the correct COM port selected and the target board is set to Arduino Duemilanove w/ ATmege328 but I get the infamous avrdude: stk500_getsync(): not in sync: resp=0x00 error and the upload fails. The chip works OK when inserted into a Uno board and is working OK from the power supplied from the USB/TTL converter with a modified Blink program that I loaded on it when it was in my Uno.
The USB/TTL converter works when used to send/receive serial data using the SoftSerial library on a Uno.
So, any ideas ?
Have I missed something obvious (yes, I have checked and TX/RX are round the right way)
Does the Loopback test work with just the USB/Serial adapter?
Do you have DTR wired up also? (I can't open the links)
If not, will have to press Reset to make the chip listen at the correct time in the download process.
A picture of your set-up might also help. Just in case you made a connection snafu.
Do you have the power connected up properly? Pin 22 and pin 8 to ground and pin 7 and pin 20 to Vcc. They only show connections to pins 8 and 7. That might work, but personally I've never tried it that way.
I also generally use three 0.1 uF capacitors as well. One between pins 8 and 7, one between pins 20 and 22 and one from pin 21 to ground.
If everything else seems okay, do you have access to a scope to see if the crystal is oscillating? I've had bad crystals before.
Also, I know they say the bootloader is Duemilanove, but it might be worth it to try Uno as well.
Thanks for the replies. I have attached an image for the recommended wiring for anyone that can't open the links
To answer some of the specific questions
A picture of your set-up might also help. Just in case you made a connection snafu.
Attached. The jumper colours are carried through from the adaptor to the chip apart from GND which is brown on the adapter and black to the chip. Despite what it might look like in the picture there are not 2 red wires but one red, one orange.
Do you have the power connected up properly? Pin 22 and pin 8 to ground and pin 7 and pin 20 to Vcc. They only show connections to pins 8 and 7. That might work, but personally I've never tried it that way.
I only have power to pins 8 and 7 as in the circuit, but I have checked and the correct voltages are on pins 20 and 22 so the internal connections of the chip seem to be taking care of that.
I also generally use three 0.1 uF capacitors as well. One between pins 8 and 7, one between pins 20 and 22 and one from pin 21 to ground.
I will try that if my spares box has the right values in it.
If everything else seems okay, do you have access to a scope to see if the crystal is oscillating? I've had bad crystals before.
No access to a scope but the chip is happily running the Blink sketch and outputting HIGH/LOW to pin 19, which is the equivalent of the Arduino pin 13
Also, I know they say the bootloader is Duemilanove, but it might be worth it to try Uno as well.
I tried that, and several other AT328 boards, but no joy
Does the Loopback test work with just the USB/Serial adapter?
Can I do the test with just the bare chip ?
Do you have DTR wired up also? (I can't open the links)
If not, will have to press Reset to make the chip listen at the correct time in the download process.
The reset pin (chip pin 1) is attached to the adaptor reset pin. Do I remember correctly that pin 1 needs to be taken low when the uploading message appears in the IDE, then released ?
I am familiar with that USB to TTL board. The reset pin on it is actually the pin to reset the CP2102 chip on the board. I do not know why it is even brought out at all.
You need to find the DTR signal (I think it is pin1 of J2, but the silk screen on the bottom of the board will identify it) and run it through a 0.1 uf capacitor to the reset pin on the ATmega328. You will also need a 10K pull-up from the reset pin on the 328 to Vcc.
I removed the connection between reset on the chip and the converter and tied reset on the chip high through a 10K resistor. Hold the reset pin low whilst compiling and let it go high when the uploading message appears and uploading works a treat.
I may try the other suggestion of using DTR to make this automatic but I am happy that it works as it is. As you can imagine, the Ebay vendor will not be getting top marks in my feedback.
You can't ding the vendor on the CP2102 module.
Cutting the trace to the reset pin adding a wire from the pin to the DTR hole is an easy mod.
Or just add a pin in the DTR hole and move your wire to there.