Av 314 Lab 7 Group 3
Av 314 Lab 7 Group 3
LAB REPORT 07
GROUP 03
DC MOTOR SPEED CONTROL USING PIC MICROCONTROLLER IN PROTEUS
SUBMITTED BY:
A/C SHAYAN BAIG 21097004
SUBMITTED TO:
LE FAZAL UR REHMAN
AIM:
The aim of this lab is to control the DC motor speed using PIC 18F4550 microcontroller in proteus.
QUESTION NO 1)
Simulate a DC motor speed control while displaying its speed on LCD using PIC18F4550
microcontroller on Proteus.
PSEUDO CODE:
The pseudo code is given by:
Initialize variables
temp as integer
Initialize LCD
Start PWM1
Stop PWM2
Set current_duty1 to 90
Set temp to 90
Set current_duty1 to 60
Set temp to 60
Stop PWM1
Start PWM2
Stop PWM1
Set current_duty1 to 90
Set temp to 90
Set current_duty1 to 60
Set temp to 60
Stop PWM2
CODE:
The Hex file code for controlling DC Motor speed is given by:
PROTEUS MODEL:
The proteus model is given as:
The motor speed is controlled by varying the duty cycle of the PWM signals applied
to the motor driver. The duty cycle determines how much power is delivered to the motor,
thus controlling its speed. Higher duty cycles mean higher speeds and lower duty cycles
mean lower speeds. The above hex file code alternates between different duty cycles to