Remote Control Car Project
Remote Control Car Project
PROJECT REPORT
RC car using PIC microcontroller
Components Used:
PIC18F452
DC Motor
L293D
DC Supply
Car Model
PIC18F452:
PIC18F452 microcontroller is used to control the DC motors via
programming. The programming is done in C language. It has 40 pins
out of which 33 pins can be used for input & output. In this project,
PORTB is used as an output port and PORTD is used as an input port.
Push buttons are attached at input for control of car and motor driver is
attached at the output port which is further connected with DC motors.
DC Motor:
DC motors are used to move the car in forward & reverse direction
and to turn the car left & right. Two switches are used for forward and
2 | Page
reverse direction and two switches are used for leftward and rightward
motion.
L293D:
To change the direction of DC motor, H-bridge circuit is used.
L293D is the integrated circuit of H-bridge. This is the driver of motors.
Circuit Diagram:
3 | Page
Source Code:
void main()
{trisb=0x00;
trisd=0xff;
while(1)
{
if(portd.f0==1)
{
portb.f0=1;
portb.f1=0;
portb.f2=1;
portb.f3=0;}
else if(portd.f1==1)
{
portb.f0=0;
portb.f1=1;
portb.f2=0;
portb.f3=1;
}
else if(portd.f2==1)
{ portb.f0=1;
portb.f1=0;
5 | Page
delay_ms(700);
portb.f2=1;
portb.f3=0;}
else if(portd.f3==1)
{ portb.f2=1;
portb.f3=0;
delay_ms(700);
portb.f0=1;
portb.f1=0;}
else
{
portb.f0=0;
portb.f1=0;
portb.f2=0;
portb.f3=0; }
References:
6 | Page
7 | Page