CASP supports exchanging data between micro-controller and host computer with very low latency Ethernet communication. Data received from the micro-controller can then be used in CASP models on host computer or can be visualized with the help of CASP GUI widgets such as plotters, dials, 2D/3D graphs.
This example project demonstrates how to establish Ethernet communication between the Vega Aries (interfaced to W5500 module) and the host (native) computer using CASP. We try to acquire analog periodic signal from the target board to the host PC through Ethernet and plot the signal on the host computer. UDP protocol is used for communicating between the target board and the host PC.
Pre-Requisites
- Vega Aries v2 for interfacing with W5500 is used in this project. However, any supported micro-controller board can be used.
- A suitable signal generator (between 1 to 100Hz) to test the Ethernet latency of complete setup.
- W5500 Ethernet module.
- CASP software is installed along with CASP Python Libraries (optional).
- Vega Aries BSP is installed.
- The project files are located at CASP installed directory ‘CASP/support/examples/vega_aries_examples/communication/03_w5500’. These are also available for download at this link.
Connection Diagram

CASP Model for Vega Aries

Procedure
- Connect Vega Aries to the host PC via a USB cable.
- Note the serial port number to which the board is connected to the host PC, from the host operating system.
- Run CASP and load the ‘target_model’ project.
- Open Home->Simulation->Setup Simulation Parameters menu item. Under TargetHW->General tabs set ‘Target Programmer Port’ parameter to the serial port to which the board is connected.
- Build the model and program the board by clicking on Run button.
CASP Model that runs on Host Computer

Procedure
- Run CASP and load the ‘native project’.
- Open the ‘native.wsp’ workspace file. Double click on the ‘Serial SimPanel’ block and set ‘Serial Port Settings->Serial Port’ parameter to the serial port to which the board is connected as shown in above figure.
- Click Run button to build the model and start simulation. A simulation panel window should open and communicate with the board. Screen shots for 10 Hz and 100 Hz sine wave input at the ADC port of Vega Aries are shown below.

