I am using an external clock of 12MHz. The reason for this is that I want to avoid beat products from the 3rd harmonic of 8MHz and the 2nd harmonic of 12MHz in a low noise measurement system if the two clock domains were independent.
I just want to understand how library functions are scaled. For example, does serial.begin adjust automatically with 8 MHz and 16 MHz from the Board Manager settings? Can I change these setting to 12MHz?
In my application, I care mostly about serial and midi. If I need to modify the underlying UART configurations, this would be fine.
Are the various delay and timer functions also scaled automatically?
I realize that I could set various setting by changing the values by 2/3 ratios assuming that the system thought I was operating at 8 MHz.
Thanks for any help clarifying what steps are needed.
I just want to understand how library functions are scaled.
Not sure as when using the IDE only the "standard" frequencies are supported. Not very useful information I agree but....
The boot loaders for the Arduinos assume (or "only work at") their stated frequencies. To run at other frequencies you should look at "minicore" for the optiboot series of bootloaders. They have a bootloader for many boards at various frequencies including 12Mhz.
You will need to download the appropriate bootloader code. Program your board using ISP (in circuit programming). Then you can use the bootloader in the IDE.
If I were researching frequency scaling I would look at the frequency directive for the compiler.
You may find you have to set the clock registers directly for serial, not sure about midi.
The register values for timers, baudrate generator and more is calculated at compile time using the F_CPU macro.
The actual value of the macro is defined in the boards.txt file:
So I would guess that you can duplicate a board configuration and modify it to your needs. As JohnRob mentioned you will need a programmer to set the fuses.
Edit: I looked at the minicore that JohnRob mentioned and that seems a lot easier.