Instances of this class handle access to an Analog Devices AD420 digital-to-current loop converter via the generic SPI interface for the MityDSP. More...
#include <core/DspDacAd420.h>
Public Member Functions | |
tcDspDacAd420 (tcDspSpi *apSpi, tcDspOutputLatch *apLatch=NULL, unsigned int anLatchID=0) | |
This constructor is used to open an interface to an AD420 via the provided SPI interface. | |
~tcDspDacAd420 () | |
Default destructor. | |
bool | update (unsigned short anData) |
Updates the AD420 with the provided 16-bit data. | |
Protected Attributes | |
tcDspSpi * | mpSpi |
Access to the SPI bus. | |
tcDspOutputLatch * | mpLatch |
Access to latch selector. | |
unsigned int | mnLatchID |
ID of latch to use (if any). | |
unsigned short | mnLastData |
Last data written to DAC. |
Instances of this class handle access to an Analog Devices AD420 digital-to-current loop converter via the generic SPI interface for the MityDSP.
tcDspDacAd420::tcDspDacAd420 | ( | tcDspSpi * | apSpi, | |
tcDspOutputLatch * | apLatch = NULL , |
|||
unsigned int | anLatchID = 0 | |||
) |
This constructor is used to open an interface to an AD420 via the provided SPI interface.
[in] | apSpi | - Pointer to the SPI interface for the DAC8534. |
[in] | apLatch | - Pointer to an output latch (default:NULL) |
[in] | anLatchID | - ID of the latch to use for this device, if any |
tcDspDacAd420::~tcDspDacAd420 | ( | ) |
bool tcDspDacAd420::update | ( | unsigned short | anData | ) |
Updates the AD420 with the provided 16-bit data.
The data is loaded to the DAC output immediately.
[in] | anData | - 16-bit data to load to specified DAC channel. |
tcDspSpi* MityDSP::tcDspDacAd420::mpSpi [protected] |
Access to the SPI bus.
tcDspOutputLatch* MityDSP::tcDspDacAd420::mpLatch [protected] |
Access to latch selector.
unsigned int MityDSP::tcDspDacAd420::mnLatchID [protected] |
ID of latch to use (if any).
unsigned short MityDSP::tcDspDacAd420::mnLastData [protected] |
Last data written to DAC.