Confusion with ATmega328P and 3.3V/8MHz

If you are using an LED to indicate that your sketch is running, then that may be the problem.

For example, if you have a fairly average red LED, it might have a forward voltage of 2.0v @ 20ma (refer to your spec sheet for your particular LED). Putting these values into the LED calculator, it would tell you that you need a 150 ohm resistor. You might have tested this, and seen the LED light up.

Then, if you drop the voltage to 3.3v, your LED might be either very dim, or (more likely!) not light up at all. Putting 3.3v into the same web page, it shows you need a smaller resistor, 68 ohm, for the same LED.

P.S. - I just noticed your paragraph about the green LED - a "true green" LED might have a voltage drop of 3.3v, which means for 5v you would need a 100 ohm resistor (as described in your paragraph); for a 3.3v supply you would need a 1 ohm resistor instead. This is pretty certainly your problem


It was a brownout fuse problem.

Changing boards.txt from:

atmega328bb.bootloader.extended_fuses=0x05

to

atmega328bb.bootloader.extended_fuses=0x02

solved it for me (*).

The chip and red LED now work at 3.01V (1xAA alkaline and 1xAA rechargeable) and 3.19V (2xAA alkaline).

(*) not sure why I had to invert the bits (0000 0010=0x02 versus 0000 0101=0x05) when compared to the tables below.


enter image description here enter image description here


If you are powering your circuit off a cell battery, you might find that your battery cannot supply enough current. To test this, use a multimeter to measure the voltage of the battery, while your circuit is connected (and possibly, or possibly not, running). If the voltage drops below 2.7v (as defined by your fuses - use the AtMel Fuse Calculator page to see what your fuses mean), your chip will shut down, causing the voltage to rise back, turning the chip back on, and round it goes.The battery may even take a while to recover (I think last time this happened to me, it took about 10 seconds -I thought I'd destroyed the battery).

This is fairly common issue with motors (which draw a lot of power), but depends on your exact battery, and the exact load.

If this happens, you might get away with using multiple batteries in parallel (connect all the + sides together, to the + side of your circuit; all the - sides together to the - side of your circuit). Most battery holders are in series, which means they boost the voltage instead; you will have to do your own wiring for this.