Barebones setup misbehaving

Hi all,

I wanted to try doing a standalone project, so I set out to get everything set up properly using the blink program to test it. After seeing that the LED was not blinking, I checked the wiring again... and again. I can't seem to find any differences between my setup and the tutorial on this site. I know the software is fine because it works when the board is on the arduino platform. Maybe a fresh set of eyes can. Anything stand out to you all?

To be specific, I'm using an ATMEGA328 chip that came directly from an UNO board.
The barrel connector has 12V coming in - it goes into the 7805 voltage regulator which outputs 5V.
You can see that the board is getting power (shown by the power indicating LED), but the LED connected to pin 19 (digital IO 13) is not on. I realize it's a blink program, so to clarify, it doesn't come on at all.

Are you sure the crystal caps are 22pF.

One of them seems to be connected to 5volt.
Leo..

Did you bootload a replacement 328P first?

I used the site tutorial in 2012. Here is a better one with better software.

You should have a bypass cap (0.1uF) close to the power pins of the Atmega. Maybe even two, one on each side of the BB. (And as Wawa pointed out, both the crystal caps should go to ground).

Do you really need it to run at 16MHz? I create all my barebones Arduinos to run at 8MHz using the internal clock.

...R

Hi,
Why have you got pin 21, Vref connected to 5V?

Tom... :slight_smile:

And add in those 100nF ceramic decoupling caps for Vcc and AVcc, they are never optional.

Just a very minor suggestion when using breadboards. Get into the habit of using RED jumpers when connecting to the + power rail and BLACK jumpers when connecting to the - rail. It makes it much easier to double check your wiring.

Hi again,

Very sorry that it took so long to reply, there were no notifications set up and I was struggling to get back to the page.

@Wawa, the picture is misleading but it is in fact connected to ground.

@GoForSmoke, I'm not totally sure what you mean by "replacement 328P".

@PaulRB, thank you for the suggestion, I will add those caps. The tutorial I was looking at on this site did not include those.

@Robin2, I added the 16 MHz at a friends suggestion. So the 328 has an internal 8 MHz clock?

@TomGeorge, I attached the 328 pinout that I've been referencing, leading me to believe that this was a pull-up resistor attached to the reset pin, pin 1.

@Due_Unto, appreciate the advice. At the moment, I'm just using what I've got handy.

Thank you all again for your replies and sorry once more for the delay in my response.

Michael

Atmega328-pinout.png

The Uno has a socket so you can develop your project on the Uno Development Board then take the programmed chip out to run stand-alone in the project.

Then you bring out a new 328P that has a bootloader burned in and pop it into the Uno socket to develop the next thing.

  • Bootloader is what lets the Uno program the chip through serial RX/TX instead of the SPI port.

  • You can bootload bare AVR chips on a breadboard using your Uno as a programmer or buy a $15 FTDI cable or like.

I just bought bare 328P's for $2.14 each. The Uno ran me $25. I can wire a socket and run a 328P as long as I have clean power and a bypass cap or 2, it is a complete computer

The O'Baka Arduino has components soldered right to the chip pins and still plugs in breadboards, but I like sockets. How you make standalones likely involves a board of some kind, just by the odds and with a lot of connections it is cleaner & easier.

FWIW if you're ever stuck, many Arduino selling stores will sell bootloaded 328P's for about $5 ea. Buy 25 328P's from Mouser, price drops to $1.97 ea but you must bootload ones to use on Uno.. and maybe sell a few.

Robin2:
Do you really need it to run at 16MHz? I create all my barebones Arduinos to run at 8MHz using the internal clock.

...R

You get 3.3V compatibility that way and 2 extra pins, all 8 pins on Port B open which can't be done on Uno/Nano/etc.

For most projects, 8MHz is still overkill.

But I have a taste of 24MHz and SD cards capable of way more speed. It's possible with AVR!