DAC 5 Click Board
DAC 5 Click Board
The DAC 5 Click Board™ carries Texas Instruments DAC53608 IC, a low-power, eight-channel, 10-bit buffered Digital-to-Analog Converter. DAC53608 converts the digital value to the corresponding voltage level using external voltage reference. For that purpose, DAC 5 click uses MAX6106, which is a low-dropout micropower voltage reference with 2,048V output voltage.
With all those possibilities on board, the DAC 5 Click Board™ makes a perfect choice for an accurate and simple generation of analogue signals for various purposes, such as programmable Power Supplies, Laser Drivers, Projectors, IP Network cameras, autofocus digital still camera lens, and more.
Software Support
We provide a library for the DAC 5 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library initializes and defines the I2C bus and drivers that offer a choice for writing data in register and reads data from register. The library includes function for sending data to output, configuration device, sets LDAC states, reading device info(DEVICE ID), software reset, clear and generic read and write functions.
Key Functions
uint8_t dac5_sendData(uint8_t dataReg, uint16_t dataBuff)
- Function for sending data to outputvoid dac5_config(uint16_t configData)
- Configuration functionuint8_t dac5_setLdacPin(uint8_t status)
- Function for setting LDAC pin statusvoid dac5_clear()
- Function for clearing data from output
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C module
- Application Initialization - Initializes driver init, tests communication and configures device for measureing
- Application Task - Sends 4 different values to one output and prints expected measurement
void applicationTask() { uint16_t sender[4] = {0x0118, 0x0FF0, 0x0AAC, 0x0DD4}; uint16_t expected[4] = {140, 2030, 1360, 1760}; uint8_t endCount = 4; uint8_t i; for (i = 0; i < endCount; i++) { if (dac5_sendData(_DAC5_REG_DAC_A_DATA, sender[i]) == _DAC5_ERROR) { mikrobus_logWrite( "-ERROR SENDING DATA", _LOG_LINE); mikrobus_logWrite( " ", _LOG_LINE); } else { mikrobus_logWrite( "-SUCCESFUL SENDING DATA", _LOG_LINE); mikrobus_logWrite( " ", _LOG_LINE); mikrobus_logWrite( "Sending : ", _LOG_TEXT); IntToStr(sender[i], demoText); mikrobus_logWrite( demoText, _LOG_LINE); mikrobus_logWrite( "Expected return around : ", _LOG_TEXT); IntToStr(expected[i], demoText); mikrobus_logWrite( demoText, _LOG_TEXT); mikrobus_logWrite( " mV ", _LOG_LINE); } Delay_ms ( 5000 ); dac5_clear(); mikrobus_logWrite( "Clearing output... ", _LOG_LINE); mikrobus_logWrite( " ", _LOG_LINE); mikrobus_logWrite( " ", _LOG_LINE); Delay_ms ( 2000 ); } mikrobus_logWrite( "''''''''''''''''''''''''''''''", _LOG_LINE); mikrobus_logWrite( " ", _LOG_LINE); mikrobus_logWrite( " ", _LOG_LINE); Delay_ms ( 1000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need a 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.
MIKROSDK
The DAC 5 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
DAC 5 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.