阅读:1242回复:3
串口和并口的问题
我用mscomm.ocx的OnComm的事件来读数据,可是并口却没有这样的控件,我用WINIO打开端口来读数,可是只能用查询的方法,有没有什么办法让我用并口也像串口那样,等有了数据就通知我取数呢?
|
|
|
沙发#
发布于:2005-01-19 00:54
The base address, usually called the Data Port or Data Register is simply used for outputting data on the Parallel Port's data lines (Pins 2-9). This register is normally a write only port. If you read from the port, you should get the last byte sent. However if your port is bi-directional, you can receive data on this address.
The Status Port (base address + 1) is a read only port. Any data written to this port will be ignored. The Status Port is made up of 5 input lines (Pins 10,11,12,13 & 15), a IRQ status register and two reserved bits. Please note that Bit 7 (Busy) is a active low input. E.g. If bit 7 happens to show a logic 0, this means that there is +5v at pin 11. Likewise with Bit 2. (nIRQ) If this bit shows a '1' then an interrupt has not occurred. |
|
板凳#
发布于:2005-01-19 10:25
我用mscomm.ocx的OnComm的事件来读数据,可是并口却没有这样的控件,我用WINIO打开端口来读数,可是只能用查询的方法,有没有什么办法让我用并口也像串口那样,等有了数据就通知我取数呢? 察看以前帖子,写个并口过滤驱动即可 |
|
|
地板#
发布于:2005-01-19 14:37
察看以前帖子,写个并口过滤驱动即可 对Filter就可以 :D |
|
|