6
DIGITAL I/O
PX00-PX17
These ports are bidirectional. When a 1 is written to a port line it is configured as a input/output
port. It is considered an output port because it is outputing a logical 1, yet as soon as it is
externally brought low by an input, reading this port will return a 0. When there is no input, or
when a 1 is applied externally, reading this port will return a 1. When a 0 is written to the port, it
outputs a 0, but now cannot be used as an input port. During the reset function all the port
latches of the 80535 have 1s written to them.
When PX00-PX17 are used as outputs they can drive 4 LS-TTL inputs. When changing the
state of an output bit (or bits), the following instructions should be used:
ANL,ORL,XRL,JBC,CPL,INC,DEC,DJNZ,
MOV Px.y,C (Move carry bit to bit Y of port X),
CLR Px.y (Clear bit Y of Port X),
SET Px.y (Set bit Y of Port X).
These instructions should be used because they read the latch of a line instead of the signal
being output (or input) to the line. This is important because if a load, such as the base of a
transistor, is connected to one of the output lines, reading this port with instructions which read
the line instead of the latch (such as MOV A,P4) will always return a 0 because of the base's low
voltage drop. Instructions such as MOV A,P4 should be used when the ports are input only.
(For more information, see section 3.1 of the SAB 80515/80535 Single-Chip Microcontroller
User's Manual included in the appendices)
PX18-PX23 and IP0, IP1
The remaining lines PX18-PX23 are supplied by the SC26C92, with OP2,OP3 and OP4 being
output only, and IP0, IP1, IP2, IP3 and IP6 being input only. The inputs IP0 and IP1 are on the
I/O Expansion Connector (discussed later). The SC26C92 inputs and outputs are defined as
follows:
DIGITAL I/O
HDR3
50 49
GND
o o
VCC
GND
o o
PX0 P4.0
GND
o o
PX1 P4.1
GND
o o
PX2 P4.2
GND
o o
PX3 P4.3
GND
o o
PX4 P4.4
GND
o o
PX5 P4.5
GND
o o
PX6 P4.6
GND
o o
PX7 P4.7
GND
o o
PX8 P1.O/INT3*/CC0
GND
o o
PX9 P1.1/INT4/CC1
GND
o o
PX10 P1.2/INT5/CC2
GND
o o
PX11 P1.3/INT6/CC3
GND
o o
PX12 P1.4/INT2*
GND
o o
PX13 P1.5/T2EX
GND
o o
PX14 P1.6/CLKOUT
GND
o o
PX15 P1.7/T2
GND
o o
PX16 P3.4/TO
GND
o o
PX17 P3.5/T1
GND
o o
PX18 OP2
GND
o o
PX19 IP2
GND
o o
PX20 OP3
GND
o o
PX21 IP3
GND
o o
PX22 OP4
GND
o o
PX23 IP6
2 1
OP2:General purpose output, or Channel A transmitter 1X or 16X clock output, or Channel A receiver 1X clock output.
OP3:General purpose output, or open-drain, active-low counter/timer output or Channel B transmitter 1X clock output or receiver 1X
output.
OP4:General purpose output, or open-drain, active-low RxRDYA/FFULLA
IP0:General purpose input, or Channel A clear to send active low input.
IP1:General purpose input, or Channel B clear to send active low input.
IP2:General purpose input, or counter/timer external clock input.
IP3:General purpose input, or Channel A transmitter external clock input (TxCA).
IP6:General purpose input, or Channel B receiver external clock input (RxCB).
Before using PX18-PX23 or any other function of the SC26C92, you must reset the chip as follows:
SETB
P5.5
; MAKE THE RESET LINE HIGH
CLR
P5.5
; THEN LOW
Содержание MicroPac 535
Страница 22: ...APPENDIX D MicroPac 535 Schematics...
Страница 23: ......
Страница 24: ......
Страница 25: ......
Страница 26: ......