Confusion with ATmega328P and 3.3V/8MHz Firstly, I have tried to set the bootloader to be 8MHz internal oscillator.

I have tried the board setup from here - https://github.com/oshlab/Breadboard-Arduino.

And also the breadboard-1-6-x.zip setup from here - http://www.arduino.cc/en/Tutorial/ArduinoToBreadboard.

Burning the bootloader in both cases seems to work, with fuse settings of -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xE2:m (using Arduino IDE 1.6.7):

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0x05:
avrdude: load data efuse data from input file 0x05:
avrdude: 1 bytes of efuse verified
...
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xDA:
avrdude: load data hfuse data from input file 0xDA:
avrdude: 1 bytes of hfuse verified
...
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xE2:
avrdude: load data lfuse data from input file 0xE2:
avrdude: 1 bytes of lfuse verified


When I try and run the test sketch (below) at these voltages:


3.3V it fails (tried multiple 3.3V sources, all fail).
4.23V (3xAA rechargeable batteries) it works.
4.8V (3xAA alkaline batteries) it works.
5V it works.


To try and determine if it was my power sources or the bootloader that was the problem I uploaded this test sketch on my ATmega328P, an Arduino Nano (all Nanos are 16MHz?) and a 16MHz Arduino Pro to see if the red LED (with 100 Ohm resistor for ATmega328P) lights up in about the same time. This test sketch also does not work at 3.3V, and must be run at 5V to work.

(edit) When running this test sketch at 3.3V I see no 3.3V logic level on any output pin with my multimeter.  When running at 4.23, 4.28, 5V I see this logic level on all output pins.

(update) When connecting the +ve of the LED directly to 3.3V, the LED lights up.  So the 3.3V source has enough power to light the LED directly.

So I assumed that because my ATmega328P circuit has no crystal in it (and the Nano and Pro Mini are 16MHz), these loops would execute in different amounts of time?  But no, the loops do execute at the same speed (3 and a bit seconds) - so is my Nano/Pro Mini underclocked, or my ATmega still running at 16MHz but without a crystal??  Rather confused.

Thanks.

(update) I tried a second ATmega328P, same problem.

(code edited to use 14 output pins)

void setup() {
  for (int p=0; p&lt;14; p++) pinMode(p, OUTPUT);
}

void loop() {
  // waste some time.
  int y = 0;
  for (int i = 0; i &lt; 11; i++) {
    for (int j = 0; j &lt; 11; j++) {
      for (int k = 0; k &lt; 101; k++) {
        y+=analogRead(A0);
      }
    }
  }
  for (int p=0; p&lt;14; p++) digitalWrite(p, y % 2);
  for (int p=0; p&lt;14; p++) digitalWrite(p, HIGH);
  delay(1000);
  for (int p=0; p&lt;14; p++) digitalWrite(p, !(y % 2));
  for (int p=0; p&lt;14; p++) digitalWrite(p, LOW);
  delay(1000);
}
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