| How To Build Parallel Port Prototypes | |||||||||||||||||||||||||||||||||
| By Gabriel Torres on October 13, 2005 | Page 7 of 7 | ||||||||||||||||||||||||||||||||
![]()
Advanced Features So far we only talked about sending data out the parallel port. Actually you can read data using the parallel port. The standard parallel port, also known as SPP, uses two extra addresses for status (379h) and control (37Ah). If you read the contents of I/O address 379h you will be able to read the status of Busy, Acknowledge, Paper Empty, Select and Error pins found on the parallel port. This can be very useful if you’d like to build a circuit to send data to the computer. For example, if you have some kind of sensor and want your program to turn on an alarm if this sensor is triggered, this is one way to accomplish that. Status AddressAs mentioned above, reading I/O address 379h you can read the status of Busy, Acknowledge, Paper Empty, Select and Error pins. You get an 8-bit value with the following format:
Control AddressWriting data to this I/O address (37Ah) you can use the other control lines available at the parallel port. So in fact you have more output bits on the parallel port that the standard eight data bits, but these extra bits are accessed on a different address. Also, the bit number 4 of the control address masks IRQ7. With this bit set to “1” IRQ7 can occur.
| |||||||||||||||||||||||||||||||||
| Originally at http://www.hardwaresecrets.com/article/233/7 | Pages (7): 1 2 3 4 5 6 7 » | ||||||||||||||||||||||||||||||||
© 2004-8, Hardware Secrets, LLC. All Rights Reserved. Total or partial reproduction of the contents of this site, as well as that of the texts available for downloading, be this in the electronic media, in print, or any other form of distribution, is expressly forbidden. Those who do not comply with these copyright laws will be indicted and punished according to the International Copyrights Law. We do not take responsibility for material damage of any kind caused by the use of information contained in Hardware Secrets. | |||||||||||||||||||||||||||||||||