EM78P5840/5841/5842
8-bit Micro-controller
(RPAGE1,RPAGE0)
R page # selected
R page 0
(0,0)
(0,1)
(1,0)
(1,1)
R page 1
R page 2
R page 3
R4 (RAM selection for common registers R20 ~ R3F)
(RAM selection register)
7
6
5
4
3
2
1
0
RB1
RB0
RSR5
R/W
RSR4
R/W
RSR3
R/W
RSR2
R/W
RSR1
R/W
RSR0
R/W
R/W-0
R/W-0
Bit 0 ~ Bit 5 (RSR0 ~ RSR5) : Indirect addressing for common registers R20 ~ R3F
RSR bits are used to select up to 32 registers (R20 to R3F) in the indirect addressing mode.
Bit 6 ~ Bit 7 (RB0 ~ RB1) : Bank selection bits for common registers R20 ~ R3F
These selection bits are used to determine which bank is activated among the 4 banks for 32 register (R20 to
R3F)..
Please refer to VII.1 Operational registers for details.
R5 (Program page selection, PWM control)
PAGE0 (PORT5 I/O data register, Program page register)
7
X
-
6
X
-
5
X
-
4
X
-
3
0
2
0
1
0
PS1
PS0
R/W-0
R/W-0
R/W-0
R/W-0
Bit 0 ~ Bit 1 (PS0 ~ PS1) : Program page selection bits
PS1 PS0 Program memory page (Address)
0
0
1
1
0
1
0
1
Page 0
Page 1
Page 2
Page 3
User can use PAGE instruction to change page to maintain program page by user.
Bit2~Bit3 : (undefined) These 2 bits must clear to 0 or MCU will access wronging program code.
Bit4~Bit7: (undefined) not allowed to use
PAGE1, PAGE2 (Unused registers)
These two registers are not allowed to used.
PAGE3 (PWMCON)
7
6
5
4
3
2
1
0
PWM2E PWM1E
R/W-0 R/W-0
T2EN
R/W-0
T1EN
R/W-0
T2P1
R/W-0
T2P0
R/W-0
T1P1
R/W-0
T1P0
R/W-0
Bit 0 ~ Bit 1 ( T1P0 ~ T1P1 ): TMR1 clock prescale option bits.
T1P1
T1P0
Prescale
1:2(Default)
1:8
0
0
1
1
0
1
0
1
1:32
1:64
Bit 2 ~ Bit 3 ( T2P0 ~ T2P1 ): TMR2 clock prescale option bits.
T2P1
T2P0
Prescale
1:2(Default)
1:8
0
0
0
1
__________________________________________________________________________________________________________________________________________________________________
* This specification is subject to change without notice.
10
2004/11/10 V2.6