CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (Stopwatch Timer)

4.9 Stopwatch Timer

4.9.1 Configuration of stopwatch timer

The S1C63558 has 1/100 sec unit and 1/10 sec unit stopwatch timer built-in. The stopwatch timer is configured with a 2 levels 4-bit BCD counter which has an input clock approximating 100 Hz signal (signal divided from OSC1 to the closest 100 Hz) and data can be read in units of 4 bits by software. Figure 4.9.1.1 shows the configuration of the stopwatch timer.

Data bus

OSC1

 

 

 

 

 

 

Stopwatch timer

 

 

256 Hz

 

 

 

 

 

10 Hz

 

 

 

 

 

 

oscillation circuit

 

 

Divider

 

 

 

SWD0–3

 

 

 

SWD4–7

 

 

 

 

 

 

 

 

 

(fOSC1)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

10 Hz, 1 Hz

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Stopwatch timer reset signal

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Interrupt

 

 

 

Interrupt

 

 

Stopwatch timer RUN/STOP signal

 

 

 

 

 

control

 

 

 

request

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Fig. 4.9.1.1 Configuration of stopwatch timer

The stopwatch timer can be used as a separate timer from the clock timer. In particular, digital watch stopwatch functions can be realized easily with software.

4.9.2 Count-up pattern

The stopwatch timer is configured of 4-bit BCD counters SWD0–SWD3 and SWD4–SWD7.

The counter SWD0–SWD3, at the stage preceding the stopwatch timer, has an approximated 100 Hz signal for the input clock. It counts up every 1/100 sec, and generates an approximated 10 Hz signal. The counter SWD4–SWD7 has an approximated 10 Hz signal generated by the counter SWD0–SWD3 for the input clock. In count-up every 1/10 sec, and generated 1 Hz signal.

Figure 4.9.2.1 shows the count-up pattern of the stopwatch timer.

SWD4–7 count-up pattern

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SWD4–7 count value 0

 

1

2

3

4

5

6

7

8

9

0

 

 

 

 

1 Hz

Counting time (sec)

 

26

26

 

 

25

 

25

 

26

26

 

25

 

25

26

26

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

signal

 

256

256

 

 

256

 

256

 

256

256

 

256

 

256

256

256

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

generation

 

 

 

 

 

 

 

 

26

 

x 6 +

25

 

x 4 = 1 (sec)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SWD0–3 count-up pattern 1

 

 

 

 

 

 

 

256

 

 

256

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SWD0–3 count value

 

 

0

1

2

3

4

 

5

6

7

8

 

9

0

Approximate

 

 

 

 

 

 

3

 

2

 

3

2

 

3

 

2

3

2

 

3

2

 

 

Counting time (sec)

 

 

 

 

 

 

 

 

 

 

 

10 Hz

 

 

 

 

 

 

256

 

256

 

256

256

 

256

 

256

256

256

 

256

256

 

 

signal

 

 

 

 

 

 

 

 

 

 

 

 

 

 

25

 

(sec)

 

 

 

 

 

 

generation

 

 

 

 

 

 

 

 

 

 

 

 

 

 

256

 

 

 

 

 

 

 

 

SWD0–3 count-up pattern 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SWD0–3 count value

 

 

0

1

2

3

4

 

5

6

7

8

 

9

0

Approximate

Counting time (sec)

 

 

 

 

3

 

3

 

3

2

 

3

 

2

3

2

 

3

2

 

 

10 Hz

 

 

 

 

256

 

256

 

256

256

 

256

 

256

256

256

 

256

256

 

 

signal

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

26

 

(sec)

 

 

 

 

 

 

 

generation

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

256

 

 

 

 

 

 

 

 

 

Fig. 4.9.2.1 Count-up pattern of stopwatch timer

S1C63558 TECHNICAL MANUAL

EPSON

61