160 likes | 302 Vues
How to Control Your Own Apparatus using PC Printer Port. Viraj Vishwakantha Jayaweera. Printer. Touch pad. Scanner. Microphone. CPU. Monitor. Speaker. Mouse. Key Board. All these devices can be divided in to two categories. Output. Output. Process. Output. Input. Input. Input.
E N D
How to Control Your Own Apparatus using PC Printer Port Viraj Vishwakantha Jayaweera
Printer Touch pad Scanner Microphone CPU Monitor Speaker Mouse Key Board
All these devices can be divided in to two categories Output Output Process Output Input Input Input Input
Motor How to connect my own device ? ? ? Light Bulbs or LEDs ? Micro Switch Temperature Censer (Thermister) Light Censer (LDR) Water Censer
Various types of connecters (communication ports) available in rear side of CPU USB (Universal Serial Bus) Parallel Port (Printer Port) RS232 (Serial Port) Speaker Microphone Line In GPIB (Genaral Purpose Interface Bus)
1000 * 0 = 0 100 * 1 = 100 10 * 6 = 60 1 * 4 = 4 = 164 8 * 1 = 8 4 * 1 = 4 2 * 0 = 0 1 * 1 = 1 = 13 Decimal & Binary Number Systems Decimal Binary 10 2 1000 100 1 8 4 1 103 102 101 100 23 22 21 20 1 1 0 1 2 1 6 4 We use Ten Symbols 0 1 2 3 4 5 6 7 8 9 We use Two Symbols 0 1 or Off On or Low Hi or 0V 5V
Auto Feed Data 0 Data 1 Initialize Printer Data 2 Error Data 3 Select Input Data 4 Data 5 Data 6 Data 7 Strobe ACK Busy Paper Empty Select Printer Port Pin Assignment 1 14 Input Output Output Pins 18 – 25 Ground Input 13 25 8 Data Outputs (378 H) 4 Other Outputs (379 H) 5 Data Inputs (37a H)
1 14 13 25 Directly Connect LED to Printer Port VCC LED 5V - + 470 ohm Example in Qbasic Out &H378,1(for LED off) Out &H378,0(for LED on) Printer Port
1 14 13 25 Directly Connecting LED to Printer Port LED 470 ohm Printer Port D0 D1 D2 D7 5 V
230 V AC L N X D1 R1 1N4007 10kohm K2 From Printer Port Y R3 RELAY D400 10kohm 230V AC Motor R2 R5 100kohm 3.3kohm Output Signal Amplifier VCC 12V R4 3.3kohm 5 IN+ 2 IN- 4 Comparator ¼ LM339
1 14 13 25 Simple method to use Signal Input line we can use Qbasic function inp() X = Inp( &H379) Print X Printer Port 10 25 Switch
12V LDR 100kohm 10kohm ¼ LM339 5 To Printer Port Input IN+ 2 IN- 4 Comparator 1 M Preset 100kohm 5.6kohm Input Detectors 100 k Preset