adac3 2.0.0.0
|
ADAC 3 Click is a compact add-on board representing the ADC/DAC combo solution. This board features the PCF8591, a low-power 8-bit CMOS data acquisition device with four analog inputs, one analog output, and a serial I2C interface from NXP Semiconductors. The PCF8591 includes analog input multiplexing, an on-chip track and hold function and 8-bit analog-to-digital conversion alongside an 8-bit digital-to-analog conversion. In addition, the user is given the option to select the PCF8591 reference voltage value, choosing between 2,048 and 4,096V.
We provide a library for the ADAC 3 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 ADAC 3 Click driver.
adac3_cfg_setup
Config Object Initialization function. adac3_init
Initialization function. adac3_default_cfg
Click Default Configuration function. adac3_write_control
This function writes a control byte by using I2C serial interface. adac3_write_dac
This function writes a DAC byte by using I2C serial interface. adac3_read_adc
This function reads the AD conversion byte by using I2C serial interface. This example demonstrates the use of ADAC 3 click board by setting the DAC output
and reading the ADC results from 2 single-ended channels (AIN0, AIN1) and from a differential channel (AIN2+, AIN3-).
The demo application is composed of two sections :
Initializes the driver and performs the click default configuration which enables
DAC output, sets the analog input mode to single-ended (AIN0, AIN1) and differential (AIN2+, AIN3-), and enables the auto increment mode.
Sets the DAC output increasing the value by 1 after each iteration, and reads the
ADC results from 2 single-ended and 1 differential channels, and displays the results on the USB UART every 100ms approximately.
Inputs should be connected to GND when not in use.
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.