Chapter 4
Programming
©
National Instruments Corporation
4-31
5.
Call
AO_LDAC_Source_And_Update_Mode
to set the update mode
to immediate update mode.
Joint_Reset_Register
AO configuration start = 1;
AO_Command_1_Register
AO LDAC0 source select = 0;
AO DAC0 update mode = 0;
AO LDAC1 source select = 0;
AO DAC1 update mode = 0;
Joint_Reset_Register
AO configuration start = 0;
AO configuration end = 1;
6.
Write to the DAC1 Data Register. For a 12-bit DAC in bipolar mode,
+10V corresponds to 2,047 (0x07FF) and -10V corresponds to
-2,048 (0xF800). Hence, +5V corresponds to 1,024 (0x0400). Writing
this to the DAC1 data register results in +5V appearing at the OUT1
line.
Example 2
This example generates a waveform using polled writes to the data FIFO.
Initialize the buffer with 3000 points. Use polled writes to write each point
to the data FIFO. Updates occur every 2 milliseconds. Output the buffer
5 times. Confirm operation with an oscilloscope.
1.
Perform Analog Output Example 1 Step 1.
2.
Load an array with the voltages of the waveform to be output. For a
12-bit DAC in bipolar mode, +10V corresponds to 2,047 (0x07FF) and
-10V corresponds to -2,048 (0xF800). To convert the voltage you want
to output to the binary value, use the following formula:
binary value = (voltage/10) * 2048
3.
Configure the board by setting the following board level bits.
AO_Configuration_Register:
DACSel<3:0> = 1;
BipDac = 1;
ExtRef = 0;
ReGlitch = 0;
GroundRef = 0;
4.
Reset the data FIFO.
Содержание AT-AI-16XE-10
Страница 131: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 2 National Instruments Corporation...
Страница 132: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 3 AT MIO E Series RLPM...
Страница 133: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 4 National Instruments Corporation...
Страница 134: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 5 AT MIO E Series RLPM...
Страница 135: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 6 National Instruments Corporation...
Страница 136: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 7 AT MIO E Series RLPM...
Страница 137: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 8 National Instruments Corporation...
Страница 138: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 9 AT MIO E Series RLPM...
Страница 139: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 10 National Instruments Corporation...
Страница 140: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 11 AT MIO E Series RLPM...
Страница 141: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 12 National Instruments Corporation...
Страница 142: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 13 AT MIO E Series RLPM...
Страница 143: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 14 National Instruments Corporation...
Страница 144: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 15 AT MIO E Series RLPM...
Страница 145: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 16 National Instruments Corporation...
Страница 146: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 17 AT MIO E Series RLPM...