Sparkfun wishlist imports have been deprecated
suria sarathAzharvkvigneshNithin john
Published © TAPR-OHL

How To Control Traffic by Using 8051 Microcontroller

This is a method to control the traffic using 8051 microcontroller, 2 switches and green, yellow and red LEDs.

BeginnerShowcase (no instructions)10 hours3,248
How To Control Traffic by Using 8051 Microcontroller

Things used in this project

Hardware components

Microchip 8051 microcontroller
×1
Male Header 40 Position 1 Row (0.1")
Male Header 40 Position 1 Row (0.1")
×1
Pushbutton switch 12mm
SparkFun Pushbutton switch 12mm
×3
LED (generic)
LED (generic)
×1

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Code

8051 micro controller based traffic light control

Assembly x86
org 0x00

suria:
jnb p1.1,l1
jnb p1.2,l2
jmp suria                                                                                           
l1: 
setb p2.2 
setb p2.3
clr  p2.5
call delay
setb  p2.5
clr  p2.4
setb p2.3 
clr p2.1
setb p2.2
setb p2.5                                                                                      
jmp suria
l2:
setb p2.4
setb  p2.1
clr p2.6
call delay
setb p2.6
clr p2.3
setb p2.1
clr p2.2
setb p2.4
setb p2.5
jmp suria                         


delay:
mov r1,#7
l13: mov r2,#255
l12: mov r3,#255
l11: djnz r3,l11
djnz r2,l12
djnz r1,l13  
ret   
end                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

Credits

suria sarath
8 projects • 26 followers
Embedded software programmer at Lanware Solutions
Contact
Azharvk
2 projects • 2 followers
Contact
vignesh
0 projects • 2 followers
Contact
Nithin john
0 projects • 2 followers
Am best hacker in the world
Contact

Comments

Please log in or sign up to comment.