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
TRGB request
TRGA request
DATA BUS
12 BIT COUNTER
TIMER CONTROL
12 BIT COUNTER
TIMER CONTROL
internal clock
internal clock
TMSA
IPSA
TMSB
IPSB
P28
P29
TIMER/COUNTER CONTROL
Timer/counter command port: P28 is the command port for timer/counterA and P29 is for the timer/
counterB.
TIMER/COUNTER MODE SELECTION
Port 28
Port 29
3
2
1
0
TMSA IPSA
Initial state: 0000
TMSA (B)
0 0
Function description
Stop
0 1
1 0
1 1
Reserved
3
2
1
0
Timer mode
Reserved
TMSB IPSB
Initial state: 0000
INTERNAL PULSE-RATE SELECTION
IPSA(B)
0 0
Function description
5
XIN/2 Hz
7
0 1
XIN/2 Hz
11
1 0
1 1
XIN/2 Hz
15
XIN/2 Hz
* This specification are subject to be changed without notice.
12.17.2001
14