EM73P361A
4-BIT MICRO-CONTROLLER FOR LCD PRODUCT
TIMER / COUNTER ( TIMERA, TIMERB)
EM73P361A only can support timer function for timerA and timerB 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 timerB 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 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
internal clock
TIMER CONTROL
TIMER CONTROL
internal clock
P28 TMSA
IPSA P29 TMSB
IPSB
TIMER/COUNTER CONTROL
Timer/counter command port: P28 is the command port for timer/counterA and P29 is for the timer/
counterB.
Port 28 3 2 1 0
TIMER/COUNTER MODE SELECTION
TMSA IPSA
TMSA (B)
Function description
Initial state: 0000 0 0
Stop
01
Port 29 3 2 1 0
10
TMSB IPSB
11
Initial state: 0000
Reserved
Timer mode
Reserved
INTERNAL PULSE-RATE SELECTION
IPSA(B)
00
01
10
11
Function description
XIN/2 5 Hz
XIN/27 Hz
XIN/211 Hz
XIN/215 Hz
* This specification are subject to be changed without notice.
12.17.2001 14