So I just noticed that my Chinese Arduino Uno has a 12 MHz crystal instead of the original 16Mhz.
I made calculations and that turned out to be a quarter millisecond's difference.
My questions:
The reduced clock speed will affect anything that uses a timer, unless that code can be altered to accommodate the slower clock. Delays, millis(), explicitly coded timer interrupts, etc. And one must remember that you'll get fewer overall instructions per second, so a fast interrupt that barely "fits" at 16MHz might not "fit" at all in the clock cycles available at 12MHz.
Hobby-level servos in particular are sensitive to timing...they depend on a pulse in the 0.5-2.0 millisecond range every 20 milliseconds or so. So if your project includes servos as so many hobby projects do, you'll want to be especially cognizant of timings.
In gcc-c programming the #define F_CPU = 12000000 directive would alert the compiler/preprocessor to compute delays with the 12 MHz clock in mind. Your toolset may vary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With