Rom-bios installation of parallel ports, Standard and general purpose i/o operation – Ampro Corporation 486E User Manual
Page 38

Little Board™/486e Technical Manual
2–22
ROM-BIOS Installation of Parallel Ports
LPT1 is normally assigned to the primary parallel port by the BIOS, LPT2 to the secondary
parallel port if present, and so on. However, the BIOS scans the standard addresses for parallel
ports and assigns LPT designations in the order it finds them. Thus, a secondary parallel port (at
address 278h) can be assigned LPT1 if there is no primary port.
Note
The scan order is 3BCh, 378h, 278h.
Standard and General Purpose I/O Operation
The parallel port can be used as a standard output-only printer port or as a general-purpose digital
I/O data port (Table 2–17). The bi-directional mode can be very valuable in custom applications; it
might be used to control one of the following:
!
Parallel-connected external peripherals
!
An LCD display
!
Scan keyboards
!
Sense switches
!
Interface with optically isolated I/O modules
All data and interface control signals are TTL-compatible.
Table 2–17. Parallel Port Use
Signal Type
Number of Lines
Function
Output Drive
Data
Control
Status
8 lines
4 lines
5 lines
Write Only
Read/Write
Read Only
24 mA @ .5V
12 mA @ 2.4V
12 mA @.5V
4.7K PU
--
The Bi-directional control register can be directly accessed without using the BIOS. The base
address is 37Ah when the port is configured as the primary parallel port, and 27Ah when the port
is configured as the secondary parallel port. Changing bit 5 can dynamically change the port
between input and output modes. A “1” in bit five sets the port to input; a “0” sets it to output. The
following example code dynamically changes the primary parallel port’s direction. The code
assumes that the port is in Extended Mode.