Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // sets up a 31.25 kHz PWM on pin 11
- void setup()
- {
- pinMode(11, OUTPUT);
- TCCR2A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM21) | _BV(WGM20);
- TCCR2B = _BV(CS20);
- }
- void loop()
- {
- OCR2B = 127; // put any 8 bit value here
- }
Add Comment
Please, Sign In to add comment