![WinSystems PCM-MIO-A-1 Скачать руководство пользователя страница 25](http://html1.mh-extra.com/html/winsystems/pcm-mio-a-1/pcm-mio-a-1_product-manual_987917025.webp)
PCM-MIO-A-1/Software Summary
v1.0
www.winsystems.com
Page 25
8.2.7 Readback Enable
Each time a command is issued to one of Linear Technology LTC-2704
devices, the value of one of the buffers is simultaneously shifted out of
the device. Except when issuing one of the specific readback commands
(Ax, Bx, Cx, Dx), the data returned corresponds to the Readback Pointer
from the previous command as shown in the Command Codes Table. The
Readback Enable bit must be set to
1
to read this data.
NOTE If the Readback Enable bit is set to
0
, a read of the DAC data registers
returns the last value written to that register not the Readback value of
the actual buffers.
8.2.8 D/A Interrupts
To operate using interrupt mode, IRQ routing must be configured and
interrupts enabled for each device. This is achieved with the Resource and
Resource Enable registers. The following would apply to D/A1:
1. Write
xxxx1xxx
to bit 3 of BASE +11 (select access to Resource Register).
2. Write IRQ selection (0-15 hex) to bits 3-0 of BASE +10 (
xF Hex
= IRQ 15).
3. Write
xxxxxx1
BASE +11 to enable the IRQ.
Enabling an interrupt for D/A2 can be achieved in the same manner with
the appropriate offset.
It is possible for both devices to share an interrupt or use individual
interrupts. When sharing interrupts, the most efficient method to
determine which device generated an interrupt request is to utilize the
Master Interrupt Status Register.
8.2.9 D/A Examples
The most basic method is to first set the output span for a channel and
then write the output value for that channel. Notice that the configuration
and data write operations can each be performed with either a single or
double instruction sequence. Each channel can be updated individually
using command values 6Xh and 7Xh (for configuration and output data,
respectively), which pre-loads the value and present it to the DAC with a
S3
S2
S1
S0
Span
0
0
0
0
Unipolar 0 V to 5 V
0
0
0
1
Unipolar 0 V to 10 V
0
0
1
0
Bipolar -5 V to 5 V
0
0
1
1
Bipolar -10 V to 10 V
0
1
0
0
Bipolar -2.5 V to 2.5 V
0
1
0
1
Bipolar -2.5 V to 7.5 V