adc20 2.1.0.0
|
ADC 20 Click is a compact add-on board with a high-performance data converter. This board features the TLA2518, an SPI-configurable eight-channel 12-bit successive approximation register analog-to-digital converter (SAR ADC) from Texas Instruments. The TLA2518 has an internal oscillator for the ADC conversion and supports averaging multiple data samples with a single conversion start. Also, the built-in programmable averaging filters help reduce noise from the analog inputs and reduce the number of data samples required to be read by the host MCU. All eight channels can be used as analog inputs, with the addition that the four channels can be used as digital inputs or digital outputs.
We provide a library for the ADC 20 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.
This library contains API for ADC 20 Click driver.
adc20_cfg_setup
Config Object Initialization function. adc20_init
Initialization function. adc20_default_cfg
Click Default Configuration function. adc20_read_data
This function reads two bytes of data by using SPI serial interface. adc20_set_gpo_value
This function sets the gpo value for the selected channels. adc20_read_gpio_value
This function reads the gpio pins value. This example demonstrates the use of ADC 20 click board by displaying the state of 8 channels
configured as analog inputs (CH2-CH5), digital inputs (CH0-CH1) and digital outputs (CH6-CH7).
The demo application is composed of two sections :
Initializes the driver and performs the click default configuration.
Starts the auto sequence mode, reads the 12bit ADC value from analog input channels (CH2-CH5) and
displays the values converted to voltage on the USB UART. After that, stops auto sequence mode and toggles the state of digital output pins (CH6-CH7), then reads and displays the state of all GPIO pins.
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:
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.