For project on security systems, Interfacing Camera with PIC Microcontroller via Matlab GUIΒ is mostly desirable. But size internal ROM and RAM of PIC16F877 is very small. So it is very difficult or other word imposible to direct Interfacing Camera with PIC16f877 Microcontroller . But we can do it to introducing Matlab GUI and interfacing PIC16F877 with Matlab via UART communication using serial cable.
Project description:
In this project βInterfacing Camera with PIC Microcontroller via Matlab GUIβ, we can do interfacing camera via Matlab. By using Matlab command we can easily initialized camera attaching with Computer. So if we establish communication between matlab with microcontroller (PIC16F877) and take control of Matlab command using Matlab GUI from microcontroller then we can easily control camera from our microcontroller. Using this logic we connect two push switch with microcontroller
- 1>Β Β Β Β Push button 1 :- If we press that then Camera will initialized.
- 2>Β Β Β Β Push Button 2 :- If we press that then Camera will take snapshot and store it to Hard Disk.
In bellow I give the circuit diagram of this project.
Project Operation: β In this project we have to work on two different sectors.
1>Β Β Β Β Create own Matlab GUI for interfacing Camera attach with Computer.
2>Β Β Β Β Write a Program for sending control data via UART from PIC16F877.
Matlab GUI for interfacing Camera:
Now question is how to make Matlab GUI? And for that see the bellow video for makingΒ simple push button via Matlab GUI or visit this post for know How to make matlab GUI.
And for our project we have write different program for our projectΒ Interfacing Camera with PIC Microcontroller via Matlab GUI.
Matlab Code
x=0; while (x==0) s = serial(βCOM1β²,βBaudRateβ,9600); fopen(s); Β Β Β out=fscanf(s); if (out==βaβ) vid = videoinput(βwinvideoβ, 2, βYUY2_320x240β²); Β For more detail: Interfacing Camera with PIC Microcontroller via Matlab GUI