-
-
Save JeffersGlass/2a738a20cbb8fe0ad787376e8603b793 to your computer and use it in GitHub Desktop.
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
int tonepin = PORTB1; | |
void setup() { | |
// put your setup code here, to run once: | |
DDRB = _BV(tonepin); //Set up tone pin as output | |
TCCR1A = _BV(COM1A0); //Mode will be CTC; WGM12 is in B register | |
TCCR1B = _BV(WGM12) | _BV(CS11); //Set up x8 prescaler | |
OCR1A = 0x1000; | |
interrupts(); //Enable interrupts globally | |
} | |
void loop() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment