Anda di halaman 1dari 3

Adams Engineering College, Paloncha ECE Department MPMC LAB

Experiment No.: 22 Page 1 of 3 Year : III/IV B.Tech II Semester

TRAFFIC LIGHTS INTERFACE

; assume the interface is connected to J2 of the trainer ; ESA-31 can be in keyboard mode or in serial mode ; The traffic system moves from one state to next state ; After a fixed time delay. ; Program memory from 8000H to 804FH ORG PORT-A PORT-B PORT-C CWR ADDER 8000 8003 8005 8006 8009 800A 800C 800E 8011 8012 8014 8016 8017
Lab in-charge

EQU EQU EQU EQU EQU LABEL START: AGAIN: NEXT1:

8000H E800H E801H E802H E803H MNEMONICS MOV DPTR, #0E803H MOV A, #80H MOV X @DPTR, A MOV DPTR, #PORTS MOV X A, @DPTR PUSH DPL PUSH DPH MOV DPTR, #E800H MOV X @DPTR, A POP DPH POPDPL INC DPTR MOV X A, @DPTR
HOD, ECE

OPCODE 90 E8 03 74 80 F0 90 00 00 E0 C0 82 C0 83 90 E8 00 F0 D0 83 D0 82 A3 E0

Adams Engineering College, Paloncha ECE Department MPMC LAB


Experiment No.: 22 Page 2 of 3 Year : III/IV B.Tech II Semester

8018 C0 82 PUSH DPL 801A C0 83 PUSH DPH 801C 90 E8 01 MOV DPTR, #E801H 801F F0 MOV X @DPTR,A 8020 D0 83 POP DPH 8022 D0 82 POP DPL 8024 A3 INC DPTR 8025 E0 MOV X A, @DPTR, A 8026 C0 82 PUSH DPL 8028 C0 83 PUSH DPH 802A 90 E8 02 MOV DPTR, #E802H 802D F0 MOV X @DPTR, A 802E D0 83 POP DPH 8030 D0 82 POP DPL 8032 A3 INC DPTR 8033 12 80 3D CALL DELAY 8036 E5 82 MOV A, DPL 8038 B4 1E CE CJNE A, #01H, NEXT1 803B 80 C9 SJMP, AGAIN 803D 7A 06 DELAY: MOV R2, #06H 803F 7C FF LOOP3: MOV R4, #0FFH 8041 7B FF LOOP2: MOV R3, #0FFH 8043 1B LOOP1: DEC R3 8044 BB 00 FC CJNE R3, #00, LOOP1 8047 1C DEC R4 8048 BD 00 F0 CJNE R4, #00, LOOP2 804B 1A DEC R2 804C BA 00 F0 CJNE R2, #00, LOOP3 804F 22 RET Enter the below mentioned data from 0000 to 001E at data memory.
Lab in-charge HOD, ECE

Adams Engineering College, Paloncha ECE Department MPMC LAB


Experiment No.: 22 Page 3 of 3 Year : III/IV B.Tech II Semester

0000 0003 0006 0009 000C 000F 0012 0015 0018 001B 001E

10 81 7A 44 44 F0 08 11 E5 44 44 F0 81 10 DA 44 44 F0 11 08 B5 44 44 F0 88 88 00 44 44 F0 00

PORTS: : : : : : : : : : :

DB 10H, 81H, 7AH DB 44H, 44H,0F0H DB 08H, 11H, 0E5H DB 44H, 44H,0F0H DB 81H, 10H, 0DAH DB 44H, 44H,0F0H DB 11H, 08H, 0B5H DB 44H, 44H, 0F0H DB 88H, 88H, 00H DB 44H, 44H, 0F0H DB 00H

Result: Thus traffic lights interface is interfaced with micro controller 8051.

Lab in-charge

HOD, ECE