| How To Build Parallel Port Prototypes |
|
|
| $ Check REAL-TIME pricing for LaCie USB 2.0 PCI Card (107435) Serial Adapter $ |
|
|
|
|
|
| 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 Address
As 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:
|
bit 7 |
bit 6 |
bit 5 |
bit 4 |
bit 3 |
bit 2 |
bit 1 |
bit 0 |
|
/BUSY |
ACK |
PE |
SELECT |
ERROR |
X |
X |
X |
Control Address
Writing 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.
|
bit 7 |
bit 6 |
bit 5 |
bit 4 |
bit 3 |
bit 2 |
bit 1 |
bit 0 |
|
X |
X |
X |
IRQ 7 |
/SELECT INPUT |
INIT |
/AUTO FD XT |
/STROBE |
Bi-Directional Modes
If you mastered the basics, you can go ahead and study two different modes the parallel port can work: EPP (Enhanced Parallel Port) and ECP (Enhanced Capabilities Port). These two modes are generically known as “bi-directional modes”, because under these modes the data pins can be used for both input and output, contrary to the standard parallel port mode, SPP, where the port can only send data, not receive (this statement is not completely true, since you can use the status bits to receive data – this technique is called nibble mode).
Using EPP and ECP modes, however, is not so easy as it is to use the standard mode. For full details on these modes as well as far more information on building prototypes using the parallel port, we recommend the book Parallel Port Complete, by Jan Axelson. |
| Pages (7): « 1 2 3 4 5 6 [7] |
| Print Version | Send to Friend |
|
Bookmark Article
| Comments (1)
|
|
| Recommended Deals |  | Adaptec USB2connect™ 4000 (2000300) Serial Adapter
|  | CMS (USB2-CONT) Serial Adapter
|  | Supermicro (SYS-5035G-TB) (SYS5035GTB) Server
|  | Supermicro SuperServer 5025M-i (SYS5025MIB)
|  | IBM eServer xSeries 225 8649 (86495bx)
|
|
Latest News |
October 6, 2008 - 11:10 AM PST |
October 3, 2008 - 11:50 AM PST |
October 3, 2008 - 11:28 AM PST |
October 3, 2008 - 11:17 AM PST |
October 3, 2008 - 11:07 AM PST |
October 2, 2008 - 9:56 AM PST |
October 1, 2008 - 9:51 AM PST |
September 30, 2008 - 9:25 AM PST |
September 29, 2008 - 8:00 AM PST |
September 26, 2008 - 11:52 AM PST |
| .:: More News ::. |
|
Latest Content |
|
|
| Our Most Popular Articles |
792,405 views
|
493,105 views
|
435,983 views
|
419,813 views
|
413,994 views
|
403,721 views
|
362,548 views
|
347,123 views
|
283,908 views
|
274,720 views
|
|
| Latest Threads in Our Forums |
by kiddmanty |
by Hardware Secrets Team |
by Gamer Z |
by Gamer Z |
by aopen |
by aopen |
by aopen |
by aopen |
by C.Gajo |
by Gabriel Torres |
| .:: Visit Our Forums ::. |
|
|