NO:
W90P710 Programming Guide
VERSION:
2.0
PAGE:
194
The above information is the exclusive intellectual property of Winbond Electronics and shall not be disclosed, distributed or reproduced without permission
from Winbond.
Table No.: 2005-W90P710-11-A
Most default values of above control register and bits (eg.
SCHI_BLH
,
SCHI_BLL
,
SCHI_CBR
,
SCHI_GTR
and
SCKFS[2~0]
) are designed as specified in initialization step but it is recommended
that user performs all the initialization sequence to avoid any ambiguity.
The relationship between transmission factors and settings of
SCHI_BLH
,
SCHI_BLL
and
SCHI_CBR
is best described in the following example.
f
D
F
ETU
1
1
×
=
(f means SCCLK frequency)
Therefore,
(
)
12
31
CBR
BLL
,
BLH
1
372
Dd
Fd
×
=
×
=
=
16.3.2 Timers
Usage
Three timers (timer0:8-bit, timer1:16-bit and timer2:24-bit) are offered for processing different real
time tasks, e.g. ATR, WWT. Each timer provides five operation modes, user can control these timers
by setting configuration bits (
TOC[8~6]
,
TOC[5-3]
,
TOC[2-0]
for timer0, timer1 and timer2 respectively)
in time-out configuration register
SCHI_TOC
. The five operation modes are listed below.
1. Mode 0 (3b’000):Timer is stopped.
2. Mode 1 (3b’001):Timer starts counting the value stored in time-out initial register
SCHI_TOIR
after 3b’001 is written in register
SCHI_TOC.
When timer reaches its terminal count, an
interrupt is given if enable, and time-out flag bit (
TO[2~0]
) of register
SCHI_SCSR
will be set.
The counting is stopped by writing 3b’000 (change to Mode 0) in register
SCHI_TOC
, and
should be stopped before reloading new values in register
SCHI_TOC
.
3. Mode 2 (3b’010):Timer starts counting the content of register
SCHI_TOIR
on the first START
bit (reception or transmission) detected on the pin I/O after 3b’010 is written in register
SCHI_TOC
. The timer is reloaded with
SCHI_TOIR
and starts counting on each subsequent
START bit. When timer reaches its terminal count, an interrupt is given if enable, and time-
out flag bit of register
SCHI_SCSR
will be set. It is possible to change the content of
SCHI_TOIR
during a count; the current count will not be affected and the new count value will
be taken into account at the next START bit. The timer is stopped by writing 3b’000 in register
SCHI_TOC
.