How does it work?
DAC 8 Click is based on the DAC8554IPWR, a 16-bit QUAD channel, ultra-low glitch, voltage-output digital to analog converter from Texas Instruments. It offers good linearity, exceptionally low glitch, and it has high precision output amplifier that allows rail-to-rail output swing over a wide range of supply voltage. What this component additionally has is a Power-On reset function, which ensures that DAC outputs power-up at zero-scale and remains there until a proper write operation occurs. Also, it provides a power-down feature that reduces the current consumption to 175nA per channel.
To achieve a fully flexible range of the DAC8554IPWR, an external voltage reference is made user-programmable. For this purpose, the Click board™ uses another DAC, DAC60501MDGSR, 12-bit DAC from Texas Instruments, whose output is brought to the VREF pin of the DAC8554IPWR. That way, the reference voltage of the DAC8554IPWR can be set at any value between 0V and 5V, provides high precision and low power consumption as well. That makes the DAC 8 Click fully customizable solution, well suited for applications where the maximum precision from the output 16-bit DAC is needed. DAC60501MDGSR uses the I2C serial interface to communicate with the MCU and operates at clock rate up to 100kHz.
The DAC 6 Click communicates with MCU using the 3-Wire SPI serial interface that is compatible with standard SPI, QSPI™, MICROWIRE™ and operates at clock rates up to 50 MHz. Additional functionality such as software simultaneous update capability is implemented and routed at the PWM pin of the mikroBUS™, which allows when new data enter the device, all of DAC outputs can be updated simultaneously and synchronously with the clock. It also possesses enable function routed at CS pin of the mikroBUS™ that is used to connect the SPI interface to the serial port.
This Click Board™ is designed to be operated with both 3.3V and 5V logic levels. The onboard SMD jumper labeled as VCC SEL allows voltage selection for interfacing with both 3.3V and 5V MCUs. More information about the DAC8554IPWR’s functionality, electrical specifications, and typical performance can be found in the attached datasheet. However, the Click board™ comes equipped with a library that contains easy-to-use functions, and a usage example that can be used as a reference for the development.
Specifications
Type
DAC
Applications
Can be used in battery-operated equipment, digital gain and offset adjustment, programmable voltage and current sources, and many more.
On-board modules
DAC 8 Click is based on the DAC8554IPWR, a 16-bit QUAD channel, ultra-low glitch, voltage-output digital to analog converter from Texas Instruments.
Key Features
Low power consumption, high precission, ultra-low glitch, rail-to-rail voltage output, accuracy, stability, and more.
Interface
GPIO,I2C,SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on DAC Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | VCC SEL | Left | Power Supply Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
DAC 8 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | -0.3 | – | 6 | V |
Maximum Current Consumption | – | – | 208 | μA |
SPI Clock Frequency | – | – | 50 | MHz |
Operating Temperature Range | -40 | – | +105 | °C |
Software Support
We provide a library for the DAC 8 Click 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 covers all the necessary functions to control the DAC 8 Click board. A library performs the communication with the DAC60501 via I2C and communication with DAC8554 the SPI interface.
Key functions:
void dac8_generic_i2c_write ( uint8_t reg, uint16_t tx_data )
– Generic I2C ( DAC60501 ) write function.uint16_t dac8_generic_i2c_read ( uint8_t reg )
– Generic I2C ( DAC60501 ) read function.void dac8_generic_spi_write ( uint32_t tx_data )
– Generic SPI ( DAC8554 ) write function.
Examples description
The application is composed of three sections :
- System Initialization – Initializes I2C and SPI and start to write log.
- Application Initialization – Initialization driver enables – I2C. Configure DAC60501: executes call software reset, disable sync and internal reference and disable Power-down mode, the set reference voltage is internally divided by a factor of 2, amplifier for corresponding DAC has a gain of 2. Initialization driver enables – SPI, enable DAC8554, also write log.
- Application Task – (code snippet) This is an example that demonstrates the use of the DAC 8 Click board. DAC 8 board changeing output values: Channel A ~ 2500 mV, Channel B ~ 1250 mV, Channel C ~ 625 mV, Channel D ~ 312 mV. All data logs write on USB uart changes every 5 sec.
void application_task ( ) { mikrobus_logWrite( "---------------------", _LOG_LINE ); cfg_dac.addr = DAC8_ADDR_DEFAULT; cfg_dac.ctrl_upd_an_out = DAC8_CTRL_UPD_AN_OUT_SINGLE_CH_STORE; cfg_dac.dac_sel = DAC8_DAC_SEL_CH_A; cfg_dac.pwr_mode = DAC8_PWR_MODE_POWER_UP; cfg_dac.dac_val = 0xFFFF; mikrobus_logWrite( " Channel A ~ 2500 mV ", _LOG_LINE ); dac8_device_config( cfg_dac ); dac8_load_dac( ); Delay_ms( 5000 ); mikrobus_logWrite( "---------------------", _LOG_LINE ); cfg_dac.addr = DAC8_ADDR_DEFAULT; cfg_dac.ctrl_upd_an_out = DAC8_CTRL_UPD_AN_OUT_SINGLE_CH_STORE; cfg_dac.dac_sel = DAC8_DAC_SEL_CH_B; cfg_dac.pwr_mode = DAC8_PWR_MODE_POWER_UP; cfg_dac.dac_val = 0x7FFF; mikrobus_logWrite( " Channel B ~ 1250 mV ", _LOG_LINE ); dac8_device_config( cfg_dac ); dac8_load_dac( ); Delay_ms( 5000 ); mikrobus_logWrite( "---------------------", _LOG_LINE ); cfg_dac.addr = DAC8_ADDR_DEFAULT; cfg_dac.ctrl_upd_an_out = DAC8_CTRL_UPD_AN_OUT_SINGLE_CH_STORE; cfg_dac.dac_sel = DAC8_DAC_SEL_CH_C; cfg_dac.pwr_mode = DAC8_PWR_MODE_POWER_UP; cfg_dac.dac_val = 0x3FFF; mikrobus_logWrite( " Channel C ~ 625 mV ", _LOG_LINE ); dac8_device_config( cfg_dac ); dac8_load_dac( ); Delay_ms( 5000 ); mikrobus_logWrite( "---------------------", _LOG_LINE ); cfg_dac.addr = DAC8_ADDR_DEFAULT; cfg_dac.ctrl_upd_an_out = DAC8_CTRL_UPD_AN_OUT_SINGLE_CH_STORE; cfg_dac.dac_sel = DAC8_DAC_SEL_CH_D; cfg_dac.pwr_mode = DAC8_PWR_MODE_POWER_UP; cfg_dac.dac_val = 0x1FFF; mikrobus_logWrite( " Channel D ~ 312 mV", _LOG_LINE ); dac8_device_config( cfg_dac ); dac8_load_dac( ); Delay_ms( 5000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- SPI
- UART
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.
mikroSDK
This 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.
For more information about mikroSDK, visit the official page.