Take your engineering solutions to the next level with our state-of-the-art ADC
A
A
Hardware Overview
How does it work?
ADC 6 Click is based on the AD7124-8, an 8-channel, low noise, low power, 24bit sigma-delta ADC with reference and programmable gain array from Analog Devices. This IC offers several different power modes and input connection configurations, giving much flexibility to work with. The device can have eight differential or 15 pseudo-differential analog inputs and any combination between them. All the input channels can be configured to be either buffered or unbuffered, depending on the input connection impedance characteristics. The maximum output data rate varies from 2400SPS to 19,200SPS (samples per second) concerning the selected power mode. An ultra-low noise operation produces 22 noise-free bits in all available power modes. The signal routing in the AD7124-8 ADC is done via the internal multiplexer section, which reduces the number of IC pins, yet allows all of the functions to be used on the existing pins. On top of these pins, four more GPIO pins can be used for various tasks, including control of the multiplexer unit. Since the multiplexer is integrated into the chip, the conversion process stays synchronized with the changes made to the pin configuration. So-called setups further manage the input signal. There are eight such setups available on the AD7124-8 ADC module. A single setup consists of four different registers: configuration register, filter register, gain register, an offset register. These registers configure the corresponding set of functions for the connected channel(s). The channel
register is used to configure the basic settings for the corresponding ADC channel, among other options, which of the eight available setups to connect with that channel. This mechanism allows easy configuration of multiple channels, especially when the same settings must be applied to more than one channel, greatly reducing the software complexity since the setups can be reused. An internal bias voltage generator can be routed to the output pins. It is used to bias the negative terminal of the selected input channel. This function is useful in thermocouple applications, as the voltage generated by the thermocouple must be biased around some DC voltage when the ADC operates from a single power supply. The AD7124-8 ADC module is clocked by either an internal clock source, which works at 614.4 kHz. The CLK pin can be used either to output the clock signal available on the ADC or to use the external clock input. This allows the synchronizing of several devices by using the same clock frequency. The internal clock speed is divided depending on the selected operating mode. Selecting low-power operating modes will impact the samples per second that this device can perform. ADC 6 Click uses the SPI interface for communication with the host MCU. The SPI bus pins are routed to the mikroBUS™ SPI pins (MISO, MOSI, SCK, and CS), allowing easy integration with the development system. The device uses SPI mode 3, which means that the clock signal (SCK) is idle HIGH, and the
rising edge of SCLK is the sample edge. The data is clocked out on the falling edge and clocked in on the rising edge of the clock signal pulse. The Data Out pin of the ADC module (DOUT/#RDY) is routed to the mikroBUS™ MISO pin, and besides for the data output, is also used to signal the presence of the valid data in the ADC output shift register. When a valid reading is stored in this register, the #RDY signal will be pulled to a LOW state, indicating the ready status of the data output register. It can be used to trigger an interrupt on the host MCU. The #SYNC pin of the ADC module is used to synchronize reading when more than one device is used. While pulled to a LOW state, the internal ADC sections are reset and held in the reset state. This pin is pulled to a HIGH logic level via the onboard resistor. This pin is routed to the mikroBUS™ RST pin. Several pins are routed to the 2x10 standard pitch of 2.54mm (100mils) header. This allows even easier routing with jumpers or jumper wires, as the header can further configure the ADC in a way impossible by software, i.e., connecting an external clock source or reference voltages. The complete layout of this header can be seen on the schematics of the ADC 6 click. The second 2x10 header is used to connect the input signals. The AD7124-8 ADC module allows several kinds of signals to be routed to these pins via the multiplexing section, allowing diagnostic functions to be interleaved with the conversion of the analog signals.
Features overview
Development board
Nucleo 32 with STM32F031K6 MCU board provides an affordable and flexible platform for experimenting with STM32 microcontrollers in 32-pin packages. Featuring Arduino™ Nano connectivity, it allows easy expansion with specialized shields, while being mbed-enabled for seamless integration with online resources. The
board includes an on-board ST-LINK/V2-1 debugger/programmer, supporting USB reenumeration with three interfaces: Virtual Com port, mass storage, and debug port. It offers a flexible power supply through either USB VBUS or an external source. Additionally, it includes three LEDs (LD1 for USB communication, LD2 for power,
and LD3 as a user LED) and a reset push button. The STM32 Nucleo-32 board is supported by various Integrated Development Environments (IDEs) such as IAR™, Keil®, and GCC-based IDEs like AC6 SW4STM32, making it a versatile tool for developers.
Microcontroller Overview
MCU Card / MCU

Architecture
ARM Cortex-M0
MCU Memory (KB)
32
Silicon Vendor
STMicroelectronics
Pin count
32
RAM (Bytes)
4096
You complete me!
Accessories
Click Shield for Nucleo-32 is the perfect way to expand your development board's functionalities with STM32 Nucleo-32 pinout. The Click Shield for Nucleo-32 provides two mikroBUS™ sockets to add any functionality from our ever-growing range of Click boards™. We are fully stocked with everything, from sensors and WiFi transceivers to motor control and audio amplifiers. The Click Shield for Nucleo-32 is compatible with the STM32 Nucleo-32 board, providing an affordable and flexible way for users to try out new ideas and quickly create prototypes with any STM32 microcontrollers, choosing from the various combinations of performance, power consumption, and features. The STM32 Nucleo-32 boards do not require any separate probe as they integrate the ST-LINK/V2-1 debugger/programmer and come with the STM32 comprehensive software HAL library and various packaged software examples. This development platform provides users with an effortless and common way to combine the STM32 Nucleo-32 footprint compatible board with their favorite Click boards™ in their upcoming projects.
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 ADC 6 Click driver.
Key functions:
adc6_get_adc_data
Get data functionadc6_read_reg
Generic read functionadc6_write_reg
Generic write function
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 ADC6 Click example
*
* # Description
* This application collects data from the sensor, calculates the voltage to a
* digital value and then logs it.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes driver and sets configuration which enables channel 0,
* puts AIN0 on positive analog input and AIN1 on negative analog input,
* enables internal reference voltage (approximately 2.65V (AVDD = 3.3V)),
* and also enables bipolar operation mode and puts device on full power mode.
* When the ADC is configured for unipolar operation, the output code is natural
* (straight) binary with a zero differential input voltage
* resulting in a code of 0x00000000, a midscale voltage resulting in a code
* of 0x00800000, and a full-scale input voltage resulting in a code of 0x00FFFFFF.
* When the ADC is configured for bipolar operation, the output code is offset
* binary with a negative full-scale voltage resulting in a code of 0x00000000,
* a zero differential input voltage resulting in a code of 0x00800000,
* and a positive full-scale input voltage resulting in a code of 0x00FFFFFF.
*
* ## Application Task
* Gets 24-bit converted data in single read mode and logs data on USB UART.
* Repeats operation every 500 ms.
*
*
* \author MikroE Team
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "adc6.h"
// ------------------------------------------------------------------ VARIABLES
static adc6_t adc6;
static log_t logger;
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( void )
{
log_cfg_t log_cfg;
adc6_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.
adc6_cfg_setup( &cfg );
ADC6_MAP_MIKROBUS( cfg, MIKROBUS_1 );
adc6_init( &adc6, &cfg );
adc6_default_cfg( &adc6 );
}
void application_task ( void )
{
uint32_t adc_value = 0;
adc_value = adc6_get_adc_data( &adc6 );
log_printf( &logger, "The ADC value is: 0x%.6LX\r\n", adc_value );
Delay_ms( 500 );
}
void main ( void )
{
application_init( );
for ( ; ; )
{
application_task( );
}
}
// ------------------------------------------------------------------------ END