ATmega328 on breadboard (8MHZ internal oscillator)

Hi there,

I've set up a bare 328 on a breadboard as per the instructions on the ITP and Arduino websites, but I can't upload any sketches to it. I've been trying with blink, but I always get this error code:

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I have burned the appropriate bootloader onto the chip, the most recent drivers for my USB - serial adaptor are installed, the correct serial port and board type are selected in the Arduino IDE, and the wiring is all fine.

Does anyone have any idea what I should be looking for?

Thanks,
Bowlerhat

Are you using an FTDI cable or something similar? How is the interface to the PC wired? Could be a wiring or connection issue, that is the same response I get from the IDE when I have an FTDI interface board connected to the PC but not connected to an MCU.

I'm using a cp2102 usb to uart bridge controller driver to connect between my AVR and my PC, I have 5v and gnd hooked up to the appropriate pins, and tx and rx are connected as well.

bowlerhatman:
I'm using a cp2102 usb to uart bridge controller driver to connect between my AVR and my PC, I have 5v and gnd hooked up to the appropriate pins, and tx and rx are connected as well.

I suspect you have no auto-reset wired up from the serial cable to the processor chip, your serial cable may not even provide the DTR signal required for that function? You will have to manualy press and release a reset button (does your breadboard set-up have a reset button?) at just the correct moment for the upload to work. Mine works if I press and hold reset button down and release it just as the IDE reports the completed compilation code size, I then release the reset button and the upload completes.

Lefty

Yeah, there's no autoreset on my converter, but I do have a manual reset button. I tried your timing suggestion, but to no avail. I also tried putting a crystal and 2 22pf caps onto the xtal pins, but that made no difference either, as expected.

I just found a way to provide auto-reset with a cheap cp2102 usb to serial converter breakboard:

This require a bit of soldering, but at least it's not directly on the chip pins.
Worked for me, less than $5 on ebay, hope this help ...

Which part of the circuit is that connected to? I can't make it out, and our boards seem to be slightly different in layout.

It's connected to the pin that light a led, I don't know if it will work for you if you're not having the same design.
Do you have a led on your board ?
Does it flash briefly when you upload a sketch from the Arduino IDE ?

Did you set the correct fuses ? The stock UNO chips come with 0xff 0xde 0x05 which sets the external clock.
If the clock is not correctly set, then you will not be able to upload stuff.

I burnt the Uno bootloader to it, do I need to reset the fuses as well? If I do, which ones need to be where?

Thanks,
Frazer.

The fuses are the ones who will select, among other things, the clock source.
And don't forget to bootstrap with the PRO 8MHz hex.

I can't put my hand on fire but I think this will do: 0xE2 0xDA 0xFD.
You should use a calculator and Google that for more information.