adswio 2.0.0.0
|
AD-SWIO Click is a quad-channel software configurable input/output solution based on AD74412R. The AD74412R is a quad-channel software configurable input/output integrated circuit for building and process control applications.
We provide a library for the AdSwio 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 form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for AdSwio Click driver.
- Initialization function.void adswio_cfg_setup ( adswio_cfg_t *cfg );
ADSWIO_RETVAL adswio_init ( adswio_t *ctx, adswio_cfg_t *cfg );
void adswio_default_cfg ( adswio_t *ctx );
- This function allows user to get the converted results of the selected channel.uint8_t adswio_status_pin_ready ( adswio_t *ctx );
adswio_err_t adswio_get_conv_results ( adswio_t *ctx, uint8_t channel, uint16_t *data_out );
This click provides a fully integrated single chip solution for input and output operation. The AD-SWIO Click contains four 13-bit DACs, one per chanal, and 16-bit Σ-∆ ADC. These options give a lot of flexibility in choosing functionality for analog output, analog input, digital input, resistance temperature detector (RTD), and thermocouple measurements integrated into a single chip solution with a serial peripheral interface (SPI)
The demo application is composed of two sections :
Performs a hardware reset of the click board and executes a default configuration that enables channel A and sets it to measure voltage input in the range from 0V to 10V, with 4800 SPS.
Waits for the data ready and then reads the results of ADC conversion from channel A and if response is ok, then prints the results on the uart console.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
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. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.