EM78P5840/5841/5842
8-bit Micro-controller
IOCD (TONE1 control, Clock source, Prescaler of CN1)
PAGE0 (Reserved)
PAGE1 (Clock source and prescaler for COUNTER1)
7
6
5
4
3
2
1
0
CNTI/ES
X
X
X
CNT1S
C1_PSC2 C1_PSC1 C1_PSC0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0 R/W-0 R/W-0
Bit 0 ~ Bit 2 (C1_PSC0 ~ C1_PSC2) : COUNTER1 prescaler ratio
C1_PSC2
C1_PSC1
C1_PSC0
COUNTER1
1:2
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1:4
1:8
1:16
1:32
1:64
1:128
1:256
Bit 3(CNT1S) : COUNTER1 clock source. This bit will un-effect on RC mode (RC mode’s CLK is always
equal to oscillator frequency).
0/1 Î 16.384kHz / system clock.
TRL
P94
reload
8-bit
TimerInterrupt
Timerwakeup
IRC2
ERC
Prescaler
Counter
Overflow
Fosc
CNTI/ES
Timer
EN
Fpll
PSR2..PSR0
OSCM 1,0
CNT1S
Fig 7: Timer CLK source diagram
Bit4 ~ Bit6: Unused register. These three bits are not allowed to use.
Bit7 (CNTI/ES):Counter source select.
CNTI/ES = 0 Æ Timer counter CLK come from system CLK or Crystal output and P94 is defined to
general propose IO.
CHTI/ES = 1 Æ P94 is defined to input and Timer counter’s CLK will come from P94’s falling edge.
IOCE (Interrupt mask,)
PAGE0 (Interrupt mask)
7
6
5
4
3
X
-
2
X
-
1
X
-
0
X
-
PWM2
0
ADI
PWM1
R/W-0
R/W-0
R/W-0
R/W-0
Bit 0 ~ Bit 3 : unused
Bit 4(PWM1) : PWM1 one period reach interrupt mask.
Bit 5 (ADI) : ADC conversion complete interrupt mask
0/1 Î disable/enable interrupt
There are four registers for A/D converter. Use one bit of interrupt control register (IOCE PAGE0 Bit5) for
__________________________________________________________________________________________________________________________________________________________________
* This specification is subject to change without notice.
23
2004/11/10 V2.6