Oscillator Clock Rate: Difference between revisions
(Created page with "The clock rate can be set to 8Mhz or 4MHz using the Arduino IDE. Using 8Mhz will provide the best IR performance, while 4MHz may provide a longer battery life. Do not use any...") |
mNo edit summary |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''''[[KontroLIR - Arduino compatible IR remote control|> KontroLIR Home]]''''' | |||
Thus we strongly suggest using | The default clock rate should be set to '''4MHz''' using the Arduino IDE when running from batteries. ''(Option under Tools menu for ATmega328PB)'' | ||
Advanced users may try using the 8Mhz clock rate or when powered from USB during testing. However, we have not tested battery use @ 8MHz and is not supported at this time. | |||
A clock rate of 8Mhz may provide better IR performance, while 4MHz will provide a longer battery life. Do not use any other clock rate when running on batteries. | |||
''Note: The granularity of the Arduino micros() function, increases as the clock rate changes from 16MHz to 8MHz to 4Mhz to 1Mhz. This has a knock on effect on the IR signal timing. Running on 2xAAA batteries, 16MHz is out of spec & at 1Mhz the IR performance is materially impacted by the granularity of the Arduino timing.'' | |||
Thus we strongly suggest using '''4MHz''' as the default clock rate, which provides a good balance between IR performance and battery life. | |||
== Summary == | |||
* Running From Battery => 4MHz (always) | |||
* Test Suite Firmware powered from USB => 4MHz | |||
* KontroLIR firmware powered from USB or battery => 4MHz | |||
* AnalysIR firmware powered from USB =>16MHz | |||
* Sketches other than the above combinations running from USB => 16MHz or any supported clock rate if you know what you are doing. | |||
'''''[[KontroLIR - Arduino compatible IR remote control|> KontroLIR Home]]''''' |
Latest revision as of 12:50, 27 January 2020
The default clock rate should be set to 4MHz using the Arduino IDE when running from batteries. (Option under Tools menu for ATmega328PB)
Advanced users may try using the 8Mhz clock rate or when powered from USB during testing. However, we have not tested battery use @ 8MHz and is not supported at this time.
A clock rate of 8Mhz may provide better IR performance, while 4MHz will provide a longer battery life. Do not use any other clock rate when running on batteries.
Note: The granularity of the Arduino micros() function, increases as the clock rate changes from 16MHz to 8MHz to 4Mhz to 1Mhz. This has a knock on effect on the IR signal timing. Running on 2xAAA batteries, 16MHz is out of spec & at 1Mhz the IR performance is materially impacted by the granularity of the Arduino timing.
Thus we strongly suggest using 4MHz as the default clock rate, which provides a good balance between IR performance and battery life.
Summary
- Running From Battery => 4MHz (always)
- Test Suite Firmware powered from USB => 4MHz
- KontroLIR firmware powered from USB or battery => 4MHz
- AnalysIR firmware powered from USB =>16MHz
- Sketches other than the above combinations running from USB => 16MHz or any supported clock rate if you know what you are doing.