Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:tools-software:product-support-software:ad4696_mbed_iio_application [15 Aug 2022 22:48] – [Useful links] Jim Cattresources:tools-software:product-support-software:ad4696_mbed_iio_application [27 Dec 2022 09:28] (current) Janani Sunil
Line 1: Line 1:
-====== AD4696 Mbed IIO Application ======+====== AD4696 IIO Application ======
  
 ===== Introduction ===== ===== Introduction =====
  
-This page gives an overview of using the ARM Mbed platform supported firmware example with Analog Devices AD4696 Evaluation board(s) and SDP-K1 controller board. This example code leverage the ADI developed IIO (Industrial Input Output) ecosystem to evaluate the AD4696 family devices by providing a device debug and data capture support.+This page gives an overview of using the ARM Mbed platform supported firmware example with Analog Devices AD4696 Evaluation board(s) and SDP-K1 controller board. This example code leverages the ADI developed IIO (Industrial Input Output) ecosystem to evaluate the AD4696 family devices by providing a device debug and data capture support.
  
-The overview of an entire system is shown below: +{{section>resources/tools-software/product-support-software/iio_support_introduction#Introduction&showfooter=nofooter}}
- +
-{{ :resources:tools-software:product-support-software:iio_app_interface.jpg?nolink&600 |}} +
-{{ :resources:tools-software:product-support-software:ad4696_iio_app_block_diagram.jpg?nolink&600 |}} +
- +
-IIO oscilloscope is used as client application running on windows-OS, which is ADI developed GUI for ADC data visualization and device debug. The interface used for communicating client application with firmware application (IIO device) is UART (Note: SDP-K1 can also support high speed VirtualCOM port @1Mbps or higher speed for faster data transmission). The firmware application communicates with IIO device (AD4696) using ADI No-OS drivers and platform drivers low level software layers. SDP-K1 is used as controller board, on which IIO firmware application runs and using above software libraries, the IIO firmware communicates with AD4696 IIO device. The AD4696B Eval board is used for development and testing of this application. +
- +
-<note important>This code has been developed and tested on SDP-K1 Controller Board using the on-board Arduino Headers. However, same code can be used without or with little modifications on any Mbed enabled board which has Arduino Header Support on it, such as STM32-Discovery, STM32-Nucleo, etc.</note>+
  
 ---- ----
Line 18: Line 11:
 ===== Useful links ===== ===== Useful links =====
  
-  * [[https://ide.mbed.com/compiler|Mbed Online Compiler]] +{{section>resources/tools-software/product-support-software/useful_links#Useful Link&showfooter=nofooter}}
-  * [[https://os.mbed.com/platforms/SDP_K1/|SDP-K1 on Mbed]]+
   * [[https://github.com/analogdevicesinc/no-OS/tree/master/drivers/adc/ad469x|ad4696 No-OS drivers]]   * [[https://github.com/analogdevicesinc/no-OS/tree/master/drivers/adc/ad469x|ad4696 No-OS drivers]]
   * [[adi>en/products/ad4696.html|AD4696]] [[adi>en/products/ad4695.html|AD4695]]   * [[adi>en/products/ad4696.html|AD4696]] [[adi>en/products/ad4695.html|AD4695]]
Line 26: Line 18:
  
 ===== Hardware Connections ===== ===== Hardware Connections =====
- 
 === Power Connections: === === Power Connections: ===
-  * Connect a 12V ( 1A max ) DC power supply to board through VPWR and GND4 pin. +  * Connect a 12V (1A max) DC power supply to board through VPWR and GND4 pin. 
   * Connect the VCC_HOST pin of the AD4696 to the 3.3V supply.    * Connect the VCC_HOST pin of the AD4696 to the 3.3V supply. 
  
Line 44: Line 35:
 <note> Note: To achieve reliable high speed data transfer between the SDP-K1 and AD4696 Eval board, make sure to use good quality jumper wires with length not more than 10cm </note> <note> Note: To achieve reliable high speed data transfer between the SDP-K1 and AD4696 Eval board, make sure to use good quality jumper wires with length not more than 10cm </note>
  
-The AD4696 device is configured in "Serial Software" mode in the firmwareAD4696 uses SPI communication for device register access and data capture.+The SDP-K1 generates PWM signals to manually trigger conversion on the AD4696. The digital pin and the sampling rate for PWM signal can be configured in the app_config_mbed.h file. By default, it is generated at 62.5 KSPS on D6 Arduino pin. The D6 (CNV) Arduino pin is used to generate trigger signals and the falling edge on the BSY pin triggers SPI read transaction to sampled data.
  
-SDP-K1 is powered through USB connection from the computerSDP-K1 acts as a Serial device when connected to PCwhich creates a COM Port to connect to IIO Oscilloscope GUI running on windows-OS. The COM port assigned to a device can be seen through the device manager for windows based OS.+The firmware supports both unipolar and pseudo bipolar modes. By default, the firmware is configured in unipolar modeTo switch to pseudo bipolar modeby defining "PSEUDO_BIPOLAR_MODE" macro in app_config.h file. Make sure to change the JP6 jumper to position A on the Eval board to use the PSEUDO_BIPOLAR_MODE. Since the pin pairing option is same for all the channels in standard sequencer mode, therefore polarity mode for all the channels is also kept same to avoid stale ADC output codes
  
-{{ :resources:tools-software:product-support-software:com_port_sdp-k1.jpg?400 |}}+The AD4696 device is configured in "Serial Software" mode in the firmware. AD4696 uses SPI communication for device register access and data capture.
  
-SDP-K1 can also support high speed VirtualCOM port UART interface if “USE_VIRTUAL_COM_PORT” macro is defined in the firmware (in app_config.h file). +{{section>resources/tools-software/product-support-software/hardware_connections_uart#UART Connections&showfooter=nofooter}}
-{{ :resources:tools-software:product-support-software:sdp-k1_virtual_com_port.jpg?500 |}}+
  
----- 
-===== Theory of operation ===== 
-The SDP-K1 generates PWM signals to manually trigger conversion on the AD4696. The digital pin and the sampling rate  for PWM signal can be configured in the app_config_mbed.h file. By default it is generated at 62.5 KSPS on D6 Arduino pin. To achieve this, the CS of the SDP-K1 and CNV pins on the Eval board should be shorted/soldered either by switching JP31 onboard jumper position to A or by using external wires to connect the same. The D6 (CNV) Arduino pin on the MCU should should be left floating, as this pin is used only to trigger interrupt attached to the data capture callback function in the software. The rising edge on the CS pin acts as conversion start signal for the AD4696: whenever a SPI read transaction is performed in the data capture callback function. 
- 
-The firmware supports both unipolar and pseudo bipolar modes. By default the firmware is configured in unipolar mode. To switch to pseudo bipolar mode, by defining "PSEUDO_BIPOLAR_MODE" macro in app_config.h file. Make sure to change the JP6 jumper to position A on the Eval board to use the PSEUDO_BIPOLAR_MODE. Since the pin pairing option is same for all the channels in standard sequencer mode, hence polarity mode for all the channels is also kept same to avoid stale ADC output codes.  
-  
 ===== Software Downloads ===== ===== Software Downloads =====
  
-==== Mbed Firmware ==== +{{section>resources/tools-software/product-support-software/iio_support_software_downloads#Software Downloads&showfooter=nofooter}}
- +
-<WRAP round download> +
-Latest firmware (Use below link): +
-  * [[https://os.mbed.com/teams/AnalogDevices/code/EVAL-AD4696/|ad4696 IIO Firmware Application]] +
-</WRAP> +
- +
-=== Quick Start to use Mbed IIO Firmware === +
- +
-If you have some familiarity with the Mbed platform, the following is a basic list of steps required to start running the code, see below for more detail: +
-  * Connect the AD4696 EVAL-board to the SDP-K1 controller board as specified in hardware connections section. +
-  * Connect the SDP-K1 controller board to your computer over USB provided along with SDP-K1 board. +
-  * Go to the link of the code provided above in the 'Downloads' section and import code into Mbed online compiler (Edit app_config.h file (defaults to AD4696 device) if evaluating any other device). +
-  * Ensure SDP-K1 controller board is selected (top right of online-compiler page). +
-  * Compile the code. +
-  * After a successful compile a binary will be downloaded to your computer - store this on your drive. +
-  * Drag and drop this binary to the USB drive hosted by your controller board. +
-  * Press reset button to reset the microcontroller and the application will start to run.  +
- +
- +
-==== Libiio: IIO Library ==== +
-This library provides an abstracted library interface to communicate IIO device (AD4696) and IIO client application (IIO Oscilloscope) without worrying about the low level hardware details. +
-Download and install below [[/resources/tools-software/linux-software/libiio | Libiio]] windows installer in your computer. +
- +
-<WRAP round download> +
-Libiio installer for Windows (Use below link): +
-  * [[https://github.com/analogdevicesinc/libiio/releases | libiio windows installer (.exe) +
-]] +
-</WRAP> +
- +
- +
-==== IIO Oscilloscope (Client) ==== +
-This is a GUI (Graphical User Interface) based IIO client application for data visualization and device configuration/debugging. The data from IIO devices (ADCs/DACs) is transmitted over Serial/Ethernet/USB link to IIO Oscilloscope client through the abstracted layer of "libiio"+
-Download and install below [[/resources/tools-software/linux-software/iio_oscilloscope | IIO Oscilloscope]] windows installer in your computer. +
- +
-<WRAP round download> +
-IIO Oscilloscope installer for Windows (Use below link): +
-  * [[https://github.com/analogdevicesinc/iio-oscilloscope/releases | IIO Oscilloscope windows installer (.exe) +
-]] +
-</WRAP> +
- +
- +
-----+
  
 ===== Evaluating AD4696 Using IIO Ecosystem ===== ===== Evaluating AD4696 Using IIO Ecosystem =====
  
-<note>Ensure that hardware connection has been made properly in between Mbed Controller Board (SDP-K1) and AD4696 EVAL board. Also ensure all software's (IIO firmware, Libiio windows installer and IIO Oscilloscope windows installer) are downloaded and installed in your computer before trying to communicate with AD4696 device.</note> +{{section>resources/tools-software/product-support-software/note_hardware_connections#Note in Hardware Connections&showfooter=nofooter}}
  
 ==== Running IIO Oscilloscope (Client) ==== ==== Running IIO Oscilloscope (Client) ====
 Open the IIO Oscilloscope application from start menu and configure the serial (UART) settings as shown below. Open the IIO Oscilloscope application from start menu and configure the serial (UART) settings as shown below.
-Click on refresh button and AD4696 device should pop-up in IIO devices list. Click 'Connect' and select the AD4696 device from the drop down menu list of 'Device Selection'.+Click on refresh button and AD4696 device should pop-up in IIO devices list. Click 'Connect' and select the AD4696 device from the drop-down menu list of 'Device Selection'.
  
 {{ :resources:tools-software:product-support-software:ad4696_iio_connection.gif?nolink |}} {{ :resources:tools-software:product-support-software:ad4696_iio_connection.gif?nolink |}}
Line 141: Line 82:
 DMM tab can be used read the instantaneous voltage applied on analog input channels. Simply select the device and channels to read and press start button.  DMM tab can be used read the instantaneous voltage applied on analog input channels. Simply select the device and channels to read and press start button. 
  
-//*Note: The voltage is just instantaneous, so it is not possible to get RMS AC voltage or averaged DC voltage. Also, when using DMM tab, it is not encouraged to use Data Capture or Debug tab as this could impact data capturing.//+//*Note: The voltage is just instantaneous, so it is not possible to get RMS AC voltage or averaged DC voltage. Also, when using DMM tab, it is not encouraged to use Data Capture or Debug tab as this could impact data capturing. //
  
 {{ :resources:tools-software:product-support-software:ad4696_iio_dmm_tab.gif |}} {{ :resources:tools-software:product-support-software:ad4696_iio_dmm_tab.gif |}}
resources/tools-software/product-support-software/ad4696_mbed_iio_application.txt · Last modified: 27 Dec 2022 09:28 by Janani Sunil