EasyManua.ls Logo

Cmsemicon SC8F577 Series - Page 47

Default Icon
181 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
V1.8
SC8F577x
47 / 181
www.mcu.com.cn
6.2.2 PORTA Analog Control Selection
The ANSEL0 register is used to configure the input mode of I/O pin to analog mode. Setting the
appropriate bit in ANSEL0 to 1 will cause all digital read operations of the corresponding pin to return to 0
and make the analog function of the pin work normally. The state of the ANSEL0 bit has no effect on the
digital output function. The pin with TRIS cleared and ANSEL0 set to 1 will still be used as a digital output,
but the input mode will become an analog mode. This can cause unpredictable results when performing
read-modify-write operations on the affected port.
PORT A analog selection register ANSEL0 (110H)
110H
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
ANSEL0
ANS7
ANS6
ANS5
ANS4
ANS3
ANS2
ANS1
ANS0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset value
0
0
0
0
0
0
0
0
Bit7~Bit0
ANS<7:0>:
Analog selection bit, select the digital or analog function of pin AN<7:0>
1=
Analog input. The pin is selected as analog input.
0=
Digital I/O. The pin is selected as port or special function
Note: ANS and ports are not corresponding, please check the pin diagram for specific corresponding
relationship.
6.2.3 PORTA Pull Up Resistance
Each PORTA pin has an internal weak pull up that can be individually configured. The control bits
WPUA<7:0> enable or disable each weak pull up.
PORTA pull up resistance register WPUA (07H)
07H
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
WPUA
WPUA7
WPUA6
WPUA5
WPUA4
WPUA3
WPUA2
WPUA1
WPUA0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset value
0
0
0
0
0
0
0
0
Bit7~Bit0
WPUA<7:0>:
Weak pull up register bit
1=
Enable pull up
0=
Disable pull up
Note: If pin is configured as output, weak pull up will be automatically disabled.

Related product manuals