Interface with PC
The interface with the PC was done with the serial
port, similar to what had been done in the networking
assignment. The user interface was built in Matlab and
the serial information sent was the distance read by
the sensor.
![](images/psoc-serial4.png)
![](images/psoc-serial5.png)
After configuring the speed in the port to 19200 bauds, a similar adjustment was done in the PSoC, giving the UART module a clock signal of the system clock (24 Mhz) divided by 156 and it internally divides it again by 8, giving a Baud Rate of 19230.7 which is the closest value. This was the only adjustment necessary to the program made for the master micro controller in the networking assignment. See VC3 Divider on the left column of the image below.
![](images/com-serial4.png)
To facilitate the work and to be able to take pictures of what was happening the distance sensor was replaced by the linear slide that provided a more constant signal. The code was developed in Matlab and consisted in creating a serial port object, configuring the speed and terminator character, then reading the data that has been received, and finally clearing the memory of that data. In the picture below you can see the interface with the PC through Matlab.
![](images/psoc-serial1.png)
![](images/com-serial1.png)
Here we can see that the distance read in the PSoC (8.279 cm) is indeed being transmitted to the PC and it is being read by the interface in Matlab. Similarly two other readings are shown below:
![](images/psoc-serial2.png)
![](images/com-serial2.png)
![](images/psoc-serial3.png)
![](images/com-serial3.png)
Progress
- Project Proposal
- 2D and 3D Model
- Laser Cut
- Circuit Making - FabISP
- 3D Scanning and Printing
- Electronics design
- Make Something Big
- Embedded Programming
- Molding and Casting
- Input Devices
- Composites
- Output Devices
- Networking
- Mechanical Design
- Interface
- Applications
- Invention
- Project Development
- Project Presentation
![](images/cyclops.png)
Alvaro J. Rojas Arciniegas, PhD
Assistant Professor Department of Automatics and Electronics - UAO
+57 (2) 318-8000 ext. 11384
![](images/xuao_logo5-02.png)