beautypg.com

FUJITSU F2MC-8L F202RA User Manual

Page 206

background image

190

CHAPTER 8 8/16-BIT CAPTURE TIMER/COUNTER

Detection of the number of events

In the external clock mode, counter clear can be prohibited by the compare match counter clear mask bit

(TCMSK) of the capture control register (TCCR) when a match is detected. Setting the compare match

counter clear mask bit to "1" enables the event count detection function to be used. In this case, a compare

match does not cause data to be re-loaded to the compare latch. To update the compare latch value, stop

and restart the timer.

Figure 8.7-2 shows counter function operation in the external clock mode in which TCMSK is used.

Figure 8.7-2 Counter Function Operation in External Clock Mode

00

H

01

H

02

H

0

3

H

7E

H

7F

H

00

H

01

H

00

7F

00

H

01

H

02

H

0

3

H

7E

H

7F

H

8

0

H

8

1

H

00

TFCR0=

1

(W)

7F

H

7F

H

FF

H

55

H

FF

H

EC

T

S

TR0=1

TDR0

TCM

S

K=0

Comp

a

re l

a

tch

Co

u

nter cle

a

r

Co

u

nter v

a

l

u

e

Un-

defined

Un-

defined

Comp

a

re l

a

tch

Co

u

nter cle

a

r

Co

u

nter v

a

l

u

e

TIF0

TCM

S

K=1

This manual is related to the following products: