You are on page 1of 6

Parallel port tutorial

Male Connector Æ

D0 – D7 Data pins (8)


S3 – S7 Status pins (5)
C0 – C4 control pins (4)
Rest all pins are grounded

Female connector Æ
(on computer)

Copyright ® IIT Guwahati


Robotics Club
Sending Commands to the Port:

„ Sending commands involves only the


data pins [D0 to D7 ]
„ #include <dos.h>
void main(){
outportb(0x378,0xFF);}
„ (FF)16 = (1111 1111)2

Copyright ® IIT Guwahati


Robotics Club
Sending Commands to the Port:

Copyright ® IIT Guwahati


Robotics Club
Connect to motor: H bridge circuit
5V (for IC)

12V (for motor)

Copyright ® IIT Guwahati


Robotics Club L293D
Driving the DC motor:

outportb(0x378,0x00);--------- STOP MOTOR


outportb(0x378,0x03);--------- STOP MOTOR Break!
outportb(0x378,0x01);--------- MOVE MOTOR(CCW)
outportb(0x378,0x02);--------- MOVE MOTOR(CW) .
Copyright ® IIT Guwahati
Robotics Club
Some tips
„ Windows XP doesn’t allow to directly access
the parallel port so we have to use third party
drivers which opens the specific ports.
„ One such software is Userport.
http://www.embeddedtronics.com/public/Electronics/minidaq/userport/UserPort.zip

„ Generally the address of the parallel port is


0x378-0x37F.
„ If not the check its address in the specific
port properties in device manager.
Copyright ® IIT Guwahati
Robotics Club

You might also like