Sensoray 7429 User Manual
Page 16

The CRMT and DAV bits are used for communication handshake control as described
in the next section. During a coprocessor reset, CRMT is held low — this prevents the
host from writing to the command register before the coprocessor is ready to commu-
nicate.
The ALARM bit indicates that one or more of the programmable channel limits was ex-
ceeded. This bit will not go to its active state until at least one channel limit value has
been downloaded onto the coprocessor board. The ALARM bit is reset when the co-
processor is reset or when the read alarm flags command is executed (see programming
chapter).
The FAULT bit indicates that the coprocessor self-test failed. This bit is set by either
a system reset or soft reset by command from the host processor. As part of its initial-
ization sequence the coprocessor performs a self-test, clearing the FAULT bit if all
board functions are confirmed to be functioning properly. The self-test consumes ap-
proximately one-half second to complete. Note that the red LED near the top of the co-
processor board reflects the state of the FAULT bit.
Handshake Mechanism
Prior to writing a byte into the command register, the host must test the coprocessor sta-
tus port CRMT bit. When CRMT contains a logic 1, the command register is ready to
accept a new byte. The host should write to the command register only when CRMT
contains a logic 1.
Similarly, the DAV status bit must be tested before reading a byte from the coprocessor
data register. When DAV contains a logic 1 value, a new byte is available in the data
register for reading by the host. The host should read from the data register only when
DAV contains a logic 1.
Although these handshake rules are simple, failure to observe them will most likely re-
sult in communication errors.
Sample Drivers
We suggest incorporating procedures into the host processor's 7429 drivers which hide
the communication handshake protocol from higher software layers. Sample QuickBa-
sic drivers are shown below. These drivers are referenced in the programming exam-
ples throughout this manual.
STATUS REGISTER
CRMT
ALARM
FAULT
DAV
X
X
X
X
N OT U SED
C OPR OCESS OR CIR CU IT FA ULT D ETEC TED
C H AN NEL ALA RM IS SOU ND ING
BY TE C AN BE R EA D FROM D ATA R EGISTER
BY TE C AN BE SE NT TO C OMMA ND REGISTER
D7
D 6
D5
D4
D3
D2
D1
D0