How does it work?
ADC 19 Click as its foundation uses the ADC122S101, a high-performance two-channel CMOS analog-to-digital converter (ADC) from Texas Instruments. The ADC122S101 comes with an integrated 12-bit SAR-ADC, input multiplexer, and control logic block, allowing ADC to communicate with MCU through a high-speed serial interface. Unlike the conventional practice of specifying performance at a single sample rate only, this ADC is fully specified over a sample rate range of 500ksps to 1Msps. The converter is based on a successive-approximation register architecture with an internal track-and-hold circuit configurable to accept one or two input signals at its input channels.
This ADC 19 Click communicates with MCU through a standard SPI interface and operates at clock rates up to 16MHz, providing data in digital format of 12-bits. The output serial data is straight binary and is compatible with several standards, such as SPI, QSPI, MICROWIRE, and many standard DSP serial interfaces.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
ADC
Applications
Can be used for the most demanding applications, from general-purpose remote data acquisition applications to portable consumer electronics and more
On-board modules
ADC122S101 – two-channel CMOS 12-bit analog-to-digital converter from Texas Instruments
Key Features
Low power consumption, specified over a range of sample rates, two input channels, high-speed serial interface, high performance, and more
Interface
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 ADC 19 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 | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
ADC 19 click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Analog Input Voltage | 0 | – | 5 | V |
Resolution | – | 12 | – | bits |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the ADC 19 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 19 Click driver.
Key functions
-
adc19_set_vref
This function sets the voltage reference value that will be used for voltage calculation. -
adc19_set_input_channel
This function sets the selected input channel active by modifying the control register. -
adc19_get_voltage
This function reads the voltage from the previously selected channel by using SPI serial interface.
Example Description
This example demonstrates the use of ADC 19 Click board™ by reading the voltage from the two analog input channels.
void application_task ( void )
{
float voltage;
if ( ADC19_OK == adc19_set_input_channel ( &adc19, ADC19_INPUT_CHANNEL_1 ) )
{
if ( ADC19_OK == adc19_get_voltage ( &adc19, &voltage ) )
{
log_printf ( &logger, " IN1 : %.3f V rn", voltage );
}
}
if ( ADC19_OK == adc19_set_input_channel ( &adc19, ADC19_INPUT_CHANNEL_2 ) )
{
if ( ADC19_OK == adc19_get_voltage ( &adc19, &voltage ) )
{
log_printf ( &logger, " IN2 : %.3f V rnn", voltage );
}
}
Delay_ms ( 500 );
}
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.ADC19
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.