Comm port access or I/O port access 
Author Message
 Comm port access or I/O port access

Question:  How do I read an I/O port in VB5?  I'm trying to read the COM1
Line Status register at I/O address 3FDH to know when the UART is completely
empty.

I'm using VB5 and open com1 for I/O.  There is external hardware that needs
to switch from transmit to receive immediately after the last byte of data
is sent out of the UART.  If I could read the line status register in the
UART I could test the empty bit for this.  But I can't find a function to
read the input port.  The old basics used INP to read a port.  Is there an
equivalent to this or some function that uses a device driver?  How about
COMM.DRV?  Will that help?  The built-in event will interrupt when the
software output buffer is empty but this happens before the UART has
transmitted all the bytes out.

Thank you very much.
--
Ed
Anti-Spam: Replace 0 (zero) with the letter o



Tue, 30 Jan 2001 03:00:00 GMT  
 Comm port access or I/O port access
Ed,

There is a freeware control at www.lvr.com that you can use to access I/O
ports from VB. Check it out.

Steve

Quote:

>Question:  How do I read an I/O port in VB5?  I'm trying to read the COM1
>Line Status register at I/O address 3FDH to know when the UART is
completely
>empty.

>I'm using VB5 and open com1 for I/O.  There is external hardware that needs
>to switch from transmit to receive immediately after the last byte of data
>is sent out of the UART.  If I could read the line status register in the
>UART I could test the empty bit for this.  But I can't find a function to
>read the input port.  The old basics used INP to read a port.  Is there an
>equivalent to this or some function that uses a device driver?  How about
>COMM.DRV?  Will that help?  The built-in event will interrupt when the
>software output buffer is empty but this happens before the UART has
>transmitted all the bytes out.

>Thank you very much.
>--
>Ed
>Anti-Spam: Replace 0 (zero) with the letter o




Tue, 30 Jan 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. OS port close inaddition to Winsock port close

2. Comm ports in Access

3. Accessing a comm port with VB.Net

4. accessing a comm port

5. VB access to Comm ports

6. Direct access to comm port

7. Comm Port Access

8. -Problem- 16 Bit Comm Port Access in Windows NT

9. Is there an OCX for comm port access?

10. Access Comm Port 2 .....

11. How to loop comm port control to read text files through serial port in VB3

12. I/O port, Parallel port, Serial port

 

 
Powered by phpBB® Forum Software