CASP models can be deployed on embedded micro-controller boards. This example, models hardware digital inputs and outputs on Arduino Uno board.
Pre-Requisites
- Arduino Uno R3 is connected to the computer.
- A push button switch, 10K resistor, bread board and sufficient jumper wires.
- CASP software is installed.
- Arduino BSP is installed.
- The project files are located at CASP installed directory ‘CASP/support/examples/hardware_interface/01_di_do’. These are also available for download at this link.
Description
An external switch with suitable biasing resistor is connected to digital input pin-3 of the target board. Digital output is taken from pin-13 which is internally connected to on-board LED. Logic is modelled to ON the LED when the switch is closed.

CASP Model

Procedure
- Run CASP and open the project ‘CASP/support/examples/hardware_interface/01_di_do/01_di_do.prj’ from CASP installed directory.
- Open ‘Setup Simulation’ window and change the ‘Target Programmer Port’ to which the board is connected.
- Click Run button to build the model and program the board.
