EasyManua.ls Logo

Cmsemicon SC8F577 Series - Page 55

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
55 / 181
www.mcu.com.cn
6.4.2 PORTC Analog Control Selection
The ANSEL2 register is used to configure the input mode of I/O pin to analog mode. Setting the
appropriate bit in ANSEL2 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 ANSEL2 bit has no effect on the
digital output function. The pin with TRIS cleared and ANSEL2 set to 1 is still 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.
PORTC analog selection register ANSEL2 (112H)
112H
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
ANSEL2
----
----
----
----
----
ANS18
ANS17
ANS16
R/W
----
----
----
----
----
R/W
R/W
R/W
Reset value
----
----
----
----
----
0
0
0
Bit7~Bit4
Bit2~Bit0
Not used
ANS<18:16>:
Analog selection bits, select the analog or digital functions of pin AN<18:16>.
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.4.3 PORTC Pull Down Resistance
Each PORTC pin has an internal weak pull down that can be individually configured. The control bits
WPDC<3:0> enable or disable each weak pull down.
PORTC pull down resistance register WPDC (98H)
98H
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
WPDC
----
----
----
----
WPDC3
WPDC2
WPDC1
WPDC0
R/W
----
----
----
----
R/W
R/W
R/W
R/W
Reset value
----
----
----
----
0
0
0
0
Bit7~Bit4
Bit3~Bit0
Not used
WPDC<3:0>:
Weak pull down register bit
1=
Enable pull down
0=
Disable pull down
Note:
1) WPDC[3] will invalid if RC3 is configured as reset input.
2) If pin is configured as output, weak pull down will be automatically disabled.

Related product manuals