MityDSP::tcDspAd56x5 Class Reference
Instances of this class handle access to a Analog Devices Ad56x5 digital-to-analog converter via the generic I2c interface for the MityDSP.
More...
#include <core/DspAd56x5.h>
List of all members.
Detailed Description
Instances of this class handle access to a Analog Devices Ad56x5 digital-to-analog converter via the generic I2c interface for the MityDSP.
- See also:
- tcDspAd56x5 Page
Member Enumeration Documentation
The teLoadCommand enumeration defines various options for loading one or more 56x5 devices on the I2C bus.
- Enumerator:
eeLoadNone |
don't load value into DAC
|
eeLoadSingle |
load value into current channel
|
eeLoadAll |
load all channels with their current data
|
Constructor & Destructor Documentation
tcDspAd56x5::tcDspAd56x5 |
( |
tcDspI2c * |
apI2C, |
|
|
unsigned int |
anI2cAddr | |
|
) |
| | |
This constructor is used to initialize an AD56x5 over the I2C interface.
- Parameters:
-
[in] | apI2C | The tcDspI2c object to use for communication. |
[in] | anI2cAddr | The address of the AD56x5 on the I2C bus. |
tcDspAd56x5::~tcDspAd56x5 |
( |
|
) |
|
Member Function Documentation
void tcDspAd56x5::set_vref_internal |
( |
bool |
aVrefOn |
) |
|
Enable or disable the internal voltage reference.
- Parameters:
-
[in] | aVrefOn | True to enable internal VREF. False to disable. Power-up state is disabled. |
bool tcDspAd56x5::update |
( |
unsigned int |
anChannel, |
|
|
unsigned short |
anData, |
|
|
teLoadCommand |
aeLoad = eeLoadSingle | |
|
) |
| | |
Updates the specified DAC channel with the provided 12-bit data.
By default, the data is loaded to the DAC output immediately. However, the data can also be written and not loaded, or the data can be written and all DAC channels loaded (this supports simultaneously changing the values on all 4 channels).
- Parameters:
-
[in] | anChannel | DAC channel to write (0-3). |
[in] | anData | 12-bit data to load to specified DAC channel. |
[in] | aeLoad | Specifies if and when data is loaded (eeLoadNone, eeLoadSingle, eeLoadAll). |
- Returns:
- true if successful
- See also:
- DspDac8534.h
Member Data Documentation
Constants for each of the 4 available channels on this device.
Device address on I2C bus.
Last data written to DAC.