Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
8051 Microcontroller
Posted on February 27, 2014
Schematic Diagram:
This system is designed and simulated using Proteus software.
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
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:
Like
Be the first to like this.
RELATED
Obtaining variable AC
voltage
Electronic Variable
Resistor / Electronic
Load
Follow