Fire Bird V P89V51RD2: Motion Control Using I/O Ports
Fire Bird V P89V51RD2: Motion Control Using I/O Ports
By Pawankumar Suryawanshi
ERTS LAB
CSE IIT BOMBAY
Various Motions of Fire Bird V
Forward Reverse
ERTS LAB
CSE IIT BOMBAY
Direction Control
• Two DC motors are connected to Port1
(P1.0-P1.4)and Port3(P3.4) of the
microcontroller.
ERTS LAB
CSE IIT BOMBAY
Block Diagram of L293D IC
ERTS LAB
CSE IIT BOMBAY
Logic table for direction control of Motors:
LEFT LEFT RIGHT RIGHT
BACKWARD FORWARD FORWARD BACKWARD
DIRECTION (LB) (LF) (RF) (RB) PWM
P1.0 P1.1 P1.2 P3.4
0 1 1 0 As per velocity
FORWARD requirement
1 0 0 1 As per velocity
REVERSE requirement
LEFT (Left wheel fwd, 0 1 0 1 As per velocity
Right wheel bckwd) requirement
RIGHT (Left wheel 1 0 1 0 As per velocity
bckwd, Right wheel fwd) requirement
SOFT LEFT (Left wheel 0 1 0 0 As per velocity
fwd, Right wheel stop) requirement
SOFT RIGHT (Left wheel 0 0 1 0 As per velocity
stop, Right wheel fwd) requirement
SOFT RIGHT 2 (Left 0 0 0 1
As per velocity
wheel stop, Right wheel
requirement
bckwd)
SOFT LEFT 2 (Left wheel 1 0 0 0 As per velocity
bckwd, Right wheel stop) requirement
0 0 0 0 As per velocity
HARD STOP requirement
SOFT STOP (Free X X X X
0
running stop)