![]() |
4 input /4 output board for PC Interface hardware projectThis pc interface hardware project is circuit for 4 input / output with printer port interfacing
Understanding in circuit diagram and process.For output section is controlled by an eight line "Darlington Driver" integrated circuit (IC) or called a ULN2803 that using in thaiio's project. The digital state of each of the eight lines from the printer port is used to control the IC's internal "drivers" which in turn control the Relays and LEDs. Power for the relays and LEDs is provided using by the 12 volt regulator (LM 7812) via a plug pack power supply of at least 15 volts and capable of supplying at least 1 amp. In this interface, each of the eight output lines at the printer port is connected via a 560ohm to a LED. Four of the output lines also have relays attached. โครงงานนี้ งเราจะนำไปใช้ได้ทั้งควบคุมอุปกรณ์ภายนอก เช่น สเต็ปมอเตอร์,เปิดปิดหลอดไฟ เป็นต้น และ มีในส่วนของการรับสัญญาณภายนอก เช่น สวิท์ช,เซ็นเซอร์ เป็นต้นจริงแล้วพวกเราอาจจะรู้แล้วเพราะเป็นวงจรพื้นฐานทั่วไป ผมจะไม่ขอเอธิบายเป็นภาษาไทยมากนัก เพราะงไม่มีอะไรมาก ดูตามลำดับของเนื้อหาภาษาอังกฤษ แบบคราวๆก็คือ
How to Coding for Control and Access Printer Port:This code in control output thus below: [Out : command][Address Port : ie. &378 ][Output Value : Hex] where [output code] = 1, 2, 4, 8, 16, 32, 64, or 128 and [address port] if we use decemal may be 888, or 631 depending upon your hardware. if LPT 1 (888) doesn't work, try 631 which is LPT 2. Examples: ' This "4" is exemple value send to port.C and C++ --| outp(0x378, 4); Pascal ---| Port[888] := 4; BASIC ---| OUT 888,4 Visual Basic 6 ---|
Private Declare Sub Out Lib "DllPort.dll" Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer) Input SectionRegrading Input signal receive for each of the four input lines can detect the open/closed state of a switch. For each line is buffered using the 74LS244 IC. The IC provides a degree of protection for the computer, but it is VERY important that no current is connected to the inputs. Only switches may be used on the input lines!! How to Input Coding for read value at the printer port : [in : command][Address Port] Where: [Address Port] is one higher than the corresponding output address for the printer port. Such as LPT1 is Hex "379", or LPT2 is Hex "279",if the decemal value is 889 and 632 Examples: C and C++ --| Inp(0x379); Pascal - InValue := Port[889]; Visual Basic version 6 Private Declare Function Inp Lib "DllPort.dll" Alias "Inp32" (ByVal PortAddress As Integer) As IntegerInp(&H379) or Inp(888) PCB Assemply
Parts Component List
Final Recomment :About once the value at the port has been read, you should be use "ANDing" to determine which individual line is either HIGH, or LOW. The "PCB mounted DB25 Socket" connects via a 'serial' cable to the printer port. Item 1: The cable must be a male-male (plug-plug) type with 'straight through' connections. ie 1 to 1, 2 to 2, 3 to 3, etc. This type of cable is commonly used with printer switch boxes. (A "null modem" cable has lines 2 and 3 crossed and is not suitable - unless you make allowances in your programming.) Item 2: This power supply for the interface can be either AC or DC as long as it can deliver at least 1 amp.
The diode bridge makes connection fool proof. The power supply can be connected either way
around. Referrent from : http://www.southwest.com.au/~jfuller/robotic.html | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||