Skip to main content
added 1 characters in body
Source Link
sachleen
  • 7.6k
  • 5
  • 40
  • 57

TCCR1A is timer/counter 1 control register A

TCCR1B is timer/counter 1 control register B

TCNT1 is timer/counter 1's counter value

CS12 is the 3rd clock select bit for timer/counter 1

TIMSK1 is timer/counter 1's interrupt mask register

TOIE1 is the timer/counter 1 overflow interrupt enable

So, the code enables timer/counter 1 at 62.5 kHz and sets the value to 34286. Then it enable the overflow interrupt so when it reaches 65535, it will trigger the interrupt function, most likely labelled as `ISR(timer0_overflow_vect)ISR(timer0_overflow_vect)

TCCR1A is timer/counter 1 control register A

TCCR1B is timer/counter 1 control register B

TCNT1 is timer/counter 1's counter value

CS12 is the 3rd clock select bit for timer/counter 1

TIMSK1 is timer/counter 1's interrupt mask register

TOIE1 is the timer/counter 1 overflow interrupt enable

So, the code enables timer/counter 1 at 62.5 kHz and sets the value to 34286. Then it enable the overflow interrupt so when it reaches 65535, it will trigger the interrupt function, most likely labelled as `ISR(timer0_overflow_vect)

TCCR1A is timer/counter 1 control register A

TCCR1B is timer/counter 1 control register B

TCNT1 is timer/counter 1's counter value

CS12 is the 3rd clock select bit for timer/counter 1

TIMSK1 is timer/counter 1's interrupt mask register

TOIE1 is the timer/counter 1 overflow interrupt enable

So, the code enables timer/counter 1 at 62.5 kHz and sets the value to 34286. Then it enable the overflow interrupt so when it reaches 65535, it will trigger the interrupt function, most likely labelled as ISR(timer0_overflow_vect)

Source Link
TheDoctor
  • 3.5k
  • 1
  • 22
  • 39

TCCR1A is timer/counter 1 control register A

TCCR1B is timer/counter 1 control register B

TCNT1 is timer/counter 1's counter value

CS12 is the 3rd clock select bit for timer/counter 1

TIMSK1 is timer/counter 1's interrupt mask register

TOIE1 is the timer/counter 1 overflow interrupt enable

So, the code enables timer/counter 1 at 62.5 kHz and sets the value to 34286. Then it enable the overflow interrupt so when it reaches 65535, it will trigger the interrupt function, most likely labelled as `ISR(timer0_overflow_vect)