Elevate the value of digital signals by converting them into analog signals, opening doors to many applications and possibilities
A
A
Hardware Overview
How does it work?
DAC 5 Click is based on the DAC53608, a low-power, eight-channel, 10-bit voltage output digital-to-analog converter (DAC) from Texas Instruments. It is specified monotonic by design across a wide power supply range from 1,8 V to 5,5 V. Using an external reference, the DAC53608 provides a full-scale output voltage in the range from 0V to Vref while consuming 0,1 mA quiescent current per channel. The DAC53608 includes per channel, user programmable power down registers that facilitate the DAC output buffers to start in power down to 10K and remain in this state until a power-up command is issued to these output buffers. The DAC 5 click has a high-precision voltage reference included onboard. For that purpose, MAX6106 is used, a 2.048V voltage
reference IC from Analog Devices. This little SOT23 device is stable with capacitive loads and requires no output capacitor. It has regulations for both sink and source and is very accurate. This gives DAC 5 click good flexibility for use in various applications. Low quiescent current, wide power supply range, and per channel power down option make DAC53608 ideal for low power, battery-operated system. The device communicates through the I2C interface. These devices support I2C standard mode (100 Kbps), fast mode (400 Kbps), and fast+ mode (1 Mbps). These devices also have a load DAC (LDAC) pin that allows simultaneous DAC updates. LDAC pin is tied with a mikroBUS™ PWM pin. The I2C lines (SCL and SDA) are routed to the dedicated mikroBUS™pins.
The voltage level of the logic section can be selected via VCC SEL jumper, between 3.3V and 5V. This allows both 3.3V and 5V capable MCUs to properly use the I2C communication lines. For I2C address selection, DAC 5 click has a cross-shape jumper. Four positions for I2C selection can be selected with an SMD 0 ohms resistor. DAC 5 click has a Vref SEL jumper for choosing between 2,048 V and 1,024 V, where 1,024 V is achieved using a voltage divider. Another jumper is for VrefIN, choosing between Vref (1,024 and 2,048) and VCC (3,3V and 5V). Voltage outputs from DAC 5 click can be connected through a 9-terminal block where the first is common GND, and the last eight are VOUTA to VOUTH.
Features overview
Development board
Curiosity HPC, standing for Curiosity High Pin Count (HPC) development board, supports 28- and 40-pin 8-bit PIC MCUs specially designed by Microchip for the needs of rapid development of embedded applications. This board has two unique PDIP sockets, surrounded by dual-row expansion headers, allowing connectivity to all pins on the populated PIC MCUs. It also contains a powerful onboard PICkit™ (PKOB), eliminating the need for an external programming/debugging tool, two mikroBUS™ sockets for Click board™ connectivity, a USB connector, a set of indicator LEDs, push button switches and a variable potentiometer. All
these features allow you to combine the strength of Microchip and Mikroe and create custom electronic solutions more efficiently than ever. Each part of the Curiosity HPC development board contains the components necessary for the most efficient operation of the same board. An integrated onboard PICkit™ (PKOB) allows low-voltage programming and in-circuit debugging for all supported devices. When used with the MPLAB® X Integrated Development Environment (IDE, version 3.0 or higher) or MPLAB® Xpress IDE, in-circuit debugging allows users to run, modify, and troubleshoot their custom software and hardware
quickly without the need for additional debugging tools. Besides, it includes a clean and regulated power supply block for the development board via the USB Micro-B connector, alongside all communication methods that mikroBUS™ itself supports. Curiosity HPC development board allows you to create a new application in just a few steps. Natively supported by Microchip software tools, it covers many aspects of prototyping thanks to many number of different Click boards™ (over a thousand boards), the number of which is growing daily.
Microcontroller Overview
MCU Card / MCU

Architecture
PIC
MCU Memory (KB)
32
Silicon Vendor
Microchip
Pin count
40
RAM (Bytes)
2048
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic

Step by step
Project assembly
Track your results in real time
Application Output
1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support
Library Description
This library contains API for DAC 5 Click driver.
Key functions:
dac5_send_data
- Function for sending data to one outputdac5_config
- Function for configurating clickdac5_get_device_id
- Function for reading device ID
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* \file
* \brief Dac5 Click example
*
* # Description
*
* This demo example sends digital signal to one of the outputs and converts it to analog
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes driver init, tests communication and configures device for measuring
*
* ## Application Task
* Sets the channel H with different values and logs the expected output on USB UART
*
* ## NOTE
* In order to improve the accuracy, measure the voltage on the Click board VrefIN SEL jumper and set it as VREF below.
*
* \author Luka Filipovic
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "dac5.h"
// ------------------------------------------------------------------ VARIABLES
static dac5_t dac5;
static log_t logger;
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( void )
{
log_cfg_t log_cfg;
dac5_cfg_t cfg;
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, "---- Application Init ----" );
// Click initialization.
dac5_cfg_setup( &cfg );
DAC5_MAP_MIKROBUS( cfg, MIKROBUS_1 );
dac5_init( &dac5, &cfg );
if ( dac5_get_device_id( &dac5 ) != DAC5_DEVICE_ID )
{
log_printf( &logger, "ERROR - DEVICE IS NOT READY\r\n" );
log_printf( &logger, "Please check the onboard jumpers position.\r\n" );
for ( ; ; );
}
dac5_config( &dac5, DAC5_CONFIG_GLOBAL_ENABLED );
log_printf( &logger, "The Click board is configured.\r\n" );
Delay_ms ( 100 );
}
void application_task ( void )
{
for ( uint16_t cnt = DAC5_MIN_DATA; cnt < DAC5_MAX_DATA; cnt += 500 )
{
if ( dac5_send_data( &dac5, DAC5_REG_DAC_H_DATA, cnt ) == DAC5_ERROR )
{
log_printf( &logger, "ERROR SENDING DATA\r\n" );
}
else
{
log_printf( &logger, "Expected output on channel H:\t %d mV\r\n", ( uint16_t )( ( ( float ) cnt / DAC5_MAX_DATA ) * dac5.vref ) );
}
log_printf( &logger,"------------------------------------\r\n" );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
}
}
int main ( void )
{
/* Do not remove this line or clock might not be set correctly. */
#ifdef PREINIT_SUPPORTED
preinit();
#endif
application_init( );
for ( ; ; )
{
application_task( );
}
return 0;
}
// ------------------------------------------------------------------------ END