Parallel Port Interfacing using Assembly Language

Preview:

Citation preview

Parallel Port Interfacing using Assembly

Language

Parallel Port Interfacing using Assembly

Language

Computer port (hardware)

• A 'port' serves as an interface between the computer and other computers or peripheral devices.• A port is a specialized outlet on a

piece of equipment to which a plug or cable connects.

Example ports

USB

Example ports

FireWire

Example ports

Ethernet port

Example ports

Serial Port

Example ports

Parallel Port

Example ports

PS/2 Connector

Example ports

VGA Connector

Electrical signal transfer

Electronically, hardware ports can almost always be divided into two groups based on the signal transfer:•Serial ports send and receive one bit at a time via a single wire pair (Ground and +/-).•Parallel ports send multiple bits at the same time over several sets of wires.

Electrical signal transfer

Parallel PortParallel Port

• a type of interface found on computers for connecting various for connecting various peripheralsperipherals. . • is a parallel communicationparallel communication physical

interface.• is also known as a printer portprinter port

Parallel Port AddressesParallel Port Addresses

PORT Name PORT AddressLPT1 0x3BC (956)LPT2 0x378 (888)LPT3 0x278 (632)

When the computer is first turned on, BIOS (Basic Input/Output System) will determine the number of ports you have and assign device labels LPT1, LPT2 & LPT3 to them. Usually the address for LPT1 is 378h.

Parallel Port AddressesParallel Port Addresses

To know your Parallel Port address, do the following:Go to Start > Control Panel > System > ‘Hardware’ Tab > Click on Device Manager > Look for ‘Ports’ in the device list > Double click on LPT1 > Click on the ‘Resources’ Tab. In that you can see the starting address of I/O Range.

Parallel Port PinsParallel Port Pins

Circuit DiagramCircuit Diagram

CPU ModesCPU Modes

Kernel ModeIn Kernel mode, the executing code has complete and unrestricted access to the underlying hardware.User ModeIn User mode, the executing code has no ability to directly access hardware or reference memory.

User Port DriverUser Port Driver

• is a kernel mode driver for Windows NT/2000/XP/Vista/Win7 that gives usermode programs access to I/O ports.

• from Tomas Franzon.

Download Site:http://hem.passagen.se/tomasf/

UserPort/UserPort.zip

UserPort InstallationUserPort Installation

• Copy UserPort.SYS to %WINDIR%\SYSTEM32\DRIVERS

• Start UserPort.EXE• add the addresses you want and remove

the others• click on start

ProgrammingProgramming

.model tiny

.codemain: mov al, 00000001b mov dx, 378h out dx, al mov ax, 4c00h int 21hend main

Recommended