Modular Electronics  0.1
 All Classes Namespaces Functions Variables Pages
Public Member Functions | List of all members
TetraDac Class Reference

#include <tetra_dac.h>

Inheritance diagram for TetraDac:
DacSpi

Public Member Functions

 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)
 
- Public Member Functions inherited from DacSpi
 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)
 

Additional Inherited Members

- Protected Member Functions inherited from DacSpi
virtual double BytesToVoltage (spi_utils::Message message)
 
virtual spi_utils::Message SetVoltageMessage (uint8_t channel, double voltage)
 
virtual spi_utils::Message InitializeMessage (void)
 

Detailed Description

TetraDac class

Author
Carlos Kometter
Version
0.1
Date
2018

Constructor & Destructor Documentation

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_pinThe sync or chip select of the on-board eeprom.
[in]dac_spi_bus_config_pinThe pin that identifies the dac bus.
[in]eeprom_spi_bus_config_pinThe pin that identifies the eeprom bus.
[in]ldac_pinThe ldac pin used to update the analog outputs.
[in]slot_numberThis number is used to identify the chip or board. (default: 0)
[in]full_scaleThe full scale of the dac voltage in V units. (default: 10)

Member Function Documentation

uint8_t TetraDac::Begin ( void  )

See Dac::Begin and EepromSpi::Begin

uint8_t TetraDac::GetVoltage ( uint8_t  channel)

See Dac::GetVoltage.

uint8_t TetraDac::Initialize ( void  )

See Dac::Initialize

uint8_t TetraDac::SetVoltage ( uint8_t  channel,
double  voltage,
bool  update_outputs = true 
)

See Dac::SetVoltage.

void TetraDac::UpdateAnalogOutputs ( void  )

See Dac::UpdateAnalogOutputs.


The documentation for this class was generated from the following files: