#include <AD5764.h>
|
| AD5764 (uint8_t sync_pin, uint8_t spi_bus_config_pin, uint8_t ldac_pin, uint8_t slot_number=0, double full_scale=10.0) |
|
uint8_t | Initialize (void) |
|
virtual double | BytesToVoltage (spi_utils::Message message) |
|
virtual spi_utils::Message | SetVoltageMessage (uint8_t channel, double voltage) |
|
virtual spi_utils::Message | InitializeMessage (void) |
|
| DacSpi (uint8_t sync_pin, uint8_t spi_bus_config_pin, uint8_t ldac_pin, uint8_t bit_resolution, uint8_t clock_divider=4, BitOrder bit_order=MSBFIRST, uint8_t spi_mode=SPI_MODE1) |
|
uint8_t | Begin (void) |
|
uint8_t | Initialize (void) |
|
double | SetVoltage (uint8_t channel, double voltage, bool update_outputs=true) |
|
void | UpdateAnalogOutputs (void) |
|
double | GetVoltage (uint8_t channel) |
|
AD5764 class
- Author
- Carlos Kometter
- Version
- 0.1
- Date
- 2018
- Copyright
- GNU Public License.
AD5764::AD5764 |
( |
uint8_t |
sync_pin, |
|
|
uint8_t |
spi_bus_config_pin, |
|
|
uint8_t |
ldac_pin, |
|
|
uint8_t |
slot_number = 0 , |
|
|
double |
full_scale = 10.0 |
|
) |
| |
Constructor
- Parameters
-
[in] | sync_pin | The sync or chip select of the dac chip. Different than spi_bus_config_pin. |
[in] | spi_bus_config_pin | The pin that identifies the bus. More than one dac can share the same pin. |
[in] | ldac_pin | The ldac pin used to update the analog outputs. |
[in] | slot_number | This number is used to identify the chip or board. (default: 0) |
[in] | full_scale | The full scale of the dac voltage in V units. (default: 10) |
Uses chip specifications (e.g. bit resolution, registers, range) to convert a set of bytes stored in a Message object to voltage. Each DAC has its own convertion function. Check the datasheet of each chip and override the function below accordingly.
- Parameters
-
[in] | message | Message object which stores the bytes for conversion. |
- Returns
- The current voltage setted on the dac register.
Reimplemented from DacSpi.
uint8_t AD5764::Initialize |
( |
void |
| ) |
|
|
inline |
Dummy function for inheritance compatibility.
- Returns
- 0
- Returns
- Message object to intialize Dac.
Reimplemented from DacSpi.
- Parameters
-
[in] | channel | Specifies the channel the Message will set the voltage to. |
[in] | voltage | Specifies the voltage. |
- Returns
- Message object to write data register.
Reimplemented from DacSpi.
The documentation for this class was generated from the following files: