Resolution; Timer Operation - Analog Devices adsp-2100 Manual

Adsp-2100 family programmable single-chip microprocessors
Table of Contents

Advertisement

6.3

RESOLUTION

TSCALE provides the capability to program longer time intervals between
interrupts, extending the range of the 16-bit TCOUNT register. Table 6.1
shows the range and the relationship between period length and
resolution for TPERIOD = maximum.
Cycle Time = 80 ns
TSCALE
Interrupt Every...
0
5.24 ms
255
1.34 s
Table 6.1 Timer Range And Resolution
6.4

TIMER OPERATION

Table 6.2 shows the effect of operating the timer with TPERIOD = 5,
TSCALE = 1 and TCOUNT = 5. After the timer is enabled (cycle n–1) the
counter begins. Because TSCALE is 1, TCOUNT is decremented on every
other cycle. The reloading of TCOUNT and continuation of the counting
occurs, as shown, during the interrupt service routine.
Cycle
TCOUNT
n–4
n–3
n–2
n–1
5
n
5
n+1
5
n+2
4
n+3
4
n+4
3
n+5
3
n+6
2
n+7
2
n+8
1
n+9
1
n+10
0
n+11
0
n+12
5
n+13
5
n+14
4
n+15
4
Table 6.2 Example Of Timer Operation
Resolution
80 ns
20 µs
Action
TPERIOD loaded with 5
TSCALE loaded with 1
TCOUNT loaded with 5
ENA TIMER executed
since TSCALE = 1, no decrement
decrement TCOUNT
no decrement
decrement TCOUNT
no decrement
decrement TCOUNT
no decrement
decrement TCOUNT
no decrement
decrement TCOUNT
no decrement
zero reached, interrupt occurs
load TCOUNT from TPERIOD
no decrement
decrement TCOUNT
no decrement
decrement TCOUNT, etc..
Timer
6
6 – 3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents