How does it work?
ADC 16 Click as its foundation uses the ADS7142-Q1, a high-performance two-channel analog-to-digital converter (ADC) from Texas Instruments. The ADS7142-Q1 represents a dual-channel, 12-bit programmable sensor monitor with an integrated 140kSPS SAR-ADC, input multiplexer, digital comparator, data buffer, accumulator, and internal oscillator. The input multiplexer can be configured as two single-ended channels, one single-ended channel with remote ground sensing, or one pseudo-differential channel where the input can swing to approximately half the value of its analog supply input.
ADC 16 Click communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings. Besides, the ADS7142-Q1 allows choosing the least significant bit (LSB) of its I2C slave address using the SMD resistors labeled R8 and R9. This Click board™ also implements event-triggered interrupts per channel, labeled as RDY and ALR and routed on the AN and INT pins of the mikroBUS™ socket, using a digital window comparator with programmable high and low thresholds, hysteresis, and event counter.
This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used, as a reference, for further development.
Specifications
Type
ADC
Applications
Can be used from general-purpose monitoring applications (voltage, current, and temperature) to portable consumer electronics and more
On-board modules
ADS7142-Q1 – high-performance two-channel analog-to-digital converter (ADC) from Texas Instruments
Key Features
Two single-ended channels/One single-ended channel with remote ground sensing/One pseudo-differential channel, low power consumption, 12-bit noise-free resolution, 140kSPS sampling rate, efficient host sleep and wake-up feature, false trigger prevention, and more
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on ADC 16 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 |
R8 | R8 | Populated | I2C Address Selection Resistor |
R9 | R9 | Unpopulated | I2C Address Selection Resistor |
ADC 16 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Analog Input Voltage | 0 | – | 3.3 | V |
Resolution | – | 12 | – | bits |
Operating Temperature Range | -40 | +25 | +120 | °C |
Software Support
We provide a library for the ADC 16 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for ADC 16 Click driver.
Key functions
-
adc16_single_register_write
This function writes a single data to the selected register. -
adc16_single_register_read
This function reads a single data from the selected register. -
adc16_get_voltage
This function reads the voltage from two analog input single-ended channels.
Example Description
This example demonstrates the use of ADC 16 Click board™ by reading the voltage from the two analog input channels.
void application_task ( void )
{
float ain0_voltage, ain1_voltage;
if ( ADC16_OK == adc16_get_voltage ( &adc16, &ain0_voltage, &ain1_voltage ) )
{
log_printf ( &logger, " AIN0 voltage: %.3f V rn", ain0_voltage );
log_printf ( &logger, " AIN1 voltage: %.3f V rnn", ain1_voltage );
Delay_ms ( 100 );
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.ADC16
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. UART terminal is available in all MikroElektronika compilers.
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.