dac8 2.0.0.0
Public function

Functions

void dac8_cfg_setup (dac8_cfg_t *cfg)
 Config Object Initialization function.
 
DAC8_RETVAL dac8_init (dac8_t *ctx, dac8_cfg_t *cfg, uint8_t master_mode)
 Initialization function.
 
void dac8_generic_write (dac8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void dac8_generic_read (dac8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
DAC8_RETVAL dac8_enable_sync (dac8_t *ctx, uint8_t en_sync)
 Enable synchronous function.
 
DAC8_RETVAL dac8_set_config (dac8_t *ctx, uint16_t en_ref_pwdwn, uint16_t en_dac_pwdwn)
 Set config function.
 
DAC8_RETVAL dac8_set_gain (dac8_t *ctx, uint16_t en_ref_div, uint16_t en_buff_gain)
 Set gain function.
 
void dac8_set_synchronously_load (dac8_t *ctx)
 Set synchronously load function.
 
void dac8_soft_reset (dac8_t *ctx)
 Set reset function.
 
uint8_t dac8_get_ref_alarm (dac8_t *ctx)
 Get ref alarm function.
 
DAC8_RETVAL dac8_set_vref (dac8_t *ctx, uint16_t vref_mv)
 Set vref function.
 
void dac8_device_enable (dac8_t *ctx, uint8_t en_sel)
 Device enable function.
 
void dac8_set_ldac (dac8_t *ctx, uint8_t ldac_sel)
 Set LDAC function.
 
void dac8_load_dac (dac8_t *ctx)
 Load DAC function.
 
void dac8_generic_spi_write (dac8_t *ctx, uint32_t tx_data)
 Generic SPI write function.
 
void dac8_device_config (dac8_t *ctx, dac8_cfg_data_t cfg_data)
 Set device config function.
 

Detailed Description

Function Documentation

◆ dac8_cfg_setup()

void dac8_cfg_setup ( dac8_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ dac8_device_config()

void dac8_device_config ( dac8_t * ctx,
dac8_cfg_data_t cfg_data )

Set device config function.

Parameters
ctxClick object.
dac8_cfg_tStructure where data be stored.

@description The function set configuration of the DAC8554, 16-bit, quad-channel, ultra-low glitch, voltage output digital-to-analog converter on DAC 8 Click board.

◆ dac8_device_enable()

void dac8_device_enable ( dac8_t * ctx,
uint8_t en_sel )

Device enable function.

Parameters
ctxClick object.
en_sel
   
- 0x00 ( DAC8_DAC8554_DISABLE ) : Disable.
- 0x01 ( DAC8_DAC8554_ENABLE )  : Enable.

@description The function device enable - EN ( RST ) pin tied to a logic high or disable - tied to a logic low of the DAC8554, 16-bit, quad-channel, ultra-low glitch, voltage output digital-to-analog converter on DAC 8 Click board.

◆ dac8_enable_sync()

DAC8_RETVAL dac8_enable_sync ( dac8_t * ctx,
uint8_t en_sync )

Enable synchronous function.

Parameters
ctxClick object.
en_sync
- 0x0000 ( DAC8_SYNC_DISABLE ) : Asynchronous mode.
- 0x0001 ( DAC8_SYNC_ENABLE )  : Synchronous mode.
Return values
status
 
- 0x00 ( DAC8_ERROR )   : Error.
- 0x01 ( DAC8_SUCCESS ) : Success.

@description The function set synchronous or asynchronous mode of the DAC60501, 16-Bit, 14-Bit, and 12-Bit, 1-LSB INL, Voltage-Output DACs With Precision Internal Reference on DAC 8 Click board.

◆ dac8_generic_read()

void dac8_generic_read ( dac8_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function reads data from the desired register.

◆ dac8_generic_spi_write()

void dac8_generic_spi_write ( dac8_t * ctx,
uint32_t tx_data )

Generic SPI write function.

Parameters
ctxClick object.
tx_data24-bit data to write.

@description The function write the 24-bit data to the shift registe of the DAC8554, 16-bit, quad-channel, ultra-low glitch, voltage output digital-to-analog converter on DAC 8 Click board.

◆ dac8_generic_write()

void dac8_generic_write ( dac8_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function writes data to the desired register.

◆ dac8_get_ref_alarm()

uint8_t dac8_get_ref_alarm ( dac8_t * ctx)

Get ref alarm function.

Parameters
ctxClick object.
Return values
return
 
- 0x00 : Ok.
- 0x01 : Difference between the reference and supply pins 
is below a minimum analog threshold.

@description The function get reference alarm of the DAC60501, 16-Bit, 14-Bit, and 12-Bit, 1-LSB INL, Voltage-Output DACs With Precision Internal Reference on DAC 8 Click board.

◆ dac8_init()

DAC8_RETVAL dac8_init ( dac8_t * ctx,
dac8_cfg_t * cfg,
uint8_t master_mode )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ dac8_load_dac()

void dac8_load_dac ( dac8_t * ctx)

Load DAC function.

Parameters
ctxClick object.

@description The function load DAC s are simultaneously updated with the contents of the corresponding data buffers. Used as a positive edge triggered timing signal for asynchronous DAC updates. Data buffers of all channels must be loaded with desired data before call Load DAC function.

◆ dac8_set_config()

DAC8_RETVAL dac8_set_config ( dac8_t * ctx,
uint16_t en_ref_pwdwn,
uint16_t en_dac_pwdwn )

Set config function.

Parameters
ctxClick object.
en_ref_pwdwn
 
- 0x0000 ( DAC8_CONFIG_REF_PWDWN_ENABLE )  : Enable the internal reference.
- 0x0001 ( DAC8_CONFIG_REF_PWDWN_DISABLE ) : Disables the internal reference.
en_dac_pwdwn
 
- 0x0000 ( DAC8_CONFIG_DAC_PWDWN_DISABLE ) : DAC in power-up mode.
- 0x0001 ( DAC8_CONFIG_DAC_PWDWN_ENABLE )  : DAC in power-down mode.
Return values
status
 
- 0x00 ( DAC8_ERROR )   : Error.
- 0x01 ( DAC8_SUCCESS ) : Success.

@description The function set configuration of the DAC60501, 16-Bit, 14-Bit, and 12-Bit, 1-LSB INL, Voltage-Output DACs With Precision Internal Reference on DAC 8 Click board.

◆ dac8_set_gain()

DAC8_RETVAL dac8_set_gain ( dac8_t * ctx,
uint16_t en_ref_div,
uint16_t en_buff_gain )

Set gain function.

Parameters
ctxClick object.
en_ref_div
 
- 0x0000 ( DAC8_GAIN_REF_DIV_DISABLE ) : Reference voltage is unaffected.
- 0x0001 ( DAC8_GAIN_REF_DIV_2 )       : Reference voltage is internally 
divided by a factor of 2.
en_buff_gain
 
- 0x0000 ( DAC8_GAIN_BUFF_GAIN_1 ) : DAC has a gain of 1.
- 0x0001 ( DAC8_GAIN_BUFF_GAIN_2 )  : DAC has a gain of 2.
Return values
status
 
- 0x00 ( DAC8_ERROR )   : Error.
- 0x01 ( DAC8_SUCCESS ) : Success.

@description The function set gain of the DAC60501, 16-Bit, 14-Bit, and 12-Bit, 1-LSB INL, Voltage-Output DACs With Precision Internal Reference on DAC 8 Click board.

◆ dac8_set_ldac()

void dac8_set_ldac ( dac8_t * ctx,
uint8_t ldac_sel )

Set LDAC function.

Parameters
ctxClick object.
en_sel
   
- 0x00 ( DAC8_LDAC_LOW )  : Low state.
- 0x01 ( DAC8_LDAC_HIGH ) : High state.

@description The function states of the LD ( PWM ) pin of the DAC8554, 16-bit, quad-channel, ultra-low glitch, voltage output digital-to-analog converter on DAC 8 Click board.

◆ dac8_set_synchronously_load()

void dac8_set_synchronously_load ( dac8_t * ctx)

Set synchronously load function.

Parameters
ctxClick object.

@description The function set synchronously load the DAC in synchronous mode of the DAC60501, 16-Bit, 14-Bit, and 12-Bit, 1-LSB INL, Voltage-Output DACs With Precision Internal Reference on DAC 8 Click board.

◆ dac8_set_vref()

DAC8_RETVAL dac8_set_vref ( dac8_t * ctx,
uint16_t vref_mv )

Set vref function.

Parameters
ctxClick object.
vref_mvVref in mV.
Return values
status
  
- 0x00 ( DAC8_ERROR )   : Error.
- 0x01 ( DAC8_SUCCESS ) : Success.

@description The function set Vref ( mV ) by write 12-bit to the DAC data register of the DAC60501, 16-Bit, 14-Bit, and 12-Bit, 1-LSB INL, Voltage-Output DACs With Precision Internal Reference on DAC 8 Click board.

◆ dac8_soft_reset()

void dac8_soft_reset ( dac8_t * ctx)

Set reset function.

Parameters
ctxClick object.

@description The function set reset of the DAC60501, 16-Bit, 14-Bit, and 12-Bit, 1-LSB INL, Voltage-Output DACs With Precision Internal Reference on DAC 8 Click board.