5.2.2 Pin Configuration Example

This example configures Timer1/Counter1 normal mode and toggling PB1/OC1A pin when compare match.

……..

/* Set PB1/OC1A pin output direction */

DDR1B |= 0x02;

/* Configure TC1 normal mode, toggling OC1A pin when compare match */

TCCR1A = 0x40;

TCCR1B = 0x01;

………