You are on page 1of 10

EC301- EMBEDDED

APPLICATION SYSTEM
PROJECT ASSESSMENT
GROUP MEMBERS : TAN CHUN HAW (04DEE13F2005)
NAJIB BIN MD ZAKI (O4DEE13F2064)
MOHAMMAD HASRUL BIN SAMSI (04DEE132000)

AUTONOMOUS LINE
FOLLOWE ROBOT

INDRODUCTION

Line follower is a machine that can follow a


path. The path can be visible like black line
on a white surface

OBJECTIVE

To understand the structure and operation of


PIC18F4550.
To understand and design how to intergrate
the PIC18F4550, the components to PCB.
To design the program which are working
with PIC18F4550 for autonomous line
follower robot .
to create new inovation.

COMPONENTS

PIC18F4550
BUTTON
RESISTOR
MOTOR

INPUT/OUTPUT
INPUT
SENSOR BELOK KEKANAN(SW1)
SENSOR JALAN TERUS(SW2)
SENSOR BELOK KEKIRI(SW3)
OUTPUT
MOTOR KANAN(M1)
MOTOR KIRI(M2)

BLOCK DIAGRAM

RIGHT
MOTOR

INPUT

PIC18F4550
LEFT
MOTOR

SIMULATION

PROGRAM
#include<p18f4550.h>
#define
#define
#define
#define
#define
#define
#define

SW1 PORTBbits.RB0 // declare single bit


SW2 PORTBbits.RB1 // declare single bit
SW3 PORTBbits.RB2 // declare single bit
M1P PORTDbits.RD0 // declare single bit
M1N PORTDbits.RD1 // declare single bit
M2P PORTDbits.RD6 // declare single bit
M2N PORTDbits.RD7 // declare single bit

void main(void) // Main Program


{
ADCON1=0x0F;
//analog to digital
TRISB=1;
//declare port B as input
TRISD=0;
//declare port D as output
while(1)
//repeat forever
{
if(SW1==1)
M1P=1;
else
M1P=0;
if(SW1==1)
M2P=1;
else
M2P=0;
if(SW2==1)
M1P=1;
else
M1P=0;
if(SW2==1)
M2N=1;
else
M2N=0;
if(SW3==1)
M1N=1;
else
M1N=0;
if(SW3==1)
M2N=1;
else
M2N=0;
}
}

CONCLUSION
AT THE END OF THIS PROJECT :

We should be able to design the shematic


diagram and build the programmed.
We understand how the program working.

You might also like