Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
34
Добавлен:
27.04.2015
Размер:
1.98 Mб
Скачать

Timer Programming Model

Peripheral Data Bus

16-Bit

PGDB

 

 

 

 

TCR01

16-Bit

 

 

TPR0

 

 

 

 

Control Register

 

 

 

ES[1:0]

16-Bit

 

 

 

 

 

 

 

 

 

 

Preload Register

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Phi Clock / 4

 

TCT0

 

Prescaler Clock

4 to 1

 

16-Bit

 

 

 

MUX

 

 

 

Count Register

 

 

 

 

TIO01

Synchr

 

 

 

INV

Tied low

 

 

 

 

 

 

 

 

 

 

 

 

 

TPR1

 

 

 

ES[1:0]

16-Bit

 

 

 

 

Preload Register

 

Phi Clock / 4

 

TCT1

 

Prescaler Clock

4 to 1

 

16-Bit

 

Timer 0 Overflow

 

MUX

 

 

Count Register

 

 

 

 

TCR2

 

 

 

 

TPR2

16-Bit

 

 

 

 

 

 

 

 

Control Register

ES[1:0]

16-Bit

 

 

 

 

 

 

Preload Register

 

 

 

 

 

 

 

 

 

 

 

 

 

Phi Clock / 4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TCT2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Prescaler Clock

 

 

 

 

 

4 to 1

 

 

 

 

 

 

 

 

 

 

 

 

16-Bit

 

 

TIO2

 

 

 

 

 

Timer 1 Overflow

 

 

 

 

 

MUX

 

 

 

 

 

 

 

 

 

 

 

 

Count Register

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

INV

 

 

 

 

 

Synchr

 

 

 

 

TO[1:0]

OIE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Timer0 Overflow

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

to TIO01 PIN

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Pin and

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Timer1 Overflow

 

 

 

 

 

 

 

 

 

 

 

 

 

to TIO2 PIN

 

 

 

 

 

 

 

 

 

 

 

Interrupt Logic

 

 

 

 

 

 

 

 

 

Timer2 Overflow

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Timer Interrupt Request

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Timer 0

Overflow

Timer 1

Overflow

Timer 2

Overflow

AA0226

Figure 9-2. Timer Module

9.1 Timer Programming Model

The timer module contains eight read/write registers, all of which are memory-mapped in the X memory space. These eight registers include three sets of two 16-bit registers, one set for each timer: the timer count (TCT) register and the timer preload register (TPR). In addition, two timer control registers (TCR01 and TCR2) control the operations of the timers.The TCR01 provides control for Timers 0 and 1. The TCR2 provides control for Timer 2 (the top 8 bits of the TCR2 are not used). The timer module’s programming model is shown in Figure 9-3 on page 9-4.

Timers 9-3

Соседние файлы в папке DSP568xx