Changes between Version 2 and Version 3 of ArduinoTimers
- Timestamp:
- Nov 23, 2021, 2:12:05 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ArduinoTimers
v2 v3 6 6 '''Timer0''' (8 bits) 7 7 8 Default settings for Arduino Pro/Mini (8 MHz):9 10 {{{11 TCCR0A: 312 TCCR0B: 313 TCNT0: 8014 OCR0A: 015 OCR0B: 016 TIFR0: 017 TIMSK0: 118 }}}19 20 8 Used for {{{delay()}}}, {{{millis()}}} and {{{micros()}}}. Don't mess with it. 21 9 … … 24 12 Not normally used. For simple use, see the [https://www.arduino.cc/reference/en/libraries/timerone/ TimerOne] library. 25 13 14 For example: 15 16 {{{ 17 Timer1.initialize(1); // set period to 1us 18 Timer1.pwm( 9, 128); // set to 1/8 duty cycle (128/1024) or 125ns pulse 19 }}} 20 21 However, this only works on pins 9 and 10; 22 26 23 '''Timer2''' (8 bits) 27 24