Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I write to DACs directly using RLP on PCI-6229?

How do I write to DACs directly (no FIFOs) using register-level programming on PCI-6229?

 

Perusing the M-series register map, I don't see anything equivalent to the DAC0 Direct Data or DAC1 Direct Data registers that are part of the earlier E-series products.

 

The DDK ChipObjects and Examples show a function called DAC_Direct_Data(), but I can't locate either a body of C++ code for the function, or a description of the function, that shows what hardware register is accessed for the direct control of a DAC.

 

I'm sure I'm missing something obvious, because the rest of the DDK documentations seems quite clear.

 

Thanks for your help.

 

--- Steve

0 Kudos
Message 1 of 3
(7,164 Views)

Hi Steve-

 

The DAC_Direct_Data register information for M Series is contained within an array of tDAC_Direct_Data instances (tDAC_Direct_Data is declared within the tMSeries.h chipobject). 

 

The register offsets (kOffset, as contained in each instance of tDAQ_Direct_Data) are initialized using tDAC_Direct_Data::initialize() from tMSeries.ipp in tMSeries::_initialize of tMSeries.cpp. 

 

From that function, you can see that the DAC0 Direct Data register is at 0xC0 in bar1, and that each subsequent DAC direct data register is duplicated at i*0x4 (where i is the DAC number (0, 1, ...) you plan to update).

 

Please let me know if you need more clarification.  Thanks-

Tom W
National Instruments
Message 2 of 3
(7,135 Views)

Hi, Tom ---

 

Thank you so much for your detailed explanation.  Not only did you answer my immediate question of physical addresses for DAC_Direct_Data, you pointed me in the right direction to uncover the bit positions for the AO_DAC_Polarity and AO_Update_Mode bits in the AO_Config_Bank bytes.

 

You've been a great help.

 

Thanks again ---

 

--- Steve

 

0 Kudos
Message 3 of 3
(7,104 Views)