Datasheet
Chapter 13. Timer Module 13-1
Chapter 13
Timer Module
This chapter describes the configuration and operation of the two general-purpose timer
modules (timer 0 and timer 1). It includes programming examples.
13.1 Overview
The timer module incorporates two independent, general-purpose 16-bit timers, timer 0 and
timer 1. The output of an 8-bit prescaler clocks each timer. There are two sets of registers,
one for each timer. The timers can operate from CLKIN or from an external clocking source
using one of the TIN signals. If CLKIN is selected, it can be divided by 16 or 1.
Figure 13-1 is a block diagram of one of the two identical ti5mer modules.
Figure 13-1. Timer Block Diagram
Timer
Divider
Timer Mode Register (TMRn)
Prescaler Mode Bits
Timer Counter (TCNn)
15 0
Timer Reference Register (TRRn)
15 0
Timer Capture Register (TCRn)
15 0
Timer Event Register (TERn)
Capture
Detection
TIN
TOUT
GENERAL-PURPOSE TIMER
clock
(contains incrementing value)
(reference value for comparison with TCN)(latches TCN value when triggered by TIN)
(indicates capture or when TCN = TRRn)
IRQn
Clock
Generator
CLKIN
(÷1 or ÷16)
