PCI-RS422 Manual
Page 5-4
Manual 00650-521-1
After the above is done, the card is ready to send data. To transmit a string of data, the transmitter
must first check Bit 5 of the Line Status Register at Base A5. That bit is the
transmitter-holding-register-empty flag. If it is high, the transmitter has sent the data. The
process of checking the bit until it goes high followed by a write is repeated until no data remains.
After all data has been transmitted, the RTS bit should be reset by writing a 0 to Bit 1 of the
Modem Control Register.
The following C code fragment demonstrates this process:
outportb(BA4, inportb(BA4)|0x02);
/*Set RTS bit without altering states of other bits*/
while(data[i]); /*While there is data to send*/
{
while(!(inportb(BA5)&0x20)); /*Wait until transmitter is empty*/
outportb(BASEADDR,data[i]);
i++;
}
outportb(BA4, inportb(BA4)&0xFD);
/*Reset RTS bit without altering states of other bits*/
Caution
The OUT2 bit of the UART must be set ‘TRUE’ for proper interrupt driven communication.
Legacy software uses this bit to gate interrupts and the card may not communicate if bit 3 of
register 4 (Modem Control Register) is not set.
ACCES32.DLL
Developed for use with Windows 95/98/NT, this driver provides programmers with a fast, simple
way to access I/O memory-mapped devices and to control hardware such as data acquisition cards
by means of direct register access. ACCES32 is in the form of a 32-bit dynamic link library, is
compatible with all popular data acquisition cards currently on the market, and makes no
assumptions as to how the hardware is configured.
Windows 95/98/NT operating systems try to protect the computer from runaway programs by
removing the ability to access ports. Register level access is extremely difficult. Available
solutions involve using an OLE module and wrapping a 16-bit DLL in an object translation layer
before it can be used in a 32-bit program. This is a
slow
and bulky process.
ACCES32.DLL provides direct register access (to any port not currently registered as being in
use) faster and easier and works without wrappers using the standard 32-bit calling convention.
ACCES32.DLL provides fast, simple access to memory-mapped I/O devices and to control
hardware such as data acquisition cards.