⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jtd.htm

📁 路口分主干和支干道
💻 HTM
📖 第 1 页 / 共 3 页
字号:
                  INTT0<BR><BR>&nbsp; &nbsp; &nbsp; ORG &nbsp; 
                  &nbsp;0013H<BR>&nbsp; &nbsp; &nbsp; LJMP &nbsp; 
                  INTT1<BR><BR>&nbsp; &nbsp; &nbsp; ORG &nbsp; 
                  &nbsp;001BH<BR>&nbsp; &nbsp; &nbsp; LJMP &nbsp; 
                  TT1<BR><BR>&nbsp; &nbsp; &nbsp; ORG &nbsp; &nbsp;0100H<BR>TT1: 
                  &nbsp;MOV &nbsp; &nbsp;TH1,#0D8H &nbsp; &nbsp;&nbsp; 
                  &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;;定时器1,定时10us<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;TL1,#0F0H<BR>&nbsp; &nbsp; &nbsp; DJNZ &nbsp; 
                  R6,EXIT<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; &nbsp;R6,#100 
                  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;&nbsp; ;定时器定时100次<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;R1,#0FFH<BR>EXIT: RETI<BR><BR>INTT0:MOV &nbsp; 
                  &nbsp;P1,#0BEH &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;&nbsp; &nbsp;&nbsp; ;外部中断0,<BR>&nbsp; &nbsp; &nbsp; JB 
                  &nbsp; &nbsp; P3.4,$<BR>&nbsp; &nbsp; &nbsp; 
                  RETI<BR><BR>INTT1:MOV &nbsp; &nbsp;P1,#0BBH &nbsp; 
                  &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;&nbsp; ;外部中断1,<BR>&nbsp; &nbsp; &nbsp; JB &nbsp; &nbsp; 
                  P3.4,$<BR>&nbsp; &nbsp; &nbsp; RETI<BR><BR>&nbsp; &nbsp; 
                  &nbsp; ORG &nbsp; &nbsp;1000H<BR>MAIN: MOV &nbsp; 
                  &nbsp;R6,#100 &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;&nbsp; &nbsp;&nbsp; ;主程序;<BR>&nbsp; &nbsp; &nbsp; MOV 
                  &nbsp; &nbsp;R1,#00H<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;TMOD,#10H &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;&nbsp; &nbsp;;初始化<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;TH1,#0D8H<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;TL1,#0F0H<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;IE,#8DH<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;20H,#25<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;21H,#5<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;22H,#15<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;23H,#30<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;24H,#20<BR>&nbsp; &nbsp; &nbsp; SETB &nbsp; 
                  TR1<BR><BR>ST1: &nbsp;MOV &nbsp; &nbsp;P1,#0BBH &nbsp; 
                  &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 
                  ;第一个状态,主干道亮绿灯、支干道亮红灯;<BR>&nbsp; &nbsp; &nbsp; CJNE &nbsp; 
                  R1,#0FFH,TZ1<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;R1,#00H<BR>&nbsp; &nbsp; &nbsp; DEC &nbsp; 
                  &nbsp;20H<BR>&nbsp; &nbsp; &nbsp; DEC &nbsp; &nbsp;23H<BR>TZ1: 
                  &nbsp;MOV &nbsp; &nbsp;R2,20H<BR>&nbsp; &nbsp; &nbsp; MOV 
                  &nbsp; &nbsp;R3,23H<BR>&nbsp; &nbsp; &nbsp; LCALL &nbsp;DISP 
                  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;&nbsp; &nbsp; ;调用显示子程序。<BR><BR>&nbsp; &nbsp; &nbsp; MOV 
                  &nbsp; &nbsp;A,20H<BR>&nbsp; &nbsp; &nbsp; CJNE &nbsp; 
                  A,#00H,ST1<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;20H,#25<BR><BR>ST2: &nbsp;MOV &nbsp; &nbsp;P1,#0BDH 
                  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;;第二个状态,主干道亮黄灯、支干道亮红灯;<BR>&nbsp; &nbsp; &nbsp; CJNE 
                  &nbsp; R1,#0FFH,TZ2<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;R1,#00H<BR>&nbsp; &nbsp; &nbsp; DEC &nbsp; 
                  &nbsp;21H<BR>&nbsp; &nbsp; &nbsp; DEC &nbsp; &nbsp;23H<BR>TZ2: 
                  &nbsp;MOV &nbsp; &nbsp;R2,21H<BR>&nbsp; &nbsp; &nbsp; MOV 
                  &nbsp; &nbsp;R3,23H<BR>&nbsp; &nbsp; &nbsp; LCALL &nbsp;DISP 
                  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;&nbsp; &nbsp; ;调用显示子程序。<BR>&nbsp; &nbsp; &nbsp; MOV 
                  &nbsp; &nbsp;A,21H<BR>&nbsp; &nbsp; &nbsp; CJNE &nbsp; 
                  A,#00H,ST2<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;21H,#05<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;23H,#30<BR><BR>ST3: &nbsp;MOV &nbsp; &nbsp;P1,#0DEH 
                  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;;第三个状态,主干道亮红灯、支干道亮绿灯;<BR>&nbsp; &nbsp; &nbsp; CJNE 
                  &nbsp; R1,#0FFH,TZ3<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;R1,#00H<BR>&nbsp; &nbsp; &nbsp; DEC &nbsp; 
                  &nbsp;24H<BR>&nbsp; &nbsp; &nbsp; DEC &nbsp; &nbsp;22H<BR>TZ3: 
                  &nbsp;MOV &nbsp; &nbsp;R2,24H<BR>&nbsp; &nbsp; &nbsp; MOV 
                  &nbsp; &nbsp;R3,22H<BR>&nbsp; &nbsp; &nbsp; LCALL &nbsp;DISP 
                  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;&nbsp; &nbsp; ;调用显示子程序。<BR>&nbsp; &nbsp; &nbsp; MOV 
                  &nbsp; &nbsp;A,22H<BR>&nbsp; &nbsp; &nbsp; CJNE &nbsp; 
                  A,#00H,ST3<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;22H,#15<BR><BR>ST4: &nbsp;MOV &nbsp; &nbsp;P1,#0EEH 
                  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;;第四个状态,主干道亮红灯、支干道亮黄灯;<BR>&nbsp; &nbsp; &nbsp; CJNE 
                  &nbsp; R1,#0FFH,TZ4<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;R1,#00H<BR>&nbsp; &nbsp; &nbsp; DEC &nbsp; 
                  &nbsp;24H<BR>&nbsp; &nbsp; &nbsp; DEC &nbsp; &nbsp;21H<BR>TZ4: 
                  &nbsp;MOV &nbsp; &nbsp;R2,24H<BR>&nbsp; &nbsp; &nbsp; MOV 
                  &nbsp; &nbsp;R3,21H<BR>&nbsp; &nbsp; &nbsp; LCALL &nbsp;DISP 
                  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;&nbsp; &nbsp; ;调用显示子程序。<BR>&nbsp; &nbsp; &nbsp; MOV 
                  &nbsp; &nbsp;A,21H<BR>&nbsp; &nbsp; &nbsp; CJNE &nbsp; 
                  A,#00H,ST4<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;21H,#05<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;24H,#20<BR>&nbsp; &nbsp; &nbsp; LJMP &nbsp; ST1 &nbsp; 
                  &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;&nbsp; &nbsp;&nbsp; ;跳转到第一个状态。<BR><BR>DISP: MOV &nbsp; 
                  &nbsp;A,R2 &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; ;显示子程序。<BR>&nbsp; &nbsp; 
                  &nbsp; MOV &nbsp; &nbsp;B,#10<BR>&nbsp; &nbsp; &nbsp; DIV 
                  &nbsp; &nbsp;AB<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;60H,A<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;61H,B<BR><BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;A,R3<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;B,#10<BR>&nbsp; &nbsp; &nbsp; DIV &nbsp; 
                  &nbsp;AB<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;62H,A<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;63H,B<BR><BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;40H,#04H<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;R5,#0FEH<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;R0,#60H<BR>LLP: &nbsp;MOV &nbsp; &nbsp;A,@R0<BR>&nbsp; 
                  &nbsp; &nbsp; MOV &nbsp; &nbsp;DPTR,#TABLE<BR>&nbsp; &nbsp; 
                  &nbsp; MOVC &nbsp; A,@A+DPTR<BR>&nbsp; &nbsp; &nbsp; MOV 
                  &nbsp; &nbsp;P0,A<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;A,R5<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;P2,A<BR>&nbsp; &nbsp; &nbsp; RL &nbsp; &nbsp; 
                  A<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; &nbsp;R5,A<BR>&nbsp; 
                  &nbsp; &nbsp; INC &nbsp; &nbsp;R0<BR>&nbsp; &nbsp; &nbsp; 
                  LCALL &nbsp;DELAY1<BR>&nbsp; &nbsp; &nbsp; DJNZ &nbsp; 
                  40H,LLP<BR>&nbsp; &nbsp; &nbsp; RET<BR><BR>DELAY1: &nbsp; 
                  &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
                  &nbsp;&nbsp; ;延时子程序<BR>&nbsp; &nbsp; &nbsp; MOV &nbsp; 
                  &nbsp;R4,#1<BR>DL2: &nbsp;MOV &nbsp; &nbsp;R7,#1<BR>&nbsp; 
                  &nbsp; &nbsp; DJNZ &nbsp; R7,$<BR>&nbsp; &nbsp; &nbsp; DJNZ 
                  &nbsp; R4,DL2<BR>&nbsp; &nbsp; &nbsp; RET<BR><BR>TABLE:DB 
                  &nbsp; &nbsp; 3FH,06H,5BH,4FH,66H<BR>&nbsp; &nbsp; &nbsp; DB 
                  &nbsp; &nbsp; 6DH,7DH,07H,7FH,6FH<BR><BR>&nbsp; &nbsp; &nbsp; 
                  END<BR>;请大家多指教!<BR></SPAN></TD></TR></TBODY></TABLE></SPAN></TD></TR>
        <TR>
          <TD width=8><IMG height=2 src="jtd.files/blank.gif" width=8></TD>
          <TD vAlign=bottom><BR>
            <TABLE style="TABLE-LAYOUT: fixed; WORD-BREAK: break-all" 
            cellSpacing=0 cellPadding=0 width=332 border=0>
              <TBODY>
              <TR>
                <TD><IMG height=17 src="jtd.files/signature.gif" width=500 
                  border=0><BR>收获和付出是成正比的!</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE class=TBone cellSpacing=1 cellPadding=5 width="100%" align=center 
bgColor=#cccccc border=0>
  <TBODY>
  <TR class=TBBG1 bgColor=#eeeeee>
    <TD vAlign=top align=middle width=150 height=20><IMG height=2 
      src="jtd.files/null.gif" width=150>
      <TABLE cellSpacing=0 cellPadding=0 width="90%" align=center>
        <TBODY>
        <TR>
          <TD>
            <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TBODY>
              <TR>
                <TD><A 
                  href="http://www.01mcu.net/bbs/User/LookUserInfo.asp?ID=1"><IMG 
                  height=32 src="jtd.files/sy.jpg" width=32 border=0></A></TD>
                <TD vAlign=top align=right><IMG height=21 alt=帅哥,离线 
                  src="jtd.files/OfMale.gif" width=23 
              align=absMiddle></TD></TR></TBODY></TABLE><IMG height=5 
            src="jtd.files/null.gif" width=2 border=0><BR><A 
            href="http://www.01mcu.net/bbs/User/LookUserInfo.asp?ID=1">Lsong</A>&nbsp;</TD></TR>
        <TR>
          <TD><IMG height=5 src="jtd.files/null.gif" width=2 border=0><BR><IMG 
            title=级别:大天使 height=11 src="jtd.files/level12.gif" width=110 
            align=absMiddle><BR><IMG height=5 src="jtd.files/null.gif" width=2 
            border=0><BR>职务:<FONT class=BlueFont 
            color=blue>区版主</FONT><BR>级别:大天使<BR>魅力:3<BR>积分:5326<BR>经验:198915<BR>文章:5591<BR>注册:03-05-22 
            19:15 <BR></TD></TR></TBODY></TABLE></TD>
    <TD vAlign=top height=20>
      <TABLE style="TABLE-LAYOUT: fixed; WORD-BREAK: break-all" height="100%" 
      width="100%">
        <TBODY>
        <TR>
          <TD width=2><IMG height=2 src="jtd.files/blank.gif" width=2></TD>
          <TD vAlign=top>
            <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center 
            border=0>
              <TBODY>
              <TR>
                <TD><IMG height=20 src="jtd.files/face0.gif" width=20 
                  align=absBottom>发表: 2006-06-20 10:15:15<IMG height=3 
                  src="jtd.files/null.gif" width=5 align=absMiddle><A 
                  href="http://www.01mcu.net/bbs/Announce/Announce2.asp?BoardID=7&amp;ID=27778&amp;submitflag=first&amp;repost=1"><IMG 
                  title=引用回复 height=16 src="jtd.files/re.gif" width=16 
                  align=absMiddle border=0></A><IMG height=3 
                  src="jtd.files/null.gif" width=5 align=absMiddle><A 
                  href="http://www.01mcu.net/" target=_blank><IMG title=此用户主页 
                  height=16 src="jtd.files/home.gif" width=16 align=absMiddle 
                  border=0></A><IMG height=3 src="jtd.files/null.gif" width=5 
                  align=absMiddle><A 
                  href="http://www.01mcu.net/bbs/User/SendMessage.asp?SdM_ToUser=Lsong"><IMG 
                  title=给Lsong发消息 height=16 src="jtd.files/message.gif" width=16 
                  align=absMiddle border=0></A></TD>
                <TD align=right><FONT 
              color=#888888>第<B>2</B>楼</FONT></TD></TR></TBODY></TABLE><BR><SPAN 
            style="LINE-HEIGHT: 15pt">
            <TABLE style="LINE-HEIGHT: 15pt" cellSpacing=0 cellPadding=0 
            width="100%" border=0>
              <TBODY>
              <TR>
                <TD><SPAN 
                  style="FONT-SIZE: 12px">好!<BR>能加上硬件描述就更好了,加上后就加精!</SPAN></TD></TR></TBODY></TABLE></SPAN></TD></TR>
        <TR>
          <TD width=8><IMG height=2 src="jtd.files/blank.gif" width=8></TD>
          <TD vAlign=bottom><BR>
            <TABLE style="TABLE-LAYOUT: fixed; WORD-BREAK: break-all" 
            cellSpacing=0 cellPadding=0 width=332 border=0>
              <TBODY>
              <TR>
                <TD><IMG height=17 src="jtd.files/signature.gif" width=500 
                  border=0><BR>&nbsp;&nbsp; <FONT 
                  color=#ff1493><B>供应单片机学习器材</B></FONT><BR><FONT 
                  color=#9400d3>*************************</FONT><BR>&nbsp; 
                  &nbsp; &nbsp; <A href="http://www.01mcu.net/" 
                  target=_blank>http://www.01mcu.net/</A><BR>&nbsp; &nbsp; 
                  &nbsp; <A 
              href="mailto:01mcu@126.com">01mcu@126.com</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE class=TBone cellSpacing=1 cellPadding=5 width="100%" align=center 
bgColor=#cccccc border=0>
  <TBODY>
  <TR class=TBBG9 bgColor=#f7f7f7>
    <TD vAlign=top align=middle width=150 height=20><IMG height=2 
      src="jtd.files/null.gif" width=150>
      <TABLE cellSpacing=0 cellPadding=0 width="90%" align=center>
        <TBODY>
        <TR>
          <TD>
            <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TBODY>
              <TR>
                <TD><A 
                  href="http://www.01mcu.net/bbs/User/LookUserInfo.asp?ID=9530"><IMG 
                  height=32 src="jtd.files/0013.gif" border=0 width32></A></TD>
                <TD vAlign=top align=right><IMG height=21 alt=帅哥,离线 
                  src="jtd.files/OfMale.gif" width=23 
              align=absMiddle></TD></TR></TBODY></TABLE><IMG height=5 
            src="jtd.files/null.gif" width=2 border=0><BR><A 
            href="http://www.01mcu.net/bbs/User/LookUserInfo.asp?ID=9530">aywangming</A>&nbsp; 
            <IMG height=15 alt=双子座 src="jtd.files/z3.gif" width=15 
            align=absMiddle> <IMG height=15 alt=寅虎 src="jtd.files/sx3s.gif" 
            width=15 align=absMiddle></TD></TR>
        <TR>
          <TD><IMG height=5 src="jtd.files/null.gif" width=2 border=0><BR><IMG 
            title=级别:论坛游民 height=11 src="jtd.files/level1.gif" width=110 
            align=absMiddle><BR><IMG height=5 src="jtd.files/null.gif" width=2 
            border=0><BR>级别:论坛游民<BR>积分:15<BR>经验:299<BR>文章:13<BR>注册:06-06-07 
            08:26 <BR></TD></TR></TBODY></TABLE></TD>
    <TD vAlign=top height=20>
      <TABLE style="TABLE-LAYOUT: fixed; WORD-BREAK: break-all" height="100%" 
      width="100%">
        <TBODY>
        <TR>
          <TD width=2><IMG height=2 src="jtd.files/blank.gif" width=2></TD>
          <TD vAlign=top>
            <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center 
            border=0>
              <TBODY>
              <TR>
                <TD><IMG height=20 src="jtd.files/face0.gif" width=20 
                  align=absBottom>发表: 2006-07-05 23:53:39<IMG height=3 
                  src="jtd.files/null.gif" width=5 align=absMiddle><A 
                  href="http://www.01mcu.net/bbs/Announce/Announce2.asp?BoardID=7&amp;ID=27904&amp;submitflag=first&amp;repost=1"><IMG 
                  title=引用回复 height=16 src="jtd.files/re.gif" width=16 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -