#define CLOCK_PRESCALER_32 (0x5) // 500KHz (FYI: 5mA on an Arduino Pro Mini Vcc w. #define CLOCK_PRESCALER_16 (0x4) // 1MHz (FYI: 5.5mA on an Arduino Pro Mini Vcc w. #define CLOCK_PRESCALER_8 (0x3) // 2MHz (FYI: 6.5mA on an Arduino Pro Mini Vcc w. #define CLOCK_PRESCALER_4 (0x2) // 4MHz (FYI: 8mA on an Arduino Pro Mini Vcc w. #define CLOCK_PRESCALER_2 (0x1) // 8MHz (FYI: 10mA on an Arduino Pro Mini Vcc w. #define CLOCK_PRESCALER_1 (0x0) // 16MHz (FYI: 15mA on an Arduino Pro Mini Vcc w. * You can however still change/reset the Prescale register at run-time). * automatically loaded with the CLOCK_PRESCALER_8 setting at MPU power-on time. * (FYI: If you set the DIV8 flag of the AVR chip, the Prescale register is * (Prescale devision is controlled by the CLKPR register of the AVR) * This example code is in the public domain. * further hacking to the core arduino files to function correctly). * ( If CLOCK_PRESCALE is set below 1MHz, then millis() and Serial.begin() will need * millis() and Serial.begin() still works without any modifications or hacks). When CLOCK_PRESCALE is set no lower than 1MHz, the functions * standard Arduino without modifying any hardware or AVR flags. * Arduino IDE to compile for a 1MHz CPU, is that you can do this on any * The advantage of setting CLOCK_PRESCALE in your sketch, and setting the * you need to include a call to the "setPrescale(CLOCK_PRESCALE_DEFAULT) " * To make sure that your hardware is actually running at 1MHz at run-time Unoct.name=Arduino Uno (Compile for 1MHz) ![]() ![]() * The file "boards.txt" can be found in the following path: * This example can be run on a standard Arduino Uno if you add the text below * Blink and Serial example for an Arduino running at only 1MHz (to save some battery power)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |