SN8P2977
8-Bit Micro-Controller with Regulator, PGIA, 24-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 63
Version 1.7
08CH
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
P3SEG
P37SEG
P36SEG
P35SEG
P34SEG
P33SEG
P32SEG
P31SEG
P30SEG
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
After Reset
1
1
1
1
1
1
1
1
Bit[7:0]
P3nSEG:
Port 3 function control bit
0 = Set as LCD function Pin. (SEG0~SEG7)
1 = Set as IO function Pin. (P37~P30)
Example: I/O or LCD function selecting
CLR
P2SEG
; Set P2 ports to be LCD mode.
CLR
P3SEG
; Set P3 ports to be LCD mode.
MOV
A,#0FFh
B0MOV
P2SEG,A
; Set P2 ports to be I/O mode.
MOV
A,#0Fh
B0MOV
P3SEG,A
; Set P34~P37 ports to be LCD mode.
; Set P30~P33 ports to be I/O mode.
Example: I/O mode selecting
CLR
P0M
; Set all ports to be input mode.
CLR
P1M
CLR
P2M
CLR
P3M
MOV
A, #0FFH
; Set all ports to be output mode.
B0MOV
P0M,A
B0MOV
P1M, A
B0MOV
P2M,A
B0MOV
P3M, A
B0BCLR
P1M.0
; Set P1.0 to be input mode.
B0BSET
P1M.0
; Set P1.0 to be output mode.
B0BCLR
P2M.0
; Set P2.0 to be input mode.
B0BSET
P3M.0
; Set P3.0 to be output mode.
Note:
1. P2/P3 I/O is share pin with LCD function
2. Port P2 ~ P3 is high-sink I/O Pin, It can drive seven-segment display.