Programming and Result: Using the Timer/Counter to Toggle an LED every second
The Timer/Counter is used to count against a known clock frequency, the internal clock source for the AVR microcontroller. In the first part of the experiment, an LED, connected to PORTB and Pin 0 is toggled every time TCNT1 is counted to 10000 * 100 using another loop. This makes the LED toggle every second
The TCCR1B Timer/Counter Control 16-bit Register B is used to turn on the CS10 (Clock Select) option of the control register to enable the timer for no prescaling.
Comments and Additional Information
Have some code to share? Or additional information? Respond here:
You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.