单片机带应急的交通灯控制实验程序(汇编).docVIP

  • 145
  • 0
  • 约2.67千字
  • 约 5页
  • 2018-03-29 发布于河南
  • 举报

单片机带应急的交通灯控制实验程序(汇编).doc

单片机带应急的交通灯控制实验程序(汇编)

单片机带应急的交通灯控制实验(汇编) org 00h ajmp main org 0003h ajmp int_ red_we equ p1.1 yel_we equ p1.2 gre_we equ p1.3 red_sn equ p1.5 yel_sn equ p1.6 gre_sn equ p1.7 org 0030h main: mov sp ,#65h call init_int clr red_we clr red_sn call delay3 loop: clr gre_we setb red_we call delay5 setb gre_we clr yel_we mov r4,#10 sight:call delay_200ms cpl yel_we djnz r4,sight setb yel_we call delay_200ms clr gre_sn setb red_sn clr red_we call delay5 setb gre_sn clr yel_sn mov r4,#10 sight1: call delay_200ms cpl yel_sn djnz r4,sight1 setb yel_sn clr red_sn clr red_we call delay_200ms sjmp loop ;;;;;;;;;;;;;;;;;;;;;;;

文档评论(0)

1亿VIP精品文档

相关文档