User`s guide

Elan Digital Systems Ltd. 17 AD125 USER’S GUIDE
3.4 TRIGGERING
3.4.1 THRESHOLD
The AD125 uses an 8-bit 2’s complement OR “true binary” trigger
threshold value. This is compared against the top 8-bits of the 12-
bits of A to D data to decide when to trigger the card. The value
loaded into the threshold register MUST be appropriate to the
conversion mode selected: 2’s complement for Bipolar, “true binary”
for Unipolar.
In C/C++ or PASCAL the threshold is calculated as a SHORT INT
in the following way:
Bipolar mode:
TRIGBYTE = ROUND(128*(Vtrig/Vfs)); /*Vfs = full scale input voltage */
Unipolar mode:
TRIGBYTE = ROUND(256*(Vtrig/Vfs)); /*Vfs = full scale input voltage */
Remember that the value loaded into the trigger threshold register
varies depending on the full scale input range selected via GS0..3.
When a trigger event occurs while ENTRIG is low in SETUP REG
1, the READ POINTER is frozen but the WRITE POINTER
continues to run. Once the READ and WRITE POINTER are equal
(i.e. the buffer is full) the AD125 halts and sets the RUN bit in
SETUP REG 1. This can be polled in software to see when the card
has halted. If enabled via the HOST, this will also cause an
interrupt. Software can also check the TRIGGER STATUS via Bit 5
of SETUP REG 1: a 1 indicates TRIGGERED.
Triggering is only used in BURST mode.