Blinking of Led Using C Using Parallel Port
Blinking of Led Using C Using Parallel Port
By
Sandip Nair
sandipnair06@yahoo.com
sandipnair.hpage.com
Requirements: -
1. Windows 98 installed PC
2. Turbo C
3. Parallel port male connector
4. Resistors(1kΩ) & LED
Circuit Diagram: -
Fig 1 The arrangement of LED and resistors to the parallel port pins
Theory: -
Pin no D-type Register-bit Direction Inverted
1 Control0 Out Yes
2 Data0 In/out No
3 Data1 In/out No
4 Data2 In/out No
5 Data3 In/out No
6 Data4 In/out No
7 Data5 In/out No
8 Data6 In/out No
9 Data7 In/out No
10 Status6 In No
11 Status7 In Yes
12 Status5 In No
13 Status4 In No
14 Control1 Out Yes
15 Status3 In No
16 Control2 Out No
17 Control3 Out Yes
18-25 Ground - -
Table 1 Pin configuration
Data line : 8 bit data can be given to the computer from the
external circuit or can be transferred from computer to external
circuit.
Control line : To control the external circuit.
Status line : Signal given to the computer from the external circuit.
In the PC there will be D-25 type of female connector having 25
pins and in the printer; there will be a 36-pin Centronics connector.
Fig 2 Parallel port male connector