CASP supports deploying models on micro-controller boards. This example project develops a model to blink on-board LED of Vega Aries V3.0 board. This project can be used to validate whether board support package (BSP) for the target board is properly installed.
Pre-Requisites
- Vega Aries V3.0 board (or any supported board from the Vega Aries family) along with a USB cable.
- CASP software is properly installed and functional.
- Vega Aries BSP should be installed before running this project.
Model Details
- GPIO block is configured to use on-board LED as digital output.
- Logic-1: Square wave generator block connected to the above GPIO block to blink LED.

- Logic-2: A signal generator block is connected to the above LED GPIO block. It is configured to generate a square wave output whose frequency is variable form external signal. The external frequency control pin of this block is driven from another GPIO block configured as ADC input. The idea is to make a logic such that the LED blink frequency is varied based on the voltage applied to the ADC pin.

- Enable only one of the above two logics at any given time to avoid build errors.
How to run the project
- Ensure the micro-controller board is connected to the computer through USB serial.
- Start CASP and open the project from ‘examples/test_examples’ directory. It is also available for download at this link.
- Set serial port to which the board is connected in ‘Setup Simulation’ parameters. For this, click ‘Setup Simulation’ icon and from the dialog box that appears set the serial port as shown in below figure.

- Enable square wave generator block in green rectangle section (see figure in Model Details section above) and disable all blocks inside blue rectangle section.
- Click the Start button to build the model and program the board. The on-board LED should now blink at constant frequency.
- Now, disable the blocks inside green rectangle section and enable all blocks inside blue section.
- Click the Start button to build the modified model and program the board again. Apply a sample voltage between 0 to 3.3V at ADC pin and observe the change in LED blink frequency accordingly
