SlideShare a Scribd company logo
1 of 8
College of Engineering


                    Course: ESL
                     CId: 10938

                     Prepared by
               Salman Khaliq Bajwa (3746)



                   Project Advisor
                    Engr. Mohazzab




               College of Engineering

PAF – Karachi Institute of Economics and Technology
                      Karachi




                                                      1
PREFACE

This project is a comprehensive study of the MATLAB, a programming language. It tells us the
use and commands of MATLAB. This project is intended to use in engineering and computer
science. This project utilizes electronic concepts that can be helpful in understanding the
electronic principles and the use of MATLAB. This project deals with the various number
circuits and used in electronic systems. This project provides a very deep understanding of
MATLAB software with standard circuit designing.




ACKNOWLEDGEMENT

I would like to express my gratitude to all those who gave me the possibility to complete this
project. I want to thank my course instructor Mr. Mohazzab Jawaid for giving me permission to
work on this project. Furthermore thanks to my engineering lab staff that gave and confirmed
this permission and encouraged me to go ahead with my project. I am bound to the Honorable
director of engineering for giving me such opportunity to work with our capabilities freely. I am
deeply indebted to Mr. Mohazzab Jawaid whose help, stimulating suggestions and
encouragement helped me in all the time of making this project. My friends from the Department
of engineering supported me in my project. I want to thank them for all their help, support,
interest and valuable hints. Especially I am obliged to my seniors. I also want to thank to our lab
in charge for all his assistance on the ministerial computer. Our teachers was of great help in
difficult times I will like to thanks each and every person, who helped and supported me and
gave time to this project.




                                                                                                 2
Table of Contents

PREFACE ....................................................................................................................................... 2

1. Objective & Puposes: .................................................................................................................. 4

                  Objective: ……………………………………………………………………………4

                  Purpose:………………………………………………………………………………4

2. Description:…………………………………………………………………………………..4-5
                  DC Motor………………...…………………………………………………………..4

                  Parallel Port Interfacing:……………………………………………………………..4

3. Working……………………………………………………………………………………..….5
4. MATLAB Program Code…………………………………………………………………….7-6
5. GUI……………………………………………………………………………………………..8
Conclusion




                                                                                                                                               3
1. Objective & Purpose:
Objective:
To design an application in order to control the DC motor and LEDs using GUI based MATLAB
program through Parallel Port.

Purpose:
To understand and be familiar of the commands of MATLAB software and the need and
importance of this software in industry.


2. Description:

A small description of this project is that we would be interfacing the dc motor and some LEDs
through parallel port using MATLAB software. Most of the coding will be done through
MATLAB. We will turn on and off the dc motor & LEDs. Some information about the ports and
components that I am using in this software is given below;
DC Motor:
A DC motor is an electric motor that runs on direct current (DC) electricity. DC motors are fairly
simple to understand. They are also simple to make and only require a battery or dc supply to
make them run.
Parallel Port Interfacing:
Parallel port is a simple and inexpensive tool for building computer controlled devices and
projects. The simplicity and ease of programming makes parallel port popular in electronics
hobbyist world. The parallel port is often used in Computer controlled robots, Atmel/PIC
programmers, home automation etc. It takes 5 volts. It can send a large amount of data at a time
but when we talk about the larger distances we have to look at the serial port. This is actually the
drawback of parallel port that we cannot use it for large data transmission, but wirelessly we can
do it.

.




                                                                                                  4
Figure 1- Parallel Port




                              Figure 3- data transmission




3. Working:
 I have made a GUI based project. How it works is that it actually takes the input from the
 user and on and offs the DC motor and 3 LEDs. I am going to use four ports; port 1, port 2,
 port 3, port 4 and port 5 for that. It is actually a series circuit. Port 2 is for DC motor and Port
 3, 4 and 5 are for LEDs.
 Step one of this project was to design a GUI for this project and then the second step was to
 interface that GUI with my hardware.



                                                                                                   5
4. MATLAB Program Code:
 function varargout = pin_by_pin(varargin)
              %--------------------------------------|
              % Programmer: Salman Khaliq Bajwa          |
              % Course: ESL                         |
              % Id:        3746                 |
              % CId:        10938                 |
              % E-mial: damigo88@yahoo.com             |
              % Project: Parallel Port Interfacing |
              %--------------------------------------|
 gui_Singleton = 1;
 gui_State = struct('gui_Name',        mfilename, ...
             'gui_Singleton', gui_Singleton, ...
             'gui_OpeningFcn', @pin_by_pin_OpeningFcn, ...
             'gui_OutputFcn', @pin_by_pin_OutputFcn, ...
             'gui_LayoutFcn', [] , ...
             'gui_Callback', []);
 if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
 end
 if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
 else
    gui_mainfcn(gui_State, varargin{:});
 end
 % End initialization code - DO NOT EDIT
 % --- Executes just before pin_by_pin is made visible.
 function pin_by_pin_OpeningFcn(hObject, eventdata, handles, varargin)
 % This function has no output args, see OutputFcn.
 % hObject handle to figure
 % eventdata reserved - to be defined in a future version of MATLAB
 % handles structure with handles and user data (see GUIDATA)
 % varargin command line arguments to pin_by_pin (see VARARGIN)
 %*-*-*-*-*-*-*-*-*-*-*-*-
 pp=digitalio('parallel','LPT1');
 handles.dato=addline(pp,0:3,'out');
 putvalue(handles.dato,0);
 %-*-*-*-*-*-*-*-*-*-*-**-
 % Choose default command line output for pin_by_pin
 handles.output = hObject;
 % Update handles structure
 guidata(hObject, handles);
 % UIWAIT makes pin_by_pin wait for user response (see UIRESUME)
 % uiwait(handles.figure1);


 % --- Outputs from this function are returned to the command line.
 function varargout = pin_by_pin_OutputFcn(hObject, eventdata, handles)
 % varargout cell array for returning output args (see VARARGOUT);
 % hObject handle to figure
 % eventdata reserved - to be defined in a future version of MATLAB
 % handles structure with handles and user data (see GUIDATA)


                                                                          6
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in pin_2.
function pin_2_Callback(hObject, eventdata, handles)
a=get(handles.pin_2,'Value');
b=get(handles.pin_3,'Value');
c=get(handles.pin_4,'Value');
d=get(handles.pin_5,'Value');
m=[a b c d];
out=binvec2dec(m);
set(handles.text1,'String',out)
putvalue(handles.dato,out);
% --- Executes on button press in pin_4.
function pin_4_Callback(hObject, eventdata, handles)
a=get(handles.pin_2,'Value');
b=get(handles.pin_3,'Value');
c=get(handles.pin_4,'Value');
d=get(handles.pin_5,'Value');
m=[a b c d];
out=binvec2dec(m);
set(handles.text1,'String',out)
putvalue(handles.dato,out);
% --- Executes on button press in pin_3.
function pin_3_Callback(hObject, eventdata, handles)
a=get(handles.pin_2,'Value');
b=get(handles.pin_3,'Value');
c=get(handles.pin_4,'Value');
d=get(handles.pin_5,'Value');
m=[a b c d];
out=binvec2dec(m);
set(handles.text1,'String',out)
putvalue(handles.dato,out);
% --- Executes on button press in pin_5.
function pin_5_Callback(hObject, eventdata, handles)
a=get(handles.pin_2,'Value');
b=get(handles.pin_3,'Value');
c=get(handles.pin_4,'Value');
d=get(handles.pin_5,'Value');
m=[a b c d];
out=binvec2dec(m);
set(handles.text1,'String',out)
putvalue(handles.dato,out);




                                                           7
5. GUI of the project:




                                        Figure 3- GUI


 Conclusion
 I can conclude that this project can be used for various purposes like for the interfacing of
 many other things like home appliances, Industries etc. This project helped me a lot in
 improving my typing skills and also my understanding the need MATLAB in market.


 References:
 [1 ]
        http://www.mathswork.com
 Topic: Parallel Port Interfacing | Visiting Date: 05/Feb/2011
 © 1999-2010 mathswork.com Hong Kong Limited and licensors. All rights reserved.
 [2]
        http://www.wikipedia.com
 Topic: Parallel Port | Visiting Date: 11/March/2011
 ©2002-2011, Wikipedia . All rights reserved.



                                                                                                 8

More Related Content

Similar to ESL report

Dipak_Desai_Resume
Dipak_Desai_ResumeDipak_Desai_Resume
Dipak_Desai_Resumenotoha
 
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...InfluxData
 
Kotra Pavan Kumar(es)
Kotra Pavan Kumar(es)Kotra Pavan Kumar(es)
Kotra Pavan Kumar(es)Pavan Kumar
 
How To make your own Robot And control it using labview
How To make your own Robot And control it using labviewHow To make your own Robot And control it using labview
How To make your own Robot And control it using labviewAymen Lachkhem
 
The Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging SystemThe Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging SystemMelissa Luster
 
EE323 Mini-Project - Line tracing robot
EE323 Mini-Project - Line tracing robotEE323 Mini-Project - Line tracing robot
EE323 Mini-Project - Line tracing robotPraneel Chand
 
Full stack component of software and middleware for quantum machine
Full stack component of software and middleware for quantum machineFull stack component of software and middleware for quantum machine
Full stack component of software and middleware for quantum machineYuichiro MInato
 
超級全能危樓改造王 - 增建、改建、打掉重建你的軟體架構?
超級全能危樓改造王 - 增建、改建、打掉重建你的軟體架構?超級全能危樓改造王 - 增建、改建、打掉重建你的軟體架構?
超級全能危樓改造王 - 增建、改建、打掉重建你的軟體架構?Pin-Ying Tu
 
TFG_Oriol_Torta.pdf
TFG_Oriol_Torta.pdfTFG_Oriol_Torta.pdf
TFG_Oriol_Torta.pdfhoussemouni2
 
Java programming concept
Java programming conceptJava programming concept
Java programming conceptSanjay Gunjal
 
SOFTWARE BASED CALCULATION OF CAPACITY OUTAGE OF GENERATING UNITS
SOFTWARE BASED CALCULATION OF CAPACITY OUTAGE OF GENERATING UNITSSOFTWARE BASED CALCULATION OF CAPACITY OUTAGE OF GENERATING UNITS
SOFTWARE BASED CALCULATION OF CAPACITY OUTAGE OF GENERATING UNITSvivatechijri
 
Final year project working documentation 2020
Final year project working documentation 2020Final year project working documentation 2020
Final year project working documentation 2020Vikram Singh
 
Rachit_HMI_Development_resume
Rachit_HMI_Development_resumeRachit_HMI_Development_resume
Rachit_HMI_Development_resumeRachit Kushwaha
 
cbse 12 computer science IP
cbse 12 computer science IPcbse 12 computer science IP
cbse 12 computer science IPD. j Vicky
 

Similar to ESL report (20)

UDP Report
UDP ReportUDP Report
UDP Report
 
Dipak_Desai_Resume
Dipak_Desai_ResumeDipak_Desai_Resume
Dipak_Desai_Resume
 
GCF
GCFGCF
GCF
 
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
 
Kotra Pavan Kumar(es)
Kotra Pavan Kumar(es)Kotra Pavan Kumar(es)
Kotra Pavan Kumar(es)
 
Pavan(ES)
Pavan(ES)Pavan(ES)
Pavan(ES)
 
Mechatronics engineer
Mechatronics engineerMechatronics engineer
Mechatronics engineer
 
How To make your own Robot And control it using labview
How To make your own Robot And control it using labviewHow To make your own Robot And control it using labview
How To make your own Robot And control it using labview
 
The Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging SystemThe Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging System
 
EE323 Mini-Project - Line tracing robot
EE323 Mini-Project - Line tracing robotEE323 Mini-Project - Line tracing robot
EE323 Mini-Project - Line tracing robot
 
Full stack component of software and middleware for quantum machine
Full stack component of software and middleware for quantum machineFull stack component of software and middleware for quantum machine
Full stack component of software and middleware for quantum machine
 
超級全能危樓改造王 - 增建、改建、打掉重建你的軟體架構?
超級全能危樓改造王 - 增建、改建、打掉重建你的軟體架構?超級全能危樓改造王 - 增建、改建、打掉重建你的軟體架構?
超級全能危樓改造王 - 增建、改建、打掉重建你的軟體架構?
 
Oopp Lab Work
Oopp Lab WorkOopp Lab Work
Oopp Lab Work
 
TFG_Oriol_Torta.pdf
TFG_Oriol_Torta.pdfTFG_Oriol_Torta.pdf
TFG_Oriol_Torta.pdf
 
Java programming concept
Java programming conceptJava programming concept
Java programming concept
 
SOFTWARE BASED CALCULATION OF CAPACITY OUTAGE OF GENERATING UNITS
SOFTWARE BASED CALCULATION OF CAPACITY OUTAGE OF GENERATING UNITSSOFTWARE BASED CALCULATION OF CAPACITY OUTAGE OF GENERATING UNITS
SOFTWARE BASED CALCULATION OF CAPACITY OUTAGE OF GENERATING UNITS
 
Final year project working documentation 2020
Final year project working documentation 2020Final year project working documentation 2020
Final year project working documentation 2020
 
Rachit_HMI_Development_resume
Rachit_HMI_Development_resumeRachit_HMI_Development_resume
Rachit_HMI_Development_resume
 
cbse 12 computer science IP
cbse 12 computer science IPcbse 12 computer science IP
cbse 12 computer science IP
 
Binder1
Binder1Binder1
Binder1
 

More from Express News

More from Express News (18)

Network Security
Network SecurityNetwork Security
Network Security
 
Network Security
Network SecurityNetwork Security
Network Security
 
Yagi uda antennea
Yagi uda antenneaYagi uda antennea
Yagi uda antennea
 
Audio amplifier prj
Audio amplifier prjAudio amplifier prj
Audio amplifier prj
 
PSK modulation
PSK modulationPSK modulation
PSK modulation
 
Term paper
Term paperTerm paper
Term paper
 
4 g technology
4 g technology4 g technology
4 g technology
 
Smart aquarium project
Smart aquarium projectSmart aquarium project
Smart aquarium project
 
Traffic Signal using Solar Panel
Traffic Signal using Solar PanelTraffic Signal using Solar Panel
Traffic Signal using Solar Panel
 
How to know original phone and fake phone
How to know original phone and fake phoneHow to know original phone and fake phone
How to know original phone and fake phone
 
Routing & Switching report
Routing & Switching reportRouting & Switching report
Routing & Switching report
 
DSP Report
DSP ReportDSP Report
DSP Report
 
TDMA
TDMATDMA
TDMA
 
Final ppt
Final pptFinal ppt
Final ppt
 
Student counselor
Student counselorStudent counselor
Student counselor
 
Aem
AemAem
Aem
 
CF
CFCF
CF
 
Cao project final
Cao project finalCao project final
Cao project final
 

Recently uploaded

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 

Recently uploaded (20)

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 

ESL report

  • 1. College of Engineering Course: ESL CId: 10938 Prepared by Salman Khaliq Bajwa (3746) Project Advisor Engr. Mohazzab College of Engineering PAF – Karachi Institute of Economics and Technology Karachi 1
  • 2. PREFACE This project is a comprehensive study of the MATLAB, a programming language. It tells us the use and commands of MATLAB. This project is intended to use in engineering and computer science. This project utilizes electronic concepts that can be helpful in understanding the electronic principles and the use of MATLAB. This project deals with the various number circuits and used in electronic systems. This project provides a very deep understanding of MATLAB software with standard circuit designing. ACKNOWLEDGEMENT I would like to express my gratitude to all those who gave me the possibility to complete this project. I want to thank my course instructor Mr. Mohazzab Jawaid for giving me permission to work on this project. Furthermore thanks to my engineering lab staff that gave and confirmed this permission and encouraged me to go ahead with my project. I am bound to the Honorable director of engineering for giving me such opportunity to work with our capabilities freely. I am deeply indebted to Mr. Mohazzab Jawaid whose help, stimulating suggestions and encouragement helped me in all the time of making this project. My friends from the Department of engineering supported me in my project. I want to thank them for all their help, support, interest and valuable hints. Especially I am obliged to my seniors. I also want to thank to our lab in charge for all his assistance on the ministerial computer. Our teachers was of great help in difficult times I will like to thanks each and every person, who helped and supported me and gave time to this project. 2
  • 3. Table of Contents PREFACE ....................................................................................................................................... 2 1. Objective & Puposes: .................................................................................................................. 4 Objective: ……………………………………………………………………………4 Purpose:………………………………………………………………………………4 2. Description:…………………………………………………………………………………..4-5 DC Motor………………...…………………………………………………………..4 Parallel Port Interfacing:……………………………………………………………..4 3. Working……………………………………………………………………………………..….5 4. MATLAB Program Code…………………………………………………………………….7-6 5. GUI……………………………………………………………………………………………..8 Conclusion 3
  • 4. 1. Objective & Purpose: Objective: To design an application in order to control the DC motor and LEDs using GUI based MATLAB program through Parallel Port. Purpose: To understand and be familiar of the commands of MATLAB software and the need and importance of this software in industry. 2. Description: A small description of this project is that we would be interfacing the dc motor and some LEDs through parallel port using MATLAB software. Most of the coding will be done through MATLAB. We will turn on and off the dc motor & LEDs. Some information about the ports and components that I am using in this software is given below; DC Motor: A DC motor is an electric motor that runs on direct current (DC) electricity. DC motors are fairly simple to understand. They are also simple to make and only require a battery or dc supply to make them run. Parallel Port Interfacing: Parallel port is a simple and inexpensive tool for building computer controlled devices and projects. The simplicity and ease of programming makes parallel port popular in electronics hobbyist world. The parallel port is often used in Computer controlled robots, Atmel/PIC programmers, home automation etc. It takes 5 volts. It can send a large amount of data at a time but when we talk about the larger distances we have to look at the serial port. This is actually the drawback of parallel port that we cannot use it for large data transmission, but wirelessly we can do it. . 4
  • 5. Figure 1- Parallel Port Figure 3- data transmission 3. Working: I have made a GUI based project. How it works is that it actually takes the input from the user and on and offs the DC motor and 3 LEDs. I am going to use four ports; port 1, port 2, port 3, port 4 and port 5 for that. It is actually a series circuit. Port 2 is for DC motor and Port 3, 4 and 5 are for LEDs. Step one of this project was to design a GUI for this project and then the second step was to interface that GUI with my hardware. 5
  • 6. 4. MATLAB Program Code: function varargout = pin_by_pin(varargin) %--------------------------------------| % Programmer: Salman Khaliq Bajwa | % Course: ESL | % Id: 3746 | % CId: 10938 | % E-mial: damigo88@yahoo.com | % Project: Parallel Port Interfacing | %--------------------------------------| gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @pin_by_pin_OpeningFcn, ... 'gui_OutputFcn', @pin_by_pin_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []); if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1}); end if nargout [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else gui_mainfcn(gui_State, varargin{:}); end % End initialization code - DO NOT EDIT % --- Executes just before pin_by_pin is made visible. function pin_by_pin_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn. % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % varargin command line arguments to pin_by_pin (see VARARGIN) %*-*-*-*-*-*-*-*-*-*-*-*- pp=digitalio('parallel','LPT1'); handles.dato=addline(pp,0:3,'out'); putvalue(handles.dato,0); %-*-*-*-*-*-*-*-*-*-*-**- % Choose default command line output for pin_by_pin handles.output = hObject; % Update handles structure guidata(hObject, handles); % UIWAIT makes pin_by_pin wait for user response (see UIRESUME) % uiwait(handles.figure1); % --- Outputs from this function are returned to the command line. function varargout = pin_by_pin_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) 6
  • 7. % Get default command line output from handles structure varargout{1} = handles.output; % --- Executes on button press in pin_2. function pin_2_Callback(hObject, eventdata, handles) a=get(handles.pin_2,'Value'); b=get(handles.pin_3,'Value'); c=get(handles.pin_4,'Value'); d=get(handles.pin_5,'Value'); m=[a b c d]; out=binvec2dec(m); set(handles.text1,'String',out) putvalue(handles.dato,out); % --- Executes on button press in pin_4. function pin_4_Callback(hObject, eventdata, handles) a=get(handles.pin_2,'Value'); b=get(handles.pin_3,'Value'); c=get(handles.pin_4,'Value'); d=get(handles.pin_5,'Value'); m=[a b c d]; out=binvec2dec(m); set(handles.text1,'String',out) putvalue(handles.dato,out); % --- Executes on button press in pin_3. function pin_3_Callback(hObject, eventdata, handles) a=get(handles.pin_2,'Value'); b=get(handles.pin_3,'Value'); c=get(handles.pin_4,'Value'); d=get(handles.pin_5,'Value'); m=[a b c d]; out=binvec2dec(m); set(handles.text1,'String',out) putvalue(handles.dato,out); % --- Executes on button press in pin_5. function pin_5_Callback(hObject, eventdata, handles) a=get(handles.pin_2,'Value'); b=get(handles.pin_3,'Value'); c=get(handles.pin_4,'Value'); d=get(handles.pin_5,'Value'); m=[a b c d]; out=binvec2dec(m); set(handles.text1,'String',out) putvalue(handles.dato,out); 7
  • 8. 5. GUI of the project: Figure 3- GUI Conclusion I can conclude that this project can be used for various purposes like for the interfacing of many other things like home appliances, Industries etc. This project helped me a lot in improving my typing skills and also my understanding the need MATLAB in market. References: [1 ] http://www.mathswork.com Topic: Parallel Port Interfacing | Visiting Date: 05/Feb/2011 © 1999-2010 mathswork.com Hong Kong Limited and licensors. All rights reserved. [2] http://www.wikipedia.com Topic: Parallel Port | Visiting Date: 11/March/2011 ©2002-2011, Wikipedia . All rights reserved. 8