Vous êtes sur la page 1sur 14

LAB REPORT

EC501- EMBEDDED SYSTEM


APPLICATION
LAB

:6

TITTLE : DC Motor with L293 motor driver


and DC motor speed using PWM
GROUP MEMBER:
NO.

NAME

REG. NUMBER

MOHAMAD AMERUDIN BIN RAMLI

16DET12F1047

BADRUL AMIN BIN MOHD RADZI

16DET12F1061

NUR FITHRY BIN SHURAN EFFENDIE

16DET12F1057

16DET12F10

Cover page
Objective
Equipment

/5

Background
Theory

/10

Procedures Data
collection

/20

Discussion

/30

Conclusion

/15

Total Marks

/100

PROCEDURE:
(CREATE NEW PROJECT)

i.

Firstly, go to MENU BAR and click Project-> Project Wizard.

i.

To continue, click Next.

i.
ii.

After that, choose PIC18F45K22 from the Device menu.


After select the PIC are needed, click Next.

i.

After choosed, a HI-TECH ANSI C Compiler will show up in the Toolsuite

ii.

Content.
After that, click Next.

i.

Subsequently, the untitled file (e.g. Lab5 LCD) are save on my own folder (e.g.

ii.

Lee Lab5).
Simultaneously, make sure Save as type are MPLAB IDE Project Files (.mcp).

i.

Subsequently, the untitled file (e.g. LAB 6) are save on my own folder (e.g.

ii.

EC501-Lab6).
Simultaneously, make sure Save as type are MPLAB IDE Project Files (.mcp).

i.

After create the new project file, click Next.

i.

In step 4, there are no existing file to be added so we can skip this step by just
click Next.

i.

After the (Summary) was appear on the screen, just click Finish.

i.

From the MENU BAR, click File>New.

i.

After create the new file, from the MENU BAR click Save As.

i.
ii.

Then, save as Lab6.c from my own project folder (EC501-Lab6).


Then, make sure (Save as type) are (.c).

i.
ii.

i.

Copy and paste the all template source code in the file that been save from the
MPLAB.
After that, click Source Files-> Add Files.

After that, click LAB6.c ( From my own project folder).

i.

The LAB6.c are been double click to activated it.

i.

After change the Programmer Setup, press CTRL + F10 to compile the
procedure until Build successful.

i.

Then, connect ESPIC40C Trainer to Computer via USB port.

5. Press push button 1 and after a few second/minutes, press push button 2. Write
your observation.

6. Change the code to change dc motor direction.

EXERCISES 2: DC MOTOR SPEED CONTROL


1. Create the new project or open existing project file.

i.

Copy and paste the instruction code(PWM & SWITCH) in Untitled,

i.

Then, go to MENU BAR find the (File) and click Save As

iii.
iv.

Then, save as Lab6.c from my own project folder (EC501-LAB6B).


Then, make sure (Save as type) are (.c).

iii.

After that, click Source Files-> Add Files.

ii.

After that, click Lab6B.c ( From my own project folder).

i.

After change the Programmer Setup, press CTRL + F10 to compile the
procedure until Build successful.

3. Press push button PB1, PB2 and PB3 in interval time.

4. Change the code to change all the motor speed.

Vous aimerez peut-être aussi