5

Okay 2 questions. If I am to replace the Arduino with an ATmega328 programmed with a standard blink on pin 13, is this configuration correct, do I still need oscillators and whatnot?

Simple breadboard circuit with LED on pin 13 of ATmega328

Second question is, what is the max voltage I can power the ATmega328 with without frying it? I have seen conflicting answers of this on the net. Some have said 5V while some say 6V can someone clarify?

5
  • Always go to the official source: mouser.com/pdfdocs/Gravitech_ATMEGA328_datasheet.pdf (page 18)
    – Jasmine
    Jan 8, 2015 at 16:26
  • @Jasmine alright it says 1.8v - 5.5v. okay thats one down. Then is this a possible way to hook up an atmega328 in place of the arduino?
    – suckms
    Jan 8, 2015 at 16:36
  • Check this question: electronics.stackexchange.com/questions/53713/…
    – Craig
    Jan 8, 2015 at 16:38
  • 1
    My advice would be to research a standard board like Arduino, and keep what you feel is necessary. For example, keep the voltage regulator, but remove the blink led.
    – xyz
    Jan 8, 2015 at 17:43
  • You also need to connect the other GND (pin 22) and the AVCC (pin 20).
    – Gerben
    Jan 8, 2015 at 19:07

3 Answers 3

3

The datasheet describes the electrical and clock requirements of the chip, and AVR042 describes the external hardware configuration required. Decoupling, analog voltages, external crystal or oscillator if required.

2

If you take a look at the Standalone Arduino on the Arduino website, then this is what you require:

Standalone Arduino

Note that there is one slight error in the guide, which I have highlighted here, Arduino Standalone - photo shows incorrect pin wired to MOSI.

There is a video on how to achieve, more or less, the same thing, 1-Day Project: Build Your Own Arduino Uno for $5.

3
  • 1
    You only need all that if you're trying to replicate an Uno. The chip itself is fine with very few external components, all supply-related. Jul 31, 2015 at 20:46
  • @IgnacioVazquez-Abrams - Good point. I was going to update my answer later - with the minimal setup (the timing caps etc. in lieu of the xtal) - but time isn't on my side currently. ;-) Jul 31, 2015 at 20:56
  • @IgnacioVazquez-Abrams - I think I'm going to delete this answer, as it is wrong and Nick's answer is the right one. Mine is just cluttering up the question :-) Aug 1, 2015 at 7:40
2

I have a page describing How to make an Arduino-compatible minimal board. The minimal setup would be:

enter image description here

That excludes the circuitry for uploading your code.

By the way, in the image in the question you have an LED with no resistor. That will damage both the LED and the Atmega328. You need a current-limiting resistor.


do I still need oscillators

Not if you program the fuse to use the internal oscillator.

Some have said 5v while some say 6v can someone clarify?

The datasheet says 1.8 to 5.5 V operating range with an absolute maximum rating of 6 V.

This is what the datasheet says about absolute maximum ratings:

This is a stress rating only and functional operation of the device at these or other conditions beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.

Page 2 of the datasheet says:

  • Operating Voltage:
  • 1.8 - 5.5V
6
  • 1
    That is poor positioning of the decoupling capacitors since there are large high-frequency loops. Also, the distance between the ground pins means that some of the peripherals on the chip will have a slightly different ground potential. Jul 31, 2015 at 22:07
  • Ach, I knew I should have re-taken that photograph! I'll get onto it. The other photo currently posted seems to have the caps even further away though. :P -- I'm not sure what you mean by the distance between the ground pins. What would you do differently there?
    – Nick Gammon
    Jul 31, 2015 at 22:16
  • I use a very short wire going directly over the chip to connect them. Jul 31, 2015 at 22:17
  • I've redone the photo with the decoupling capacitors adjacent to the pins. I haven't put the short wire in, as I think that would just make the photo look cluttered. I'm not sure if the different ground potential for analog ground would make a lot of difference to the operation, perhaps the ADC readings would be affected slightly.
    – Nick Gammon
    Jul 31, 2015 at 23:10
  • It's not "analog ground", it's ground for the peripherals that happen to be on that side of the die. Aug 1, 2015 at 0:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.