How does it work?
The AD-SWIO 2 Click features a 16-bit analog-to-digital converter (ADC), and 13-bit digital-to-analog converter (DAC) embed in AD74413R from Analog Devices. There are several modes related to the AD74413R. These modes are voltage output, current output, voltage input, externally powered current input, loop powered current input, external RTD measurement, digital input logic, and loop powered digital input.
The ADC can measure either the voltage across the 100 Ω RSENSE or the voltage at the I/OP_x screw terminal of each channel. In high impedance mode, the ADC, by default, measures the voltage across the screw terminals (I/OP_x to I/ON_x) in a 0 V to 10 V range. The ADC also provides diagnostic information on user-selectable inputs such as supplies, internal die temperature, reference, and regulators.
The AD74413R can operate with either an external or an internal reference. The reference input requires 2.5 V for the AD74413R to function correctly. The reference voltage is internally buffered before being applied to the DAC and the ADC. The AD-SWIO 2 Click contains jumper for selection reference voltage, left position (Default) is selection external reference voltage. External reference voltage provide by ADR4525BRZ, from Analog Devices. The ADR4525BRZ is high precision, low noise voltage references featuring ±0.02% maximum initial error. By switching to the right position of the Vref jumper, the AD74413R is using the internal reference voltage. If The AD-SWIO 2 Click using internal reference voltage, the REFIN pin must be tied to the REFOUT pin.
The AD-SWIO 2 Click has four GPO-x pins, one per channel (GPO-A, GPO-B, GPO-C, GPO-D). Each channel GPO-x pin can be configured to the logic outputs of the digital input functions or a logic high or low output. The GPO-x pins can be set via the GPO_SELECT bits within the GPO_CONFIGx registers. The Click board™ also contains LVIN ( Low Voltage Input) pin, the measurement voltage range on this pin is 0V to 2.5V.
The AD74413R contains four 13-bit DACs, one per channel. Each DAC core is a 13-bit string DAC. The architecture structure consists of a string of resistors, each with a value of R. The digital input code that is loaded to the DAC_CODEx registers determines which node on the string the voltage is tapped off from and fed into the output amplifier. This architecture is inherently monotonic and linear.
The AD74413R have short-circuit limit in voltage output mode is programmable per channel. The circuit minimizes glitching on the I/OP_x screw terminal when the AVDD supply is ramping or when the use case configuration is changed. This short-circuit limit, you can regulate with positive analog supply on AVDD pin, Output voltage on AD-SWIO 2 Click is limited to +20V. The AD-SWIO 2 Click is equipped with the ADP1613 step-up dc-to-dc switching converters with an integrated power switch capable of providing an output voltage as high as 20 V also from Analog Devices.
Specifications
Type
ADC-DAC,SWIO
Applications
Its a perfect choice for Process control, Factory automation, Motor drives, Building control systems.
On-board modules
AD74413R a quad-channel ADC-DAC converter; ADR4525BRZ a high precision low noise voltage reference and ADP1613 step-up dc-to-dc switching converter all from Analog Devices
Key Features
Optimized for 16-bit ADC (Analog-to-Digital Converter) and 13-bit DAC (Digital-to-Analog Converter).
Interface
GPIO,SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V,5V
Pinout diagram
This table shows how the pinout on AD-SWIO 2 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | Vref | Left | Select reference voltage: Left is External reference voltage, right internal reference voltage |
Software Support
We provide a library for the AD SWIO 2 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.
Library Description
This library contains API for AD SWIO 2 Click driver.
Key functions
-
This function allows user to get the converted results of the selected channel.
-
This function checks the status of the ready pin.
Example Description
This Click is a quad-channel software configurable input/output solution for building and process control application. The AD-SWIO 2 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).
void application_task ( void )
{
timeout = 0;
do
{
Delay_1ms( );
timeout++;
adswio2_rdy = adswio2_status_pin_ready( &adswio2 );
if ( timeout > 3000 )
{
timeout = 0;
log_printf( &logger, " Reinitializing...");
adswio2_default_cfg( &adswio2 );
log_printf( &logger, "Donern");
}
}
while ( adswio2_rdy != 0 );
adswio2_err = adswio2_get_conv_results( &adswio2, ADSWIO2_SETUP_CONV_EN_CHA, &adswio2_ch_a );
if ( adswio2_err == ADSWIO2_ERR_STATUS_OK )
{
adswio2_res = adswio2_ch_a;
adswio2_res /= ADSWIO2_RANGE_RESOLUTION;
adswio2_res *= ADSWIO2_RANGE_VOLT_MV;
adswio2_ch_a = adswio2_res;
log_printf( &logger, " Voltage from channel A: %d mVrn", adswio2_ch_a );
log_printf( &logger, "-----------------------------------rnrn" );
Delay_ms( 200 );
}
}
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:
- MikroSDK.Board
- MikroSDK.Log
- Click.AdSwio2
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.
mikroSDK
This 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.
For more information about mikroSDK, visit the official page.