Overview
The Socketed CLIP for the NI 5761 provides access to a SPI Engine, which can be used to write and read configuration registers on the ADC of the NI 5761. In this example, I configure the registers that control the gain of the ADS62P49 ADC on the NI 5761.
Description
The NI 5761 uses two Texas Instruments ADS62P49 ADCs. One for channels 0 and 1, and another for channels 2 and 3. Channels for each ADC can be configured with separate gain, but in this example, we will be configuring both channels together.
The register address 0x55 is used for specifying signal gain and time offset. The 4 most significant bits configure the gain from 0dB (0000) to 6dB (1100) in half dB increments. We will be writing to these bits.
To enable writing to registers, we need to write to address 0x00 a value of 0. To enable reading of a register, we need to write to the same address a value of 1.
The steps for any read write operation are:
In the example code, the SPI Engine loop automatically takes all of these steps. The engine will also automatically write to the 0x00 address the appropriate value depending on if you are choosing a read or a write operation. This SPI Engine code is based off the Configure ADC example project for the NI 5752.
On the host side, the user should write the address and the data, and then write true to SPI Start to start the operation.
The host side code used in this example uses the same code found in the 5761 Getting Started example project to acquire data from the card.
The ADS62P49 has many other configureable options. Documentation for this can be found on Texas Instrument's website.
Please note: NI does not test alternative configurations of the ADCs on the 5761. While you can configure the settings on the ADC, this may lead to unwanted results and behavior that is not supported.
Steps to Implement or Execute Code
Requirements
Software
LabVIEW 2014 SP1
Hardware
NI 5761
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.