C-14
I/O Registers
KPCMCIA-12AIAOH User’s Manual
Stop A/D command
Once the data acquisition is started by the trigger/arm command, it can only be stopped by
receiving this command. As mentioned before, the two commands are exclusive. The stop A/D
command should be issued as soon as the required data points are collected to prevent data FIFO
overflow, which is the only flag to indicate data lost during the data acquisition process. Without
the stop command, the A/D may still be running and filling data into the data FIFO whether it is
filled or not. When the data FIFO is full, it will ignore the data samples coming from the A/D
converter.
Latch timer/counter command
This command latches the current value of the timer/counter into the 16-bit read latch register. It
works if the timer/counter is running (on the fly) or not. The latched value will not change until a
new latch command is issued.
Data FIFO program/access control
The A/D data FIFO has two programmable thresholds, almost empty and almost full, and two
associated flags. The almost-empty threshold is not used, nor is the almost-empty flag. By default,
the thresholds are set to 7 bytes (7 to full and 7 to empty) when reset, powered up, or any time the
FIFO is flushed. It can be programmed to any value in between 1 and FIFO size - 1 (in bytes)
according to the application. For example, it can be set to the length of the scan list, half to full
or quarter to full, etc.
To program the FIFO threshold, make sure the A/D has been stopped. Set this bit to 0 by writing
an all 0 byte to the auxiliary control register. Then send a flush A/D FIFO command with the same
bit setting by writing a byte of 40H (hex 40) to the same register. This setting will put the FIFO
into program mode. When accessing the data FIFO at base + 1 the following read/write operation
will be directed to the threshold registers instead. The four byte threshold setting should be writ-
ten into the data FIFO by performing four consecutive write operations. Optionally, the threshold
setting can be read back for verification by performing four consecutive read operations. The
four-byte threshold setting has the format shown in Table C-14.
After the thresholds are programmed, set the access control bit to 1 by writing a command byte
whose bit 0 is set to 1 into the auxiliary control register. This setting will make the following read/
write operation access the data bytes in the FIFO instead of its thresholds. It is recommended that
the access control bit be set to 1 when sending other commands (flush scan list, stop A/D, or trig/
arm) to the KPCMCIA-12AIAOH PC card by writing them into the auxiliary control register after
programming the thresholds. A useful tip for safe operation is to set the bit to 0 only when flushing
and programming the FIFO thresholds.
Although the almost-empty threshold is never used, it has to be programmed because the four
configuration bytes must be accessed as a single entity.
Table C-14
Data FIFO threshold setting
Byte no.
Definition
Valid range
0
Low byte of the almost-empty threshold
0..255
1
High byte of the almost-empty threshold
0..15
2
Low byte of the almost-full threshold
0..255
3
High byte of the almost-full threshold
0..15
Summary of Contents for KPCMCIA-12AIAOH
Page 11: ...1 Introduction...
Page 15: ...2 Installation...
Page 17: ...3 Theory of Operation...
Page 25: ...4 I O Connections...
Page 28: ...5 Optional Accessories...
Page 30: ...A Specifications...
Page 33: ...B PCMCIA Interface...
Page 36: ...C I O Registers...