Hi All,
I have an Arduino clone that I designed which is running on its own internal 8MHz clock. In short all baud rates are cut in half, even though my sketches are configured to compile for an 8MHz clock.
I programmed the UNO optiboot boot-loader onto the chip. Since the boot-loader was built assuming a 16 MHz crystal it makes sense that I would need to upload my sketches at half the baud as normal (optiboot expects 115200 baud, I have to program at 57600 baud).
What I don't understand is why all of my sketches have the same issue. If I use Serial.begin(9600); in the code, I need to set the Serial Monitor to communicate at 4800 baud.
I don't understand why this is, Since the sketches were compiled to run at 8MHz I would assume that the baud rate would be accounted for.
The odd thing is that not all timing functions are affected. If I set the LED to blink at a given rate using delays, or by checking millis() it blinks at the correct rate.
Does anyone know why Serial Baud would be effected while other time critical functions aren't?
Thanks