This example project demonstrates how to measure speed of a motor and display on a SSD1360 (I2C) based OLED display module with Vega Aries using CASP.
Target
Aries v2.0 development board is used in this project. However, any supported micro-controller board can be used.
Pre-Requisites
- CASP software is installed on the host PC
- Vega Aries BSP is installed.
- The project files are located at CASP installed directory ‘CASP/support/examples/vega_aries_examples/hw_interface/08_oled’. These are also available for download at this link.
Connection Diagram
An infra red proximity sensor is connected to GPIO0 of the target board. A SSD1360 based OLED display is connected to the board via I2C interface as shown in the circuit diagram. A model is developed to measure the number of counts the motor shaft rotates and correspondingly the speed in RPM and display on OLED display. Please note that interrupt is enabled on GPIO0 by default for better timing. However, user may disable the interrupt and enter suitable value in the ‘Debounce Time’ parameter in the ‘pulse counter’ block if the sensor signal is noisy. Please go through the individual block parameters used in the model along with respective documentation for better understanding.

Model

Procedure
- Connect the peripherals as shown in above connection diagram and connect the target board to the host PC.
- Launch CASP and open the downloaded project.
- Click ‘Setup Simulation’ to open a dialog box.
- Select ‘Target Programmer’ to ‘Programmer0’ to upload the program to RAM or ‘Programmer1’ to upload the program to flash memory of the target board.
- Set the ‘Target Programmer Port’ to which the board is connected.
- Save and Close the dialog box.
- Click Run button to build and program the board.
