Traffic Control System Using 89c51 and Assembly Language
Traffic Control System Using 89c51 and Assembly Language
System
using 89C51
Project Title:
Description
Traffic congestion is one of the major problems, the
Description
Description
Description
Flashing Yellow: Caution, crossing or road
Description
ASSUMPTION:
Description
Description
Working procedure:
Description
Most of the time general people are not use
COMPONENTS
AT89C51 Microcontroller Chip, 1pic
Crystal 12MHZ
PC B Board
COMPONENTS
AT89C51 is an 8-
AT89C51
COMPONENTS
These octal bus transceivers are
74LS245
COMPONENTS
This package contains six
inverter
All six inverters can be used
independently of one another .
7404
COMPONENTS
Resistance - 330 ohms
COMPONENTS
LED
COMPONENTS
4.5 V to 36 V
Separate Input-Logic Supply
High-Noise-Immunity Inputs
Output Current 1 A Per
Channel
Peak Output Current 2 A Per
Channel
Can Drive 2 motors (servo or dc
motor ) at a time
Can Drive one stepper motor
Stepper motor
Astepper motoris a brushless DC
Circuit Schematic
Program
ORG 0H
MOV R1,#22H
MOV R2,#24H
MOV R3,#14H
MOV R4,#0CH
MOV R6,#21H
ORG 0030
;load R1,22H
;load R2,24H
;load R3,14H
;load R4,0CH
;load R6,21H
Program
START: MOV p2,R2
;Sent port2 from R2
ACALL DELAY2
MOV p1,R6
;Sent port1 from R6
ACALL COUNTD
MOV p2,R2
;Sent port2 from R2
MOV p1,R6
;Sent port1 from R6
ACALL COUNTD
MOV p2,#26H ;Sent port2 from 26H
MOV p1,R1
;Sent port1 from R1
ACALL DELAY2
MOV p2,R6
;Sent port2 from R6
MOV p1,R2
;Sent port1 from R2
ACALL COUNTD
MOV p2,R6
;Sent port2 from R6
MOV p1,R2
;Sent port1 from R2
ACALL COUNTD
MOV p2,R1
;Sent port2 from R1
MOV p1,#34H ;Sent port1 from 34H
Program
ACALL DELAY2
MOV p2,R2
MOV p1,R4
ACALL COUNTD
MOV p2,R2
;Sent port2 from R2
MOV p1,R4
;Sent port1 from R4
ACALL COUNTD
MOV p2,#34H ;Sent port2 from 34H
MOV p1,R3
;Sent port1 from R3
ACALL DELAY2
MOV p2,R4
;Sent port2 from R4
MOV p1,R2
;Sent port1 from R2
ACALL COUNTD
Program
MOV p2,R4
MOV p1,R2
ACALL COUNTD
MOV p2,R3
;Sent port2 from R3
MOV p1,#24H
;Sent port1 from 24H
ACALL DELAY2
MOV p2,#0E4h ;Sent port2 from E4H
MOV p1,#0E4h ;Sent port1 from E4H
ACALL COUNTD
MOV p2,R2
;Sent port2 from R2
MOV p1,#26H
;Sent port1 from 26H
ACALL DELAY2
LJMP START
Program
COUNTD: MOV p0,#67H ; 9
ACALL DELAY2
MOV p0,#7FH ; 8
ACALL DELAY2
MOV p0,#27H ; 7
ACALL DELAY2
MOV p0,#7DH ; 6
ACALL DELAY2
MOV p0,#6DH ; 5
ACALL DELAY2
MOV p0,#66H ; 4
ACALL DELAY2
MOV p0,#4FH ; 3
ACALL DELAY2
MOV p0,#5BH ; 2
ACALL DELAY2
MOV p0,#06H ; 1
ACALL DELAY2
MOV p0,#3fH ; 0
ACALL DELAY2
RET
Program
DELAY1: MOV R0,#0EFH
L3: MOV R5,#7DH
L2: MOV R7,#7DH
L1: NOP
NOP
DJNZ R7,L1
DJNZ R5,L2
DJNZ R0,L3
RET
DELAY2: MOV
R0,#7DH
;47
L6: MOV R5,#7DH
L5: MOV R7,#0FFH
L4:
DJNZ R7,L4
NOP
DJNZ R5,L5
DJNZ R0,L6
RET
END
Simulation
Reference
http://www.engineersgarage.com/electronic-c
omponents/at89c51-microcontroller-datasheet
https://www.ece.cmu.edu/~ece348/labs/docs
/SN74LS245.pdf
http://www.me.umn.edu/courses/me2011/ardui
no/technotes/dcmotors/L293/L293.html
UIUserver 2
Thanks
Any Question or Query ?