We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2020-11-25
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: DAC
Downloaded: 2174 times
Not followed.
License: MIT license
DAC 9 Click is a compact add-on board that contains a fully-featured, highly accurate digital-to-analog converter. This board features the DAC80501, a 16-bit voltage-output digital-to-analog converter with precision internal reference from Texas Instruments. It supports both I2C and SPI serial interface and offers a linearity of < 1 LSB.
Do you want to subscribe in order to receive notifications regarding "DAC 9 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "DAC 9 click" changes.
Do you want to report abuse regarding "DAC 9 click".
Library Description
The library covers all the necessary functions to control the DAC 9 Click board™. This library holds functions that can be used to write data to the device in order to set up the device or set output voltage. Read function can be used with I2C communication exclusively.
Key functions:
void dac9_soft_reset ( );
- The function is used to perform software reset.uint8_t dac9_set_gain ( uint16_t en_ref_div, uint16_t en_buff_gain );
- The function is used to set gain and internal voltage reference.uint8_t dac9_set_vout ( uint16_t vout_mv );
- The function is used set Vout ( mV ) by calculating input data and writing it to the DAC data register.Examples description
The application is composed of three sections :
void application_task ( )
{
uint16_t n_cnt;
for ( n_cnt = 0; n_cnt <= res; n_cnt += 500 )
{
WordToStr(n_cnt, log_txt );
mikrobus_logWrite( "Output Voltage : ", _LOG_TEXT );
Ltrim(log_txt);
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( "mV", _LOG_LINE );
dac9_set_vout( n_cnt );
Delay_ms( 2000 );
}
}
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.