Sei sulla pagina 1di 4

Design of Traffic Light Controller using

8051 Microcontroller
Posted on February 27, 2014
Schematic Diagram:
This system is designed and simulated using Proteus software.

Schematic File link : http://www.4shared.com/file/2AgZC-QJce/traffic_controller.html


Assembly Language Code:
org 0000h
// Data
// Allow north
mov 30h,#38h

Follow

mov 31h,#88h
// north amber
mov 32h,#48h
mov 33h,#88h
// East allow
mov 34h,#83h
mov 35h,#88h
//East amber
mov 36h,#84h
mov 37h,#88h
// South allow
mov 38h,#88h
mov 39h,#83h
//South amber
mov 3ah,#88h
mov 3bh,#84h
// West allow
mov 3ch,#88h
mov 3dh,#38h
//West amber
mov 3eh,#88h

Follow

mov 3fh,#48h
Again :
mov r0,#2fh // Data pointer
loop:inc r0
mov p1,@r0
inc r0
mov p2,@r0
call next
cjne r0,#3fh,loop

// comparing address count

jmp again
delay:
mov r1,#10h
stage1:
cpl p3.7
mov r2,#0ffh
stage2:
mov r3,#0ffh
stage3:
djnz r3,stage3
djnz r2,stage2
djnz r1,stage1

Follow

ret
next:
mov r4,#05h
go:
mov p3,r4
call delay
djnz r4,go
ret
end
Assembly Code : http://www.4shared.com/file/znuN5b4Aba/traffic_ctrl.html
Hex File : http://www.4shared.com/file/haISvv5rce/traffichex.html

SHARE THI S:

Email

Twitter

Facebook

Google

Like
Be the first to like this.

RELATED

Design of vistor counter


using 8051
Microcontroller

Obtaining variable AC
voltage

Electronic Variable
Resistor / Electronic
Load

This entry was posted in Uncategorized by arulselvamk. Bookmark the permalink


[https://arulselvamk.wordpress.com/2014/02/27/design-of-traffic-light-controllerusing-8051-microcontroller/] .

Follow

Potrebbero piacerti anche