How to Control Your Own Apparatus using PC Printer Port
description
Transcript of How to Control Your Own Apparatus using PC Printer Port
![Page 1: How to Control Your Own Apparatus using PC Printer Port](https://reader035.fdocuments.net/reader035/viewer/2022062305/56814fd8550346895dbd9cba/html5/thumbnails/1.jpg)
![Page 2: How to Control Your Own Apparatus using PC Printer Port](https://reader035.fdocuments.net/reader035/viewer/2022062305/56814fd8550346895dbd9cba/html5/thumbnails/2.jpg)
![Page 3: How to Control Your Own Apparatus using PC Printer Port](https://reader035.fdocuments.net/reader035/viewer/2022062305/56814fd8550346895dbd9cba/html5/thumbnails/3.jpg)
CPU
Sp
eake
r
Monitor
Printer
Touch padScanner
Key Board
Mouse
Microphone
![Page 4: How to Control Your Own Apparatus using PC Printer Port](https://reader035.fdocuments.net/reader035/viewer/2022062305/56814fd8550346895dbd9cba/html5/thumbnails/4.jpg)
InputIn
pu
t
Output
Input
Output
Output
Input
All these devices can be divided in to two categories
Pro
cess
![Page 5: How to Control Your Own Apparatus using PC Printer Port](https://reader035.fdocuments.net/reader035/viewer/2022062305/56814fd8550346895dbd9cba/html5/thumbnails/5.jpg)
Motor
?
?Light Bulbs or LEDs
Water Censer Light Censer(LDR)
Micro Switch
Temperature Censer(Thermister)
?
![Page 6: How to Control Your Own Apparatus using PC Printer Port](https://reader035.fdocuments.net/reader035/viewer/2022062305/56814fd8550346895dbd9cba/html5/thumbnails/6.jpg)
Parallel Port (Printer Port)
USB(Universal Serial Bus)
RS232(Serial Port)
GPIB(Genaral Purpose Interface Bus)
Speaker MicrophoneLine In
Various types of connecters (communication ports) available in rear
side of CPU
![Page 7: How to Control Your Own Apparatus using PC Printer Port](https://reader035.fdocuments.net/reader035/viewer/2022062305/56814fd8550346895dbd9cba/html5/thumbnails/7.jpg)
100 101 102 103
1 1000 100 10
1000 * 0 = 0
100 * 1 = 100
10 * 6 = 60
1 * 4 = 4
= 164
Decimal Binary
We use Ten Symbols
0 1 2 3 4 5 6 7 8 9
20 21 22 23
1 8 4
8 * 1 = 8
4 * 1 = 4
2 * 0 = 0
1 * 1 = 1
= 13
We use Two Symbols
0 1 or Off On or Low Hi or 0V 5V
2
1 6 4 1 1 0 1 2
![Page 8: How to Control Your Own Apparatus using PC Printer Port](https://reader035.fdocuments.net/reader035/viewer/2022062305/56814fd8550346895dbd9cba/html5/thumbnails/8.jpg)
OutputOutput
Data 1Data 0
Data 2
Data 4Data 5
Data 3
Data 6Data 7ACKBusy
Paper EmptySelect
Strobe
InputInput
1 14
13 25
Initialize Printer
Auto FeedError
Select Input
Pins 18 – 25 Pins 18 – 25 GroundGround
OutputOutput
InputInput
8 Data Outputs (378 H)8 Data Outputs (378 H)
4 Other Outputs (379 H)4 Other Outputs (379 H)
5 Data Inputs (37a H)5 Data Inputs (37a H)
![Page 9: How to Control Your Own Apparatus using PC Printer Port](https://reader035.fdocuments.net/reader035/viewer/2022062305/56814fd8550346895dbd9cba/html5/thumbnails/9.jpg)
1 14
13 25
-+
5V
VCC
470 ohm
LED
Printer Port
Example in Qbasic
Out &H378,1 (for LED off)
Out &H378,0 (for LED on)
Example in Qbasic
Out &H378,1 (for LED off)
Out &H378,0 (for LED on)
![Page 10: How to Control Your Own Apparatus using PC Printer Port](https://reader035.fdocuments.net/reader035/viewer/2022062305/56814fd8550346895dbd9cba/html5/thumbnails/10.jpg)
1 14
13 25
LED
470 ohm
5 V
D0D1
D7
D2
Printer Port
![Page 11: How to Control Your Own Apparatus using PC Printer Port](https://reader035.fdocuments.net/reader035/viewer/2022062305/56814fd8550346895dbd9cba/html5/thumbnails/11.jpg)
NumberOutput Data bit pattern
D7 D6 D5 D4 D3 D2 D1 D0
0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 1
2 0 0 0 0 0 0 1 0
3 0 0 0 0 0 0 1 1
4 0 0 0 0 0 1 0 0
5 0 0 0 0 0 1 0 1
6 0 0 0 0 0 1 1 0
…
255 1 1 1 1 1 1 1 1
0 = 0V (Low state) 1 = 5V (High state)
![Page 12: How to Control Your Own Apparatus using PC Printer Port](https://reader035.fdocuments.net/reader035/viewer/2022062305/56814fd8550346895dbd9cba/html5/thumbnails/12.jpg)
IN+
IN-
Comparator
¼ LM339
R43.3kohm
12V
VCC
R2100kohm
R3
10kohm
From
Printer Port
R5
R110kohm
3.3kohm
D400
1N4007D1
X
Y
K2
RELAY52
4
230 V ACL N
230V AC Motor
![Page 13: How to Control Your Own Apparatus using PC Printer Port](https://reader035.fdocuments.net/reader035/viewer/2022062305/56814fd8550346895dbd9cba/html5/thumbnails/13.jpg)
![Page 14: How to Control Your Own Apparatus using PC Printer Port](https://reader035.fdocuments.net/reader035/viewer/2022062305/56814fd8550346895dbd9cba/html5/thumbnails/14.jpg)
1 14
13 25
Printer Port
Switch
we can use Qbasic function inp()
X = Inp( &H379)
Print X
we can use Qbasic function inp()
X = Inp( &H379)
Print X
10
25
![Page 15: How to Control Your Own Apparatus using PC Printer Port](https://reader035.fdocuments.net/reader035/viewer/2022062305/56814fd8550346895dbd9cba/html5/thumbnails/15.jpg)
100 k
Preset
IN+
IN-
Comparator
10kohm
12V
To Printer
Port Input
100kohm
100kohm
52
4
5.6kohm
¼ LM339
LDR
1 M
Preset
![Page 16: How to Control Your Own Apparatus using PC Printer Port](https://reader035.fdocuments.net/reader035/viewer/2022062305/56814fd8550346895dbd9cba/html5/thumbnails/16.jpg)