USER`S MANUAL

Add to My manuals
254 Pages

advertisement

USER`S MANUAL | Manualzz

BASIC TIMER and TIMER 0 S3F80N8_UM_REV1.10

BASIC TIMER CONTROL REGISTER (BTCON)

The basic timer control register, BTCON, is used to select the input clock frequency, to clear the basic timer counter and frequency dividers, and to enable or disable the watchdog timer function. It is located in address

D3H, and is read/write addressable using Register addressing mode.

A reset clears BTCON to “00H”. This enables the watchdog function and selects a basic timer clock frequency of f osc

/4096. To disable the watchdog function, you must write the signature code “1010B” to the basic timer register control bits BTCON.7–BTCON.4.

The 8-bit basic timer counter, BTCNT (FDH), can be cleared at any time during normal operation by writing a "1" to BTCON.1. To clear the frequency dividers for all timers input clock, you write a "1" to BTCON.0.

MSB .7

Basic Timer Control Register (BTCON)

D3H, R/W

.6

.5

.4

.3

.2

.1

.0

LSB

Watchdog timer enable bits:

1010B = Disable watchdog function

Others value = Enable watchdog function

Divider clear bit for timer:

0 = No effect

1 = Clear divider

Basic timer counter clear bits:

0 = No effect

1 = Clear BTCNT

Basic timer input clock selection bits:

00 = f

OSC

/4096

01 = f

OSC

/1024

10 = f

OSC

/128

11 = Invalid selection

Figure 10-1. Basic Timer Control Register (BTCON)

10-2

advertisement

Related manuals

advertisement

Table of contents