1.3" Serial: UART/I2C/SPI 128x64 OLED Module White DS12864OLED-3W.![]() Linux Device Drivers, 2nd Edition By Alessandro Rubini & Jonathan Corbet 2nd Edition June 2001 0-59600-008-1, Order Number: 0081 586 pages, $39.95. Simple circuits and examples to describe how to use PC parallel port as general purpose output port. ZFS is a combined file system and logical volume manager designed by Sun Microsystems. The features of ZFS include protection against data corruption, support for. Parallel port output. For Spanish version click here. Copyright Tomi Engdahl 1. Index. PC parallel port can be very useful I/O channel for connecting your. PC. The PC's parallel port can be used to perform some very amusing hardware interfacing experiments. The port is very easy to use when you first understand some basic tricks. This document tries to show those tricks in easy to understand way. WARNING: PC parallel port can be damaged quite easily if you make mistakes. If the parallel port is integrated to the. Safest bet is to buy an inexpensive I/O card which. If you manage. to damage the parallel port on that card, replacing it is easy and inexpensive. NOTE: The I/O port level controlling details here has proven to work well with parallel ports on the PC motherboard and expansion cards connected to ISA bus. The programming examples might not work with PCI bus based I/O cards (they can use different hardware and/or I/O addresses, their drivers make they just look like parallel ports to "normal" applications). The programming examples do not work with USB to parallel port adapters (they use entirely different hardware, their drivers make them to look like normal parallel port to operating system "normal" applications). Every reasonable care has been taken in producing this information. However, the author can accept no responsibility for any effect that this. It is the responsibly of the end user to determine fitness. The circuits and software shown here are for non commercial use without. PC parallel port is 2. D- shaped female connector in the back of the. It is normally used for connecting computer to printer, but many. Not all 2. 5 are needed always. Usually you can easily do with only 8. I have presented those. Those output pins are adequate for many purposes. Pins 1. 8,1. 9,2. Those datapins are TTL level output pins. This means that they. V when they are in low logic level (0) and +5. V when they. are in high logic level (1). In real world the voltages can be something. The output current capacity of the parallel port is limited to only. Here is a simple idea how you can connect load to a PC parallel port data pins. Dn Out - -- -- -+. Sourcing Load (up to 2. A @ 2. 4 v). |- . Ground - -- -- -+. This is not the only way to connect things to a parallel port. The parallel port data pins are TTL outputs, that can both. In ordinary parallel port implementations the data outputs are 7. LS3. 74 IC totem- pole TTL outputs which can source 2. A and sink 2. 4 m. A. Regular TTL outputs basically consist of a two "stacked" transistor in series. This is called a "totem pole output". At any given time one of these. To pull the output "high". H), which "sources" positive. To pull the output low, only the lower. L) conducts, "sinking" current to ground; an external device. H on V. \ - ->. TTL output on = 1 = high, "sourcing" current. L off \ V. \_________/. Gnd. +5_________. H off / |. \ \ V. TTL output off = 0 = low, "sinking" current. Gnd. The outputs are designed so that they give at least 2. V at 2. 6 m. A load. This 2. 6 m. A figure is for ordinary LS- TLL circuits used, the LSI implementations used in many computers can give more or less. For example quite popular (few years ago) UM8. C1. 1- C parallel port chip can only source 2 m. A. Simple current sinking load connection. Dn Out - -- -- -+. Sourcing Load (up to 2. A @ 2. 4 v). |- . Ground - -- -- -+. When taking current from PC parallel port, keep the load low, only up to few milliamperes. Trying to toke too much current (for example shorting pins to ground) can fry the parallel port. I have not killed any parallel port (yet) in this method, but I have had in cases where too much load has made the parallel port IC very hot. Be careful. If you have an external +5 volt supply, you have another option. Data Out pins to sink up to 2. A from your +5 volt supply. This can be made with a circuit like this. Sinking Load (up to 2. A @ 4. 2v). |- Power Supply. Dn Out - -- -- -+. Ground - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - ( Gnd). The load gets power then you have external +5. V on and the printer. This circuit gives you capability of. You need to be careful with this circuit, because with this. My advice is to be very careful with this type. V power supply gets. V though the load to printer port when. The most convient source "external +5. V" might. be from same other port on your PC (USB, joystick, keyboard/mouse etc. I have used mostly "sinking" type circuits and this article. Simple LED driving circuits. You can make simple circuit for driving a small led through PC. The only components needed are one LED and one. You simply connect the diode and resistor. The resistors is needed to limit the current taken. LEDs and is still safe value (not overloading the parallel port. In practical case the output current will be few. LED, which will cause a typical LED. Then you connect the circuit to the parallel port. LED) and another one goes to any of the ground pins. Be sure to fit the circuit so that the LED positive lead (the longer. If you put the led in the wrong way, it will. You can connect one circuit to each of the parallel port data pins. In this way you get eight software controllable LEDs. When you send out 1 to the datapin where the. LED is connected, that LED will light. When you send 0 to that same pin. LED will no longer light. Here are two photos of circuit above I have built. Pn those circuits I have wired the ground wire only to one ground pin (it works also well, you can use any of the ground pins). Technical specifications of parallel port pins. The IBM specifications says accoding http: //www. IO- Port- Programming- 6. The data output pins (pins 2- 9) sink 2. A, source 1. 5 m. A, and their high- level output is min. V. The low state for both is max. V. Pins 1, 1. 4, 1. V through 4. 7 kiloohm resistors (sink 2. A, source 0. 5. 5 m. A, high- level output 5. V minus pullup). Non- IBM parallel ports probably deviate from this standard. Warning: Be careful with grounding. You can break parallel ports by connecting devices to them when PC is powered on. It is not a good idea to short the pins to ground or +5. V, this can damage the port. It might be a good thing to use a parallel port not integrated on the motherboard for things like this. You can usually get a second parallel port for your machine with a cheap standard `multi- I/O' card). The following program is an example how to control parallel port LPT1. This example directly controls the. It works nicely under. MSDOS. You can look the Borland Pascal 7. LPTOUT. EXE. This has worked nicely for me in DOS systems and Windows 9. On recent testings this program has worked unreliably on some Windoes 2. Program lpt. 1_output. Mem. W[$0. 04. 0: $0. Val(Param. Str(1),data,e). Port[addr]: =data. How to use the program. LPTOUT. EXE is very easy to use program. The program takes one. That value must be integer in decimal format (for example 2. Hexadecimal numbers can also be used, but they must be preceded by $. FF). The program hoes not have any type of error. If your number is not in correct format. NOTE: I have found out that this program does not work reliably on. Windows 2. 00. 0 systems I have tested on this. I don't know. what is causing this specific problem (other than you should not. Windows NT based system.). I have not tested this program with Windows XP. Example how to use the program. LPTOUT 0. Set all datapins to low level. LPTOUT 2. 55. Set all datapins to high level. LPTOUT 1. Set datapin D0 to high level and all other datapins to low level. How to calculate your own values to send to program. You have to think the value you give to the program as a binary. Every bit of the binary number control one output bit. The following table describes the relation of the bits, parallel port output. Pin 2 3 4 5 6 7 8 9. Bit D0 D1 D2 D3 D4 D5 D6 D7. Value 1 2 4 8 1. For example if you want to set pins 2 and 3 to logic 1 (led on) then you. If you want to set on pins 3,5 and 6 then. In this way you can calculate the value. Making changes to source code. You can easily change te parallel port number int the source code. For more information, check the following. Format of BIOS Data Segment at segment 4. Offset Size Description. WORD Base I/O address of 1st parallel I/O port, zero if none. Ah WORD Base I/O address of 2nd parallel I/O port, zero if none. Ch WORD Base I/O address of 3rd parallel I/O port, zero if none. Eh WORD [non- PS] Base I/O address of 4th parallel I/O port, zero if none. For example change the line addr: =Mem.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2017
Categories |