Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Сигнальный МП Motorola DSP56002.pdf
Скачиваний:
16
Добавлен:
26.05.2014
Размер:
2.28 Mб
Скачать

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

TIMER COUNT REGISTER (TCR)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TIMER ENABLE

 

 

 

 

 

 

 

 

 

 

 

 

 

TIMER INTERRUPT ENABLE

 

TIMER CONTROL/STATUS REGISTER (TCSR)

 

 

 

 

INVERTER

 

 

 

 

 

 

 

ADDRESS X:$FFDE

 

 

 

 

 

 

 

 

 

TIMER CONTROL BITS

 

READ/WRITE

 

 

 

 

 

 

 

 

 

 

 

 

 

23

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

*

*

*

*

*

*

*

*

*

*

*

*

*

DO

DI DIR TS GPIO TC2 TC1 TC0 INV TIE

TE

(0)

(1) (0) (0) (0) (0) (0) (0) (0) (0)

(0)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

GENERAL PURPOSE I0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TIMER STATUS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DIRECTION BIT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DATA INPUT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DATA OUTPUT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RESERVED

 

TIMER COUNT REGISTER (TCR)

ADDRESS X:$FFDF

READ/WRITE

23

0

* - reserved, read as zero, should be written with zero for future compatibility

Figure 7-2 Timer/Event Counter Programming Model

The DSP56002 views the timer as a memory-mapped peripheral occupying two 24-bit words in the X data memory space, and may use it as a normal memory-mapped peripheral by using standard polled or interrupt programming techniques.The programming model is shown in Figure 7-2.

7.3TIMER COUNT REGISTER (TCR)

The 24-bit read-write TCR contains the value (specified by the user program) to be loaded into the counter when the timer is enabled (TE=1), or when the counter has been decremented to zero and a new event occurs. If the TCR is loaded with n, the counter will be reloaded after (n+1) events.

If the timer is disabled (TE=0) and the user program writes to the TCR, the value is stored there but will not be loaded into the counter until the timer becomes enabled. When the timer is enabled (TE=1) and the user program writes to the TCR, the value is stored there and will be loaded into the counter after the counter has been decremented to zero and a new event occurs.

In Timer Modes 4 and 5, however, the TCR will be loaded with the current value of the counter on the appropriate edge of the TIO input signal (rather than with a value specified by the user program). The value loaded to the TCR represents the width or the period of

7 - 4 DSP56002 TIMER AND EVENT COUNTER MOTOROLA

For More Information On This Product, Go to: www.freescale.com

Соседние файлы в предмете Радиоприемные устройства