Aus SatriaWiki
Satria (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „== Code snippets == === Change clock speed === <code><poem> #define CLOCK_SPEED_16MHZ 0 #define CLOCK_SPEED_8MHZ 1 #define CLOCK_SPEED_4MHZ 2 #define CLOCK_SPE…“) |
Satria (Diskussion | Beiträge) |
||
Zeile 1: | Zeile 1: | ||
+ | == Bootloader updaten == | ||
+ | https://frottier.wordpress.com/2017/11/12/kein-frust-mit-digispark-clones/ | ||
+ | |||
== Code snippets == | == Code snippets == | ||
=== Change clock speed === | === Change clock speed === |
Version vom 9. Juni 2020, 08:27 Uhr
Bootloader updaten
https://frottier.wordpress.com/2017/11/12/kein-frust-mit-digispark-clones/
Code snippets
Change clock speed
- define CLOCK_SPEED_16MHZ 0
- define CLOCK_SPEED_8MHZ 1
- define CLOCK_SPEED_4MHZ 2
- define CLOCK_SPEED_2MHZ 3
- define CLOCK_SPEED_1MHZ 4
- define CLOCK_SPEED_500KHZ 5
- define CLOCK_SPEED_250KHZ 6
- define CLOCK_SPEED_125KHZ 7
volatile void setClockSpeed(byte speed)
{
CLKPR = 0b10000000; // enable clock change
CLKPR = speed;
}
void setup()
{
setClockSpeed(CLOCK_SPEED_8MHZ);
}