Connecting a USBtiny to an atmega328

Okay I'm trying to connect the 6-pin header from a usbtiny to an atmega328 directly via a breadboard and uploading a sketch. However I am getting the "initialization failed=rc-1" error.

I have tested the usbtiny which uploads to an arduino just fine. I also tested the atmega in an arduino and that worked fine too. I've also triple checked the wiring.

However, I did not wire up a separate voltage regulator, oscillator or any leds to reduce potential problems (because I suck at wiring). The only thing I did on the breadboard is wire up pin 1 to a resistor and pushbutton. I figured since the power is being supplied by the usbtiny it shouldn't need anything else. The vcc and gnd pins are connected to the +5v and gnd rails on the breadboard and the atmega's vcc, avcc and gnd pins are connected to those rails. Reset, MOSI, MISO and SCK all connect to the female pin header via jumper cables.

Am I wrong to do it this way? Is it actually possible to upload a sketch to the atmega using just the 6 pins?

Thanks very much

I figured since the power is being supplied by the usbtiny it shouldn't need anything else.

Bare bone stuff can be a real pain, been there.

I believe your statement is only correct for virgin chips where the internal oscillator fuse has not been set to external. Of course, all 16MHz Arduino have external oscillators.

Some UNO ArduinoISP sketches (Adafruit, Gammon) provide a pseudo clock to avoids this pitfall.
Build up a breadboard worth ZIF and stick an old 8 or 16 MHz xtal on the board, etc.

Ray

Thanks! Okay I will add the oscillators and give it a go. I will reward myself and replace the female socket with a ZIF once I get it working.

It worked!! Turns out I only needed to connect the oscillator. This is the first time I have managed to get the chip to do anything on its own. Now I feel more confident about freeing myself from arduino. :smiley: