Mi Pro
Mi Pro
Dynamic Control
Dynamic, or actuated, signals are programmed to adjust their timing and phasing to
meet changing traffic conditions. The system adjusts signal phasing and timing to
minimize the delay of people going through the intersection. It is also commonplace to
alter the control strategy of a traffic light based on the time of day and day of the week,
or for other special circumstances such as a major event causing unusual demand at an
intersection.
The controller uses input from detectors, which are sensors that inform the controller
processor whether vehicles or other road users are present, to adjust signal timing and
phasing within the limits set by the controllers
Working Program
Design of a microprocessor system to control traffic lights. The traffic should be
controlled in the following manner.
1) Allow traffic from W to E and E to W transition for 20 seconds. 2) Give transition
period of 5 seconds (Yellow bulbs ON) 3) Allow traffic from N to 5 and 5 to N for 20
seconds 4) Give transition period of 5 seconds (Yellow bulbs ON) 5) Repeat the process.
Source Program:
MVI A, 80H: Initialize 8255, port A and port B
MVI A, 24H
MVI A, 12H
MVI A, 24H
MVI A, 09H
JMP START
Delay Subroutine:
DELAY: LXI D, Count: Load count to give 0.5 sec delay
MOV A, D
JNZ DELAY
*8086 code*
START:
MOV AX,@DATA
MOV DS,AX
MOV AL,80H
MOV DX,CWR
OUT DX,AL
MOV AL,F3H
MOV DX,PORTC
OUT DX,AL
MOV AL,FFH
MOV DX,PORTA
OUT DX,AL
MOV AL,FFH
MOV DX,PORTB
OUT DX,AL
MOV CL,03H
CALL DELAY
TOP:
MOV AL,EEH
MOV DX,PORTA
OUT DX,AL
MOV AL,EEH
MOV DX,PORTB
OUT DX,AL
MOV CL,02H
CALL DELAY
MOV AL,FCH
MOV DX,PORTC
OUT DX,AL
MOV AL,7DH
MOV DX,PORTA
OUT DX,AL
MOV AL,57H
MOV DX,PORTB
OUT DX,AL
MOV CL,15H
CALL DELAY
MOV AL,E7H
MOV DX,PORTB
OUT DX,AL
MOV AL,FDH
MOV DX,PORTA
OUT DX,AL
MOV AL,EDH
MOV DX,PORTA
OUT DX,AL
MOV CL,02H
CALL DELAY
MOV AL,F7H
MOV DX,PORTB
OUT DX,AL
MOV AL,F0H
MOV DX,PORTC
OUT DX,AL
MOV AL,F1H
MOV DX,PORTA
OUT DX,AL
MOV CL,15H
CALL DELAY
MOV AL,FBH
MOV DX,PORTA
OUT DX,AL
MOV AL,FBH
MOV DX,PORTB
OUT DX,AL
MOV AL,50H
MOV DX,PORTC
OUT DX,AL
MOV CL,15H
CALL DELAY
MOV AL,FEH
MOV DX,PORTA
OUT DX,AL
MOV AL,FEH
MOV DX,PORTB
OUT DX,AL
MOV CL,03H
CALL DELAY
MOV AL,FFH
MOV DX,PORTA
OUT DX,AL
MOV AL,AFH
MOV DX,PORTC
OUT DX,AL
MOV AL,EEH
MOV DX,PORTA
OUT DX,AL
MOV AL,EEH
MOV DX,PORTB
OUT DX,AL
MOV CL,02H
CALL DELAY
MOV AL,BFH
MOV DX,PORTA
OUT DX,AL
MOV AL,BFH
MOV DX,PORTB
OUT DX,AL
MOV CL,15H
CALL DELAY
JMP TOP
DELAY:
MOV BX,10H
D1:
MOV CX,0FFFFH
D2:
LOOP D2
DEC BX
JNZ D1
INT 03H
END START