TIMERS and TIMER/COUNTERSKS57C2308/P2308/C2316/P2316

Table 11-7. TMOD0.6, TMOD0.5, and TMOD0.4 Bit Settings

TMOD0.6

TMOD0.5

TMOD0.4

Resulting Counter Source and Clock Frequency

 

 

 

 

0

0

0

External clock input (TCL0) on rising edges

 

 

 

 

0

0

1

External clock input (TCL0) on falling edges

 

 

 

 

 

1

0

0

fxx/210

(4.09 kHz)

1

0

1

fxx /28

(16.4 kHz)

1

1

0

fxx/26

(65.5 kHz)

1

1

1

fxx/24

(262 kHz)

NOTE: “fxx” = selected system clock of 4.19 MHz.

+PROGRAMMING TIP — Restarting TC0 Counting Operation

1. Set TC0 timer interval to 4.09 kHz:

BITS

EMB

SMB

15

LD

EA,#4CH

LD

TMOD0,EA

EI

 

BITS

IET0

2. Clear TCNT0, IRQT0, and TOL0 and restart TC0 counting operation:

BITS EMB

SMB 15

BITS TMOD0.3

11-18

Page 240
Image 240
Samsung KS57C2308 manual TMOD0.6, TMOD0.5, and TMOD0.4 Bit Settings, TMOD0.6 TMOD0.5 TMOD0.4