beautypg.com

2 timer 0 mode: 16-bit t, 3 timer 0 mode: 8-bit ti, 2 timer 0 mode: 16-bit timer/counter -3 – Maxim Integrated MAXQ Family User Manual

Page 68: 3 timer 0 mode: 8-bit timer with auto-reload -3, Figure 7-1. timer/counter 0 13-bit/16-bit modes -3, Maxq family user’s guide, 2 timer 0 mode: 16-bit timer/counter, 3 timer 0 mode: 8-bit timer with auto-reload

background image

7.1.2 Timer 0 Mode: 16-Bit Timer/Counter

Setting the T0CN register bits M1:M0 = 01b invokes the 16-bit Timer/Counter operating mode. This mode is identical to the 13-bit

Timer/Counter mode, except that the T0H:T0L register pair hold a 16-bit value. T0H holds the MSB and T0L holds the LSB. Rollover

occurs when the timer reaches FFFFh. An interrupt occurs if enabled and the TF0 (T0CN.5) flag is set. Time-base selection,

counter/timer selection, and the gate function operate just as described for the 13-bit Timer/Counter mode.

7.1.3 Timer 0 Mode: 8-Bit Timer with Auto-Reload

When T0CN register bits M1:M0 = 10b, Timer 0 is configured as an 8-bit timer/counter with automatic reload of the start value. The

timer uses T0L to count and T0H to store the reload value. Software must initialize both T0L and T0H with the same starting value for

the first count to be correct. Once the T0L reaches FFh, it is automatically loaded with the value in T0H. The T0H value remains

unchanged unless modified by software. Like the other Timer 0 modes, this mode allows counting of either clock cycles or pulses on

the T0 pin (C/T = 1) and allows gating (GATE = 1) of the T0 pin input with the T0G pin.

7-3

MAXQ Family User’s Guide

TR0 = T0CN.4

CLK

0

0

0

7

7

T0H

T0L

0

1

1

01

00

C/T = T0CN.2

M1:M0 =

T0CN.1, T0CN.0

INTERRUPT

T0M = T0CN.6

T0G PIN

T0 PIN

GATE = T0CN.3

DIVIDE

BY 12

SYSTEM

CLOCK

TF0 = T0CN.5

Figure 7-1. Timer/Counter 0 13-Bit/16-Bit Modes

TR0 = T0CN.4

CLK

0

0

0

7

7

T0H

T0L

RELOAD

0

1

1

C/T = T0CN.2

INTERRUPT

T0M = T0CN.6

T0G PIN

T0 PIN

GATE = T0CN.3

DIVIDE

BY 12

SYSTEM

CLOCK

TF0 = T0CN.5

Figure 7-2. Timer/Counter 0 8-Bit Auto-Reload Mode

Maxim Integrated