ADAC 3 Click Board
ADAC 3 Click Board
Key Features:
- Low power consumption, combo solution with four analog inputs and one analog output, 8-bit successive approximation A/D conversion, I2C serial interface, analog inputs configurable as single ended or differential inputs, on-chip track and hold circuit, and more
- Based on the PCF8591 - low-power CMOS data acquisition device from NXP Semiconductors
- Can be used for various control, monitoring, or measurement applications
- mikroBUS: I2C Interface
The ADAC 3 Click Board™ 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 analogue inputs, one analogue output, and a serial I2C interface from NXP Semiconductors. The PCF8591 includes analogue input multiplexing, an on-chip track and hold function and 8-bit analogue-to-digital conversion alongside an 8-bit digital-to-analogue conversion. In addition, the user is given the option to select the PCF8591 reference voltage value, choosing between 2,048 and 4,096V. This Click board™ is suitable for various control, monitoring, or measurement applications such as supply monitoring, reference setting, analogue control loops, and more.
The ADAC 3 Click Board™ is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
Software Support
We provide a library for the ADAC 3 Click Board™ as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
The package can be downloaded/installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on MikroE Github account.
Library Description
This library contains API for the ADAC 3 Click Board™ driver.
Key functions
-
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.
Example Description
This example demonstrates the use of the 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-).
void application_task ( void )
{
static uint8_t dac = 0;
uint8_t ain0, ain1, ain2_ain3_diff;
if ( ADAC3_OK == adac3_write_dac ( &adac3, dac ) )
{
log_printf ( &logger, " DAC : %u mVrn",
( uint16_t ) ( ( ADAC3_VREF_2048mV / ADAC3_RESOLUTION ) * dac++ ) );
}
if ( ADAC3_OK == adac3_read_adc ( &adac3, &ain0 ) )
{
log_printf ( &logger, " AIN0+: %u mVrn",
( uint16_t ) ( ( ADAC3_VREF_2048mV / ADAC3_RESOLUTION ) * ain0 ) );
}
if ( ADAC3_OK == adac3_read_adc ( &adac3, &ain1 ) )
{
log_printf ( &logger, " AIN1+: %u mVrn",
( uint16_t ) ( ( ADAC3_VREF_2048mV / ADAC3_RESOLUTION ) * ain1 ) );
}
if ( ADAC3_OK == adac3_read_adc ( &adac3, &ain2_ain3_diff ) )
{
log_printf ( &logger, " AIN2+ - AIN3-: %d mVrnn",
( int16_t ) ( ( ADAC3_VREF_2048mV / ADAC3_RESOLUTION ) * ( int8_t ) ain2_ain3_diff ) );
}
Delay_ms ( 100 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on MikroE Github account.
Other MikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.ADAC3
Additional Notes and Information
Depending on the development board you are using, you may need a USB UART Click Board™, 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
The ADAC 3 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.
ADAC 3 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.