beautypg.com

Status register – Sensoray 518 User Manual

Page 12

background image

11

Status Register

The status register provides the host with information used for coprocessor status monitoring and
communication handshake control. When the host reads the status register, a byte of the
following form is returned:

D7

D6

D5

D4

D3

D2

D1

D0

CRMT

DAV

ALARM

FAULT

X

X

X

X

Status register bits have the following meanings:












Before writing a byte to the command register the host must test the CRMT bit. When CRMT
contains a logic 1, the command register is ready to accept a new command 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 data register.

When DAV contains a logic 1, a new byte is available in the data register for reading by the host.

Although these handshake rules are simple, failure to observe them will almost certainly result in
communication errors.

IMPORTANT NOTE: The CRMT, DAV, and ALARM status bits are not valid when the
FAULT bit is active. After resetting the 518 board (by means of either soft or hard reset), the
host processor should not attempt to handshake to or from the 518 until the FAULT bit changes
to the inactive (logic 0) state.

Bit

Function

CRMT

(Command Register eMpTy) indicates the 518 is ready to accept a
command byte into its command register.

DAV

(Data AVailable) indicates that the 518 data register contains a data byte
ready for access by the host.

ALARM

Indicates one or more programmed channel limits were exceeded.

FAULT Indicates board reset in progress or board fault detected. In normal

operation, this bit goes active for approximately one-half second following
a board reset. The FAULT bit reflects the state of the red LED fault
indicator.