R
R
RokkerRuslan2013-12-03 16:36:30
Microcontrollers
RokkerRuslan, 2013-12-03 16:36:30

What channels do AVR microcontroller timers/counters have?

I can not understand what kind of channels the timers / counters of AVR microcontrollers have. The documentation contains only the setting of registers, with a mention for channel A or B. But what these channels are for and what it is not at all. Could you clarify the situation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Ocelot, 2013-12-03
@RokkerRuslan

The timer has two match registers OCR1A and OCR1B - one per channel. When the timer value reaches the value of OCR1A, the first channel is triggered, when OCR1B is the second.
Each channel can be configured independently to generate interrupts, drive PWM pins, and so on.
And don't be fooled by the names of the configuration registers TCCR1A and TCCR1B (TCCR1C also happens sometimes), they are not related to channels in any way, it's just one big register, divided into several 8-bit pieces.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question