EM73880
4-BIT MICRO-CONTROLLER FOR LCD PRODUCT
Preliminary
These three functions can be executed by 2 timer/counter independently.
For timerA, the counter data is saved in timer register TAH, TAM, TAL, which user can set counter initial
value and read the counter value by instruction "LDATAH(M,L), STATAH(M,L)" and timer register is
TBH, TBM, TBL and W/R instruction "LDATBH (M,L), STATBH (M,L)".
The basic structure of timer/counter is composed by two same structure counter, these two counters can be
set initial value and send counter value to timer register, P28 and P29 are the command ports for timerA
and timer B, user can choose different operation mode and different internal clock rate by setting these two
ports. When timer/counter overflow, it will generate a TRGA(B) interrupt request to interrupt control unit.
INTERRUPT CONTROL
TRGA request
DATA BUS
TRGB request
12 BIT COUNTER
12 BIT COUNTER
P8.3/
TRGA
internal clock
EVENT COUNTER CONTROL
TIMER CONTROL
PULSE-WIDTH MEASUREMENT
CONTROL
EVENT COUNTER CONTROL
TIMER CONTROL
PULSE-WIDTH MEASUREMENT
CONTROL
P8.1/
TRGB
MUX
internal clock
high speed timer/counter
P28
TMSA
IPSA P29 TMSB
IPSB
TIMER/COUNTER CONTROL
P8.1/TRGB, P8.3/TRGA are the external timer inputs for timerB and timerA, they are used in event
counter and pulse-width measurement mode.
Timer/counter command port: P28 is the command port for timer/counterA and P29 is for the timer/
counterB.
Port 28
3210
TIMER/COUNTER MODE SELECTION
TMSA IPSA
TMSA (B)
Function description
Initial state: 0000
0 0 Stop
0 1 Event counter mode
Port 29
3210
10
TMSB IPSB
11
Initial state: 0000
INTERNAL PULSE-RATE SELECTION
IPSA NORMAL mode SLOW mode
0 0 LXIN/23 Hz Reserved
0 1 LXIN/27 Hz LXIN/27 Hz
1 0 LXIN/211 Hz LXIN/211 Hz
1 1 LXIN/215 Hz LXIN/215 Hz
Timer mode
Pulse width measurement mode
INTERNAL PULSE-RATE SELECTION
IPSB NORMAL mode SLOW mode
0 0 Depend on high speed timer/counter
0 1 LXIN/25 Hz
LXIN/25 Hz
1 0 LXIN/29 Hz
LXIN/29 Hz
1 1 LXIN/213 Hz
LXIN/213 Hz
* This specification are subject to be changed without notice.
11.30.2001 16