Created
September 18, 2022 15:06
-
-
Save jgrahamc/dd6a0c7abb35ff92990a2c7de4ce3abe to your computer and use it in GitHub Desktop.
Added 8Mhz clock on pin 9 to ArduinoISP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74c74 | |
< #define LED_HB 9 | |
--- | |
> // #define LED_HB 9 | |
96c96 | |
< #define LED_HB 7 | |
--- | |
> // #define LED_HB 7 | |
231,232c231,241 | |
< pinMode(LED_HB, OUTPUT); | |
< pulse(LED_HB, 2); | |
--- | |
> // pinMode(LED_HB, OUTPUT); | |
> // pulse(LED_HB, 2); | |
> | |
> pinMode(9, OUTPUT); | |
> // setup high freq PWM on pin 9 (timer 1) | |
> // 50% duty cycle -> 8 MHz | |
> OCR1A = 0; | |
> ICR1 = 1; | |
> // OC1A output, fast PWM | |
> TCCR1A = _BV(WGM11) | _BV(COM1A1); | |
> TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // no clock prescale | |
279c288 | |
< analogWrite(LED_HB, hbval); | |
--- | |
> // analogWrite(LED_HB, hbval); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment