Question: Timers can generate certain interrupts, so-called overflow and compare match interrupt. Since timer is a peripheral, it can be activated in AVR register. Supposed
Timers can generate certain interrupts, so-called overflow and compare match interrupt. Since timer is a peripheral, it can be activated in AVR register. Supposed we need to flash a LED every 100 ms with XTAL = 20 MHz by using Timer0 configured overflow and prescaler value of 128. a) Write the C code to configure dedicated TCCRO special function register so that the clock select of the Timer0 is prescaler value of 64. [2 marks] b) Write the C code to configure TIMSKO special function register to enable overflow interrupt. [2 marks] c) Calculate the number of interrupts to be overflowed to toggle the LED in every 80 ms. [2 marks]
Step by Step Solution
There are 3 Steps involved in it
QUESTION Timers can generate certain interrupts socalled overflow and compare match interrupt Since ... View full answer
Get step-by-step solutions from verified subject matter experts
