Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing the Control/FIFO registers of NI 8422 in DOS

Using the drivers niboot.exe and ni-pnp.exe driver files we are able to access the COM 1-4 ports on the card as these files create mapping of the COM ports and provides the equivalent base address however the base address of the Control Register, Transmitter/Reciever FIFO register are not specified which is necessary to monitor in order to transmitt/recieve data using the DOS and the code in C.
The solution to look for is either look for the memory/base address of the 8422 card or the function in C language which can access the Control Register, Transmitter/Reciever FIFO register of the card.
Also attacthed an document file for reference.
Thanks
bye
naru
0 Kudos
Message 1 of 4
(3,272 Views)
Naru,

The BIOS RAM data area contains the I/O base address of each COM port, up to 4 ports. The BIOS RAM data area is located at memory address 40:0000 (Segment 40, Offset 0). For example, on my machine, the first 8 bytes starting from address 40:0000 are: F8 03 F8 02 E8 03 E8 02. So, starting with COM1, the base addresses are: 3F8 2F8, 3E8, and 2E8.
Message 2 of 4
(3,248 Views)
Hi Rodney Greenstreet,
Well the solution provided is already in the document file NIserial.doc which was attacthed when the query was posted in the forum.
The solution we are looking for is actually, if it is possible to obtain the base address of the Control/FIFO registers of NI 8422 and NOT the COM port base address.
Or is there any other method of accessing these registers without using the drivers.
Thank you
naru
0 Kudos
Message 3 of 4
(3,217 Views)
Naru,

The base address of the COM port is necessary in order to determine the I/O address of the registers on the 16550 based UART. For example, the address of the Line Control Register for COM port 1 is calculated by adding the Base Address of COM port 1 + Offset 3. The following is a table that gives the offset of each register. You can obtain more information by downloading the datasheet of the UART used by the 8422 at www.exar.com (16C654).

Register Offset
RX Buffer 0
TX Buffer 0
Interrupt Enable 2
FIFO Control Register 2
Line Control Register 3
Modem Control Register 4
Line Status Register 5
Modem Status Register 6
Scratch Register 7
0 Kudos
Message 4 of 4
(3,207 Views)