You are currently viewing Interface Traffic Light with 8051 Lab Trainer Kit

Interface Traffic Light with 8051 Lab Trainer Kit

Spread the love

8051 – TRAINER BOARD

8051 Lab Trainer kit is proposed to smooth the progress of learning and developing designs of MCU from Intel and NXP. It has the facility to connect PC’s 101/104 Keyboard, to enter user programs in Assembly languages. Serial communication achieved using 8051. It also supports C & assembly language in standalone kit (P89V51RD2). It’s designed as to facilitate On-board Programmer for NXP 8051 MCU through ISP on serial port.

TRAFFIC LIGHT CONTROL

Traffic lights, which may also be known as stoplights, traffic lamps, traffic signals, signal lights, robots or semaphore, are signaling devices positioned at road intersections, pedestrian crossings and other locations to control competing flows of traffic.

INTERFACING TRAFFIC LIGHT WITH 8051

The Traffic light controller section consists of 12 Nos. point LEDS are arranged by 4Lanes in Traffic light interface card. Each lane has Go (Green), Listen (Yellow) and Stop (Red) LED is being placed.

ABOUT THE COLORS OF TRAFFIC LIGHT CONTROL

Traffic lights alternate the right of way of road users by displaying lights of a standard color (red, yellow/amber, and green), using a universal color code (and a precise sequence to enable comprehension by those who are color blind).

In the typical sequence of colored lights:

  • Illumination of the green light allows traffic to proceed in the direction denoted,
  • Illumination of the yellow/amber light denoting, if safe to do so, prepare to stop short of the intersection, and
  • Illumination of the red signal prohibits any traffic from proceeding. Usually, the red light contains some orange in its hue, and the green light contains some blue, for the benefit of people with red-green color blindness, and “green” lights in many areas are in fact blue lenses on a yellow light (which together appear green).

PIN ASSIGNMENT WITH 8051


CIRCUIT DIAGRAM TO INTERFACE TRAFFIC LIGHT

ASSEMBLY PROGRAM TO INTERFACE TRAFFIC LIGHT

***************************************************************************************

Title : Program to interface Traffic Light with 8051

***************************************************************************************

CNTL PORT :4003

PORT A  :4000   PORT B   :4001

MEMORY ADDRESSOPCODEMNEMONICS
85009085 45START:MOV DPTR,#TRE
85037A 0CMOV R2,#0C
8505E0MOVX @DPTR,A
8506C0 83PUSH DPH
8508C0 83PUSH DPL
850A90 40 03MOV DPTR,#CNTL PORT
850DF0MOVX @DPTR,A
850ED0 82POP DPL
8510D0 83POP DPH
8512A3INC DPTR
8513E0LOOP1:MOVX @DPTR,A
8514C0 83PUSH DPH
8516C0 82PUSH DPL
851890 40 00MOV DPTR,#PORTA
851BF0MOVX @DPTR,A
851CD0 82POP DPL
851ED0 83POP DPH
8520A3INC DPTR
8521E0MOVX @DPTR,A
8522C0 83PUSH DPH
8524C0 82PUSH DPL
852690 40 01MOV DPTR,#PORTB
8529F0MOVX @DPTR,A
852A12 85 36LCALL DELAY
852DD0 82POP DPL
852FD0 83POP DPH
8531A3INC DPTR
8532DA DFDJNZ R2,LOOP1
853480 CASJMP START
85367F 10DELAY:MOV R7,#10H
85387D FFLOOP4:MOV R5,#0FFH
853A7E FFLOOP3:MOV R6,#0FFH
853C00LOOP2:NOP
853D00NOP
853EDE FCDJNZ R6, LOOP2
8540DD F8DJNZ R5, LOOP3
8542DF F4DJNZ R7, LOOP4
854422RET

TRE: 8600

8601    21H,09H,10H,00H (SOUTH WAY)

8605    0CH,09H,80H,00H (EAST WAY)

8609   64H,08H,00H,04H (NOURTH WAY)

860D   24H,03H,02H,00H (WEST WAY)

8611   END

NOTE: The schematics sections given is, Traffic light connected to port 1 and Port 3 The sample program is Given based on 8255

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.