English
Language : 

W921E400A Datasheet, PDF (14/53 Pages) Winbond – 4-BIT MICROCONTROLLER
W921E400A/W921C400
The input or output mode of port A to port B only can be decided by I/O instructions. For example,
MOV A, Px will change Px to input mode and MOV Px, A will change it to output mode.
6.5.1 Normal/Special function selection of I/O
Some of the I/O ports can be programed to special function via special control register. The detail
functions are as follows.
• P2.0 to P2.1: Two 15 mA sink current normal I/O pins only
• P3.0 to P3.3: Multi-function I/O pins (selected by P3IO register)
− Normal function I/O pins
− Special function input pins
P3IO register: (address = 00FH, default data = 0H)
b3
b2
b1
b0
0: Normal I/O P3.0
1: Analog input pin 0 (ANI0)
0: Normal I/O P3.1
1: Analog input pin 1 (ANI1)
0: Normal I/O P3.2
1: Analog input pin 2 (ANI2)
0: Normal I/O P3.3
1: Analog input pin 3 (ANI3)
• P4.2 to P4.3: Multi-function I/O pins (selected by P4IO register)
− Normal function I/O pins
− Special function input pins: (All the pins are falling edge active)
P4IO register: (address = 010H, default data = 0H)
b3
b2
b1
b0
Reserved
Reserved
0: Normal I/O P4.2, interrupt disable
1: Interrupt port P4.2
0: Normal I/O P4.3, interrupt disable
1: INT0
• P5.1: Multi-function I/O pins (selected by P5IO register)
− Normal function I/O pins
− Special function I/O pins
- 14 -