DAC 7 click
DAC 7 click
DAC 7 click carries the AD5624R, a low-power four-channel, 12-bit buffered Digital-to-Analog Converter from Texas Instruments. AD5624R converts digital value to the corresponding voltage level using external voltage reference. This will help you convert digital information from the main board to four analog outputs on the DAC 7 click. For that purpose, DAC 7 click uses MCP1541, which is a low-dropout precision voltage reference with 4.096V output voltage. With all those possibilities on board, DAC 7 click makes a perfect choice for an accurate and simple generation of analog signals for various purposes, such as programmable Power Supplies, Laser Drivers, Projectors, IP Network cameras, auto focus digital still camera lens, and more.
DAC 7 click board™ is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
HOW DOES IT WORK?
DAC 7 click is an advanced 12-bit, four-channel digital to analog converter (DAC). This device communicates with the main MCU through the is compatible with standard SPI, QSPI™, MICROWIRE™, and DSP interface standards. Also, there is a selectable voltage reference as well with onboard jumpers which makes this click more open for specific projects.
AD5624R from Analog Devices, is the main active component on DAC 7 click board is AD5624R from Analog Devices. This is a low power, four channel, 12-bit voltage output Digital-To-Analog Convertor (DAC). It is specified monotonic by design across a wide power supply range from 2.7 V to 5,5 V. Using an external reference, the AD5624R provides a full-scale output voltage in the range from 0V to Vref, while consuming 0,1 mA quiescent current per channel. The AD5624R also includes per channel, user programmable, power down registers facilitate the DAC output buffers to start in a power down to 10K state and remain in this state until a power up command is issued to these output buffers.
The DAC 7 click has a high precision voltage reference included onboard. For that purpose we have used 4.096V precision voltage reference MCP1541 from Microchip. This little SOT23 device is stable with capacitive loads. It has regulations for both sink and source and is very accurate. This gives DAC 7 click good flexibility for use in various applications.
Low quiescent current, wide power supply range, and per channel power down option makes AD5624R ideal for low power, battery operated system. The device communicates through SPI interface. Besides the standard SPI, QSPI™, MICROWIRE™, and DSP interface standards are also supported. However, this click board™ is using standard SPI communication with the main MCU.
The reference voltage level can be selected via VREF SEL jumper, between 4.096V and 5V. This allows for both 4.096V and 5V Voltage outputs from DAC 7 click can be connected through 9-therminal block where first is common GND and the last eight are VOUTA to VOUTH.
This Click Board™ is designed to be operated only with 5V logic level. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with logic levels of 3.3V.
SPECIFICATIONS
Type | DAC |
Applications | Suitable for programmable power supplies, programable window comparator, VCOM biasing in display panel, laser driver in multifunction printers, auto focus digital still camera lens, ATM machines, currency counters, barcode readers, IP network cameras, projectors |
On-board modules | AD5624R- a low power, four channel, 12-bit voltage output Digital-To-Analog Convertor (DAC) from Analog Devices; and MCP1541 - a 4.096V precision voltage reference IC, from Microchip. |
Key Features | High precision voltage reference, low power consumption, high speed SPI interface, 12bit resolution, reference voltage selection |
Interface | SPI |
Compatibility | mikroBUS |
Click board size | M (42.9 x 25.4 mm) |
Input Voltage | 5V |
PINOUT DIAGRAM
This table shows how the pinout on DAC 7 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 |
---|---|---|---|
JP1 | VREF SEL | Left | DAC Reference Voltage Selection 4.096/5V, left position 4.096, right position 5V |
LD1 | PWR | - | Power LED indicator |
SOFTWARE SUPPORT
We provide a library for the DAC 7 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 DAC 7 click board. Library performs a standard SPI interface communication.
Key functions:
-
DAC7_RETVAL_T dac7_set_ch_voltage ( uint8_t addr_ch, uint16_t vol_val, uint16_t v_ref_mv )
- Set the voltage values of the specified channel function. -
DAC7_RETVAL_T dac7_set_power ( uint8_t pwr_en, uint8_t sel_ch )
- Set power mode function. -
DAC7_RETVAL_T dac7_sw_reset ( void )
- Software reset function.
Examples description
The application is composed of three sections :
- System Initialization - Initializes SPI, set CS pin as output and start to write log.
- Application Initialization - Initialization driver enables - SPI, executes call software reset and all channels power on, also write log.
- Application Task - (code snippet) This is an example that demonstrates the use of the DAC 7 Click board. In this example, we adjust the DAC output voltage from 1000 mV to 4000 mV for the channels, starting from channel A to channel D and set the DAC output voltage to 5000 mV for all channels. Results are being sent to the Usart Terminal where you can track their changes. All data logs write on USB uart changes every 5 sec.
void application_task ( ) { if ( dac7_set_ch_voltage ( DAC7_CHANNEL_A, 1000, v_ref_sel ) == DAC7_SUCCESS ) { mikrobus_logWrite( " Channel A : 1000 mV ", _LOG_LINE ); } else { mikrobus_logWrite( " ERROR ", _LOG_LINE ); for ( ; ; ); } Delay_ms( 5000 ); mikrobus_logWrite( "-----------------------", _LOG_LINE ); if ( dac7_set_ch_voltage ( DAC7_CHANNEL_B, 2000, v_ref_sel ) == DAC7_SUCCESS ) { mikrobus_logWrite( " Channel B : 2000 mV ", _LOG_LINE ); } else { mikrobus_logWrite( " ERROR ", _LOG_LINE ); for ( ; ; ); } Delay_ms( 5000 ); mikrobus_logWrite( "-----------------------", _LOG_LINE ); if ( dac7_set_ch_voltage ( DAC7_CHANNEL_C, 3000, v_ref_sel ) == DAC7_SUCCESS ) { mikrobus_logWrite( " Channel C : 3000 mV ", _LOG_LINE ); } else { mikrobus_logWrite( " ERROR ", _LOG_LINE ); for ( ; ; ); } Delay_ms( 5000 ); mikrobus_logWrite( "-----------------------", _LOG_LINE ); if ( dac7_set_ch_voltage ( DAC7_CHANNEL_D, 4000, v_ref_sel ) == DAC7_SUCCESS ) { mikrobus_logWrite( " Channel D : 4000 mV ", _LOG_LINE ); } else { mikrobus_logWrite( " ERROR ", _LOG_LINE ); for ( ; ; ); } Delay_ms( 5000 ); mikrobus_logWrite( "-----------------------", _LOG_LINE ); if ( dac7_set_ch_voltage ( DAC7_CHANNEL_ALL, 5000, v_ref_sel ) == DAC7_SUCCESS ) { mikrobus_logWrite( " All Channels: 5000 mV ", _LOG_LINE ); } else { mikrobus_logWrite( " ERROR ", _LOG_LINE ); for ( ; ; ); } Delay_ms( 5000 ); mikrobus_logWrite( "-----------------------", _LOG_LINE ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- 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.