#include <tetra_dac.h>
|
| TetraDac (uint8_t dac_sync_pins[n_channels_], uint8_t eeprom_sync_pin, uint8_t dac_spi_bus_config_pin, uint8_t eeprom_spi_bus_config_pin, uint8_t ldac_pin, double full_scale=10.0, uint8_t slot_number=0) |
|
uint8_t | Begin (void) |
|
uint8_t | Initialize (void) |
|
uint8_t | SetVoltage (uint8_t channel, double voltage, bool update_outputs=true) |
|
uint8_t | GetVoltage (uint8_t channel) |
|
void | UpdateAnalogOutputs (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) |
|
TetraDac class
- Author
- Carlos Kometter
- Version
- 0.1
- Date
- 2018
- Copyright
- GNU Public License.
TetraDac::TetraDac |
( |
uint8_t |
dac_sync_pins[n_channels_], |
|
|
uint8_t |
eeprom_sync_pin, |
|
|
uint8_t |
dac_spi_bus_config_pin, |
|
|
uint8_t |
eeprom_spi_bus_config_pin, |
|
|
uint8_t |
ldac_pin, |
|
|
double |
full_scale = 10.0 , |
|
|
uint8_t |
slot_number = 0 |
|
) |
| |
Constructor
- Parameters
-
[in] | dac_sync_pins[] | The sync or chip select of the 4 dac chips. Different than spi_bus_config_pin. |
[in] | eeprom_sync_pin | The sync or chip select of the on-board eeprom. |
[in] | dac_spi_bus_config_pin | The pin that identifies the dac bus. |
[in] | eeprom_spi_bus_config_pin | The pin that identifies the eeprom bus. |
[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) |
uint8_t TetraDac::Begin |
( |
void |
| ) |
|
uint8_t TetraDac::GetVoltage |
( |
uint8_t |
channel | ) |
|
uint8_t TetraDac::Initialize |
( |
void |
| ) |
|
uint8_t TetraDac::SetVoltage |
( |
uint8_t |
channel, |
|
|
double |
voltage, |
|
|
bool |
update_outputs = true |
|
) |
| |
void TetraDac::UpdateAnalogOutputs |
( |
void |
| ) |
|
See Dac::UpdateAnalogOutputs.
The documentation for this class was generated from the following files: