Manual PCI-A12-16A
20
Software Tristate Mode
Normally, whenever a control byte is written, all output bits go low, discarding their previous values if they
were already outputs. (This is for compatibility with the industry-standard 8255 chip.)
For example, if the DIO were configured as follows:
•
Port A:
Output, data C5
• Port
B:
Input
•
Port C Hi:
Output, data 0
•
Port C Lo:
Input
And a control byte of 81 (hex) were written, the DIO would change as follows:
•
Port A:
Output, data 00
•
Port B:
Output, data 00
•
Port C Hi:
Output, data 0
•
Port C Lo:
Input
If one of those high bits in port A were an active-low siren, then it would sound. If port A were then re-
initialized by software, the microsecond that takes would still result in a small pulse, which would trigger
latched sensors.
To alleviate this issue, this card has a software tristate mode, enabled by installing the BEN/BTR jumper in
the BTR position. In software tristate mode, whenever a control byte is written, all ports are tristated. Your
software should re-initialize the output ports, then de-tristate them, causing them to all update simultaneously.
Pull-ups on the card cause tristated bits to appear high, so sensors don’t see a low level when a control byte
is written. (However, little drive current is available; this is not quite the same as an actual high output.)
In order to de-tristate the ports, write the same control byte to Base + 14 as you did to Base + 13 before, but
with D7 set low. In the example above, the control byte to de-tristate the ports would be 01. This register can
also be used to tristate the ports without changing their mode, by writing a control byte to Base + 14 with D7
set high.