Ampro Corporation 5001451A manual Enabling the Parallel Port Interrupt

Page 41

Little Board P6d Module

To change the port between input and output states, write a 1 to bit five of the control register to set the port to its input state; or a 0 to set it to its output state. Here is a code sample for dynamically changing the port direction (after it is in Extended Mode).

;----------------------------------------------------------

; Code to change the parallel port direction to input

;----------------------------------------------------------

 

MOV

DX,37A

 

IN AL,DX

 

OR AL,20h

;set bit 5 (input)

OUT

DX,AL

 

;

 

 

;----------------------------------------------------------

 

; Code to change the parallel port direction to output

;----------------------------------------------------------

 

MOV

DX,37Ah

 

IN AL,DX

 

AND

AL,0DFh

;clear bit 5

OUT

DX,AL

 

Using the Control Lines for Additional I/O

Besides the eight data lines, you can use the four control lines (STB*, AUTOFD*, INIT*, and SELIN*) as general purpose output lines. Similarly, you can use the five status lines (ERROR*, SLCT, PE, ACK*, and BUSY) as general purpose input lines.

You can read the four control lines and use them as input lines. These lines have open collector drivers with 4.7k ohm pull-ups. To use a control line as an input line, you must first write to its corresponding bit in the control register. If the line is inverting (*), write a 0, otherwise write a 1. This will cause the line to float (pulled up by the 4.7k ohm resistors). When a line floats, you can use it as an input.

Enabling the Parallel Port Interrupt

Bit 4 in the Control Register enables the parallel port interrupt. If this bit is high 1, then a rising edge on the ACK* (IRQ) line will produce an interrupt on the parallel port interrupt, IRQ7. Table 2-22lists the parallel port register bits. Parallel port register bit definitions are described in Table 2-23.

2-23

Image 41
Contents Little Board P6d Reference Manual Copyright 2000, 2002, Ampro Computers, Incorporated Revision Reason for Change DateTable of Contents Preface ROM Bios Standards Contact Information Cables Index Page Technical Support IntroductionWebsite Surface MailViii CPU/Motherboard Product Feature SummaryGeneral Description CompactFlash Disk Enhanced Embedded-PC BiosModular PC/104-Plus Expansion Bus Parallel Port Serial PortsFloppy Interface PCI-Bus Eide InterfacesMBps Ethernet LAN Interface Flat Panel/CRT Display ControllerDesigning Little Board Systems SoftwareEnhanced Reliability On-board MiniModule ExpansionI/O Development Board Little Board Development Platform And QuickStart KitJ2 Power Connector DescriptionsConnector Name Description Pin # SignalJ3 Misc Switch Descriptions S1 S5J4 Keyboard J5 MouseSystem Block Diagram Page Overview Mounting DimensionsLittle Board P6d Module with Mounting Dimensions Connector Function Size Key Pin Connector SummaryPage Little Board P6d Connector and Jumper Locations Jumper Summary Jumper Group Function DefaultPower Requirements DC PowerPin # Signal Name Function Connector Type Mating ConnectorPowerfail NMI Switching Power SuppliesBackup Battery Cooling RequirementsPin # Function Fan ConnectorSystem Memory Shadowing Bios RecoveryInterrupt and DMA Channel Usage Interrupt Function Channel Function Battery-Backed ClockSerial Ports Serial Port Connectors J8, J11 ROM-BIOS Installation of the Serial PortsAddresses and Interrupt Assignments Port Address InterruptPorts Pin # Name Function Ports Pin # Signal Name Function In/Out DB25 Pin DB9 PinSignal DB25 Serial Console Features Ampro Custom Serial FeaturesSerial TTL Option Jumper ResultUsing a Standard PC Keyboard Universal Serial Bus USB Ports Using Arrow Keys During SetupCOM Port Table Function Substitute KeysJ4 Pin # Signal Name Function IrDA Connector Part of Utility J19J5 Pin # Signal Name Function Infrared IrDA InterfaceJ19 Pin # Signal Name Function ROM-BIOS Installation of Parallel PortsMulti-Mode Parallel Port Addresses and Interrupts DMA Channels Parallel Port Connector J9IEEE-1284-compliant Cables Pin # Signal Name Function In/Out DB25 PinLatch-Up Protection Using the Parallel Port in Bidirectional ModeParallel Port Registers Standard and Bidirectional OperationEnabling the Parallel Port Interrupt Using the Control Lines for Additional I/O22. Parallel Port Register Bits Floppy Disk Interface Floppy Interface ConfigurationFloppy Drive Considerations Capacity Drive Size Tracks Data RateEide Hard Disk Interface Floppy Interface Connector J14Pin # Signal Name Function In/Out Pin # Signal Function Name Master/Slave Setting IDE Interface ConfigurationCompactFlash Solid-State Disk Enabling the DriveAudio Amplifier Audio Interface ConnectorAudio Interface Connector Function Type Signals Audio Interface Adapter Schematic Flat Panel/CRT Video Controller Pin # Signal FunctionName Connector Pins/Type Description Connecting a Flat Panel J15Advanced Power Management Power SequencingConnecting a CRT J17 Bios Support of Standard Flat PanelsJ6 Pin # Name Function Pin # Signal Name DB-15ZV Port Interface J16 Ethernet Network Interface Ethernet RJ45 Interface Connector J13Disabling the Video Controller Hardware DescriptionManufacturers Ethernet ID Ethernet Interface SoftwareNetwork Operating Systems Network OS DriversEthernet Setup Watchdog TimerEthernet Indicator LEDs Color Designation FunctionUtility Connectors J19 38. Utility Connector J19 LED Connection Push-button Reset ConnectionSpeaker Connections Keyboard ConnectionPC/104-Plus Expansion Bus Miscellaneous Power Management SignalsIrDA Interface TTL Serial PortsExpansion Bus Connector Pinouts Using Standard PC and AT Bus CardsPin # Signal Name Function Pin # Signal Function Name 12V PinSetup Help SetupMenu Name Functions ↑ ↓ → ← Setup 1 Main MenuEide Hard Disk Drives Setup 2 Standard Cmos SetupDrive Selection Video Setup 3 Bios Features SetupSerial Console Operation during Setup 10. Setup 4 Chipset Features Setup Setup 4 Chipset Features Setup11. Setup 5 Power Management Setup Setup 5 Power Management SetupPage 12. Setup 6 PCI Configuration Setup Setup 6 PCI Configuration SetupIntegrated Peripherals Setup Setup 7 Integrated Peripherals SetupPanel # Panel Class IDE HDD Auto Detection Screen Other Setup ScreensLoad Setup Defaults Screen Exit Without Saving Screen Save & Exit Setup ScreenEmbedded-PC System Enhancements Little Board P6d Technical SpecificationsOn-board Peripherals Support Software Mechanical and Environmental SpecificationsFlat Panel Displays Bios ModesSupported CRT Video Modes-Standard VGA Supported CRT Video Modes-Low Resolution Supported CRT Video Modes-Extended Modes 46h Generic 32K 8x16 IRQ # Hardware IRQ MapPage EPP and ECP Operation Appendix a Standards Contact InformationPage Appendix B Cables Page Cable Setup Index Setup summary Shadowing Index Index-4