Carte à clic ADAC 3
Carte à clic ADAC 3
Key Features
- Faible consommation d'énergie, solution combinée avec quatre entrées analogiques et une sortie analogique, conversion A/N à approximation successive 8 bits, interface série I2C, entrées analogiques configurables en entrées asymétriques ou différentielles, circuit de suivi et de maintien sur puce, et plus encore
- Basé sur le PCF8591 - dispositif d'acquisition de données CMOS basse consommation de NXP Semiconductors
- Peut être utilisé pour diverses applications de contrôle, de surveillance ou de mesure
- mikroBUS : interface I2C
L' ADAC 3 Click Board™ est une carte complémentaire compacte représentant la solution combinée ADC/DAC. Cette carte comprend le PCF8591, un dispositif d'acquisition de données CMOS 8 bits à faible consommation avec quatre entrées analogiques, une sortie analogique et une interface série I2C de NXP Semiconductors. Le PCF8591 comprend un multiplexage d'entrée analogique, une fonction de suivi et de maintien sur puce et une conversion analogique-numérique 8 bits ainsi qu'une conversion numérique-analogique 8 bits. De plus, l'utilisateur a la possibilité de sélectionner la valeur de tension de référence du PCF8591, en choisissant entre 2 048 et 4 096 V. Cette carte Click™ convient à diverses applications de contrôle, de surveillance ou de mesure telles que la surveillance de l'alimentation, le réglage de référence, les boucles de contrôle analogiques, etc.
La carte Click Board™ ADAC 3 est prise en charge par une bibliothèque compatible mikroSDK, qui comprend des fonctions qui simplifient le développement logiciel. Cette carte Click Board™ est un produit entièrement testé, prêt à être utilisé sur un système équipé du socket mikroBUS™.
How Does The ADAC 3 Click Board™ Work?
The ADAC 3 Click Board™ as its foundation uses the PCF8591, a low-power CMOS data acquisition device from NXP Semiconductors. The PCF8591 comes with four analog inputs configurable as single-ended or differential inputs used to measure voltages, alongside one analog output representing an 8-bit digital-to-analog converter. In addition to measuring voltage, the user can create them as desired and even use DAC and ADC together to generate an input to a circuit and measure the results with the ADC, making it suitable for various control, monitoring, or measurement applications. By its internal structure, the PCF8591 also consists of an analog input multiplexing circuit, an on-chip track and hold function, alongside a serial interface block.
The ADAC 3 Click Board™ communicates with MCU using the standard I2C 2-Wire interface with a maximum clock frequency of 100kHz. The PCF8591 has a 7-bit slave address with the first four MSBs fixed to 1001. The address pins A0, A1, and A2, are programmed by the user and determine the value of the last three LSBs of the slave address, which can be selected by positioning onboard SMD jumpers labelled as ADDR SEL to an appropriate position marked as 0 or 1.
Besides, the user can choose the PCF8591 reference voltage value by positioning the SMD jumper labelled VREF SEL to a proper position, choosing between 2,048 and 4,096V provided by MAX6104 and MAX6106.
The ADAC 3 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-DAC |
Applications | Can be used for various control, monitoring, or measurement applications |
On-board modules | PCF8591 - low-power CMOS data acquisition device from NXP Semiconductors |
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 |
Interface | I2C |
Compatibility | mikroBUS |
Click board size | M (42.9 x 25.4 mm) |
Input Voltage | 3.3V or 5V |
PINOUT DIAGRAM
This table shows how the pinout of the ADAC 3 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
NC | 2 | RST | INT | 15 | NC | ||
NC | 3 | CS | RX | 14 | NC | ||
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | 5V | Power Supply |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
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 |
JP2-JP4 | ADDR SEL | Right | I2C Address Selection 0/1: Left position 0, Right position 1 |
JP5 | VREF SEL | Left | Reference Voltage Selection 2.048/4.096: Left position 2.048, Right position 4.096 |
ADAC 3 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | - | 5 | V |
Analog Input Voltage | 0 | - | 5 | V |
Analog Output Voltage | 0 | - | 5 | V |
Resolution | - | 8 | - | bit |
Operating Temperature Range | -40 | +25 | +85 | °C |
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.
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.
Carte à clic ADAC 3
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.