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

📄 lcddram.lst

📁 最先进的信号机程序,经过很多重要场合测试通过
💻 LST
📖 第 1 页 / 共 3 页
字号:
 153   4                                      do{}while(busy==0);XBYTE[0XC411+i]=XBYTE[0x6cE2+i+j];
 154   4                                              }
 155   3                             do{}while(busy==0);XBYTE[0XC408]=0;
 156   3                             break;
 157   3                  case 0x8a:  ////////////////////////////////////////////
 158   3                             do{}while(busy==0);XBYTE[0XC410]=0XCa;            //当前控制信息
 159   3                             do{}while(busy==0);XBYTE[0XC411]=led82[0];        //当天日计划号
 160   3                             do{}while(busy==0);XBYTE[0XC412]=led82[1];        //当天时段号
 161   3                             do{}while(busy==0);XBYTE[0XC413]=led82[2];        //当前控制方案号
 162   3                             j=(led82[2]-1)*41;
 163   3                             j=0x5e85+j;
 164   3                             if(XBYTE[j]==0){
 165   4                                             do{}while(busy==0);XBYTE[0XC414]=0;    //非协调方案
 166   4                                             }else  {
 167   4                                                    do{}while(busy==0);XBYTE[0XC414]=1;  //协调方案
 168   4                                                    }
 169   3                             do{}while(busy==0);XBYTE[0XC408]=0;
 170   3                             break;
 171   3                  case 0x8b: //阶段放行的相位
 172   3      
 173   3                             if((step_counter+1)==step_num){
 174   4                                          led83[6]=1;
 175   4                                           utemp=0x5244+(led83[0]-1)*98;
 176   4                                                }else{
 177   4                                          led83[6]=led83[1]+1;
 178   4                                          utemp=0x5247+(led83[0]-1)*98+step_counter*3;
C51 COMPILER V6.02  LCDDRAM                                                                08/02/2006 14:44:14 PAGE 4   

 179   4                                                            }
 180   3                             led83[9]=XBYTE[utemp];
 181   3                             led83[10]=XBYTE[utemp+1];
 182   3                             do{}while(busy==0);XBYTE[0XC410]=0XCb;                //当前信号机状态
 183   3                             do{}while(busy==0);XBYTE[0XC411]=led83[0];            //当前控制方案附加信息 :当前
             -阶段表号
 184   3                             do{}while(busy==0);XBYTE[0XC412]=led83[1];            //当前阶段
 185   3                             do{}while(busy==0);XBYTE[0XC413]=0x00;
 186   3                             do{}while(busy==0);XBYTE[0XC414]=0x00;
 187   3                             do{}while(busy==0);XBYTE[0XC415]=led83[4];            //当前阶段放行的相位
 188   3                             do{}while(busy==0);XBYTE[0XC416]=led83[5];            //当前阶段放行的相位
 189   3                             do{}while(busy==0);XBYTE[0XC417]=led83[6];            //下一阶段
 190   3                             do{}while(busy==0);XBYTE[0XC418]=0x00;
 191   3                             do{}while(busy==0);XBYTE[0XC419]=0x00;
 192   3                             do{}while(busy==0);XBYTE[0XC41a]=led83[9];            //下一阶段放行的相位
 193   3                             do{}while(busy==0);XBYTE[0XC41b]=led83[10];
 194   3                             do{}while(busy==0);XBYTE[0XC41C]=led83[11];           //当前阶段的倒计时
 195   3                             do{}while(busy==0);XBYTE[0XC41D]=led83[12];           //运行故障信息
 196   3                             do{}while(busy==0);XBYTE[0XC41E]=led83[13];           /*驱而不亮的红灯组*/
 197   3                             do{}while(busy==0);XBYTE[0XC41F]=led83[14];           /*驱而不亮的红灯组*/
 198   3                             do{}while(busy==0);XBYTE[0XC420]=led83[15];           /*驱而不亮的黄灯组*/
 199   3                             do{}while(busy==0);XBYTE[0XC421]=led83[16];           /*驱而不亮的黄灯组*/
 200   3                             do{}while(busy==0);XBYTE[0XC422]=led83[17];           /*驱而不亮的绿灯组*/
 201   3                             do{}while(busy==0);XBYTE[0XC423]=led83[18];           /*驱而不亮的绿灯组*/
 202   3                             do{}while(busy==0);XBYTE[0XC424]=led83[19];           /*不驱而亮的红灯组*/
 203   3                             do{}while(busy==0);XBYTE[0XC425]=led83[20];           /*不驱而亮的红灯组*/
 204   3                             do{}while(busy==0);XBYTE[0XC426]=led83[21];           /*不驱而亮的黄灯组*/
 205   3                             do{}while(busy==0);XBYTE[0XC427]=led83[22];           /*不驱而亮的黄灯组*/
 206   3                             do{}while(busy==0);XBYTE[0XC428]=led83[23];           /*不驱而亮的绿灯组*/
 207   3                             do{}while(busy==0);XBYTE[0XC429]=led83[24];           /*不驱而亮的绿灯组*/
 208   3                             do{}while(busy==0);XBYTE[0XC42a]=led83[25];           /*检测器故障*/
 209   3                             do{}while(busy==0);XBYTE[0XC42b]=led83[26];           /*检测器故障*/
 210   3                             do{}while(busy==0);XBYTE[0XC42c]=led83[27];           /*检测器故障*/
 211   3                             do{}while(busy==0);XBYTE[0XC42d]=led83[28];           /*检测器故障*/
 212   3                             do{}while(busy==0);XBYTE[0XC408]=0;
 213   3                             break;
 214   3                  case 0x8c:
 215   3                             do{}while(busy==0);XBYTE[0XC410]=0XCC;     //查询统计周期
 216   3                             do{}while(busy==0);XBYTE[0XC408]=0;
 217   3                             break;
 218   3                  case 0x8d:
 219   3                             do{}while(busy==0);XBYTE[0XC410]=0XCd;     //应答统计数据
 220   3                             do{}while(busy==0);XBYTE[0XC408]=0;
 221   3                             break;
 222   3                  case 0x8e: do{}while(busy==0);XBYTE[0XC410]=0xde;    //遥控阶段对应表
 223   3                             do{}while(busy==0);XBYTE[0XC411]=XBYTE[0X6d28];
 224   3                             do{}while(busy==0);XBYTE[0XC412]=XBYTE[0X6d29];
 225   3      
 226   3                             do{}while(busy==0);XBYTE[0XC408]=0;
 227   3                             break;
 228   3                  case 0x8f: do{}while(busy==0);XBYTE[0XC410]=0xcf;    //遥控阶段对应表
 229   3                             do{}while(busy==0);XBYTE[0XC411]=XBYTE[0X6d20];
 230   3                             do{}while(busy==0);XBYTE[0XC412]=XBYTE[0X6d21];
 231   3                             do{}while(busy==0);XBYTE[0XC413]=XBYTE[0X6d22];
 232   3                             do{}while(busy==0);XBYTE[0XC414]=XBYTE[0X6d23];
 233   3                             do{}while(busy==0);XBYTE[0XC415]=XBYTE[0X6d24];
 234   3                             do{}while(busy==0);XBYTE[0XC416]=XBYTE[0X6d25];
 235   3                             do{}while(busy==0);XBYTE[0XC417]=XBYTE[0X6d26];
 236   3                             do{}while(busy==0);XBYTE[0XC418]=XBYTE[0X6d27];
 237   3                             do{}while(busy==0);XBYTE[0XC408]=0;
 238   3                             break;
 239   3                  default:break;
C51 COMPILER V6.02  LCDDRAM                                                                08/02/2006 14:44:14 PAGE 5   

 240   3                    }
 241   2          }
 242   1       //设置
 243   1      
 244   1       do{}while(busy==0);flag=XBYTE[0XC409];
 245   1       do{}while(busy==0);id=XBYTE[0XC40b];
 246   1       do{}while(busy==0);idcode=XBYTE[0XC40c];
 247   1       if(flag==1){
 248   2          switch(id){
 249   3                  case 0x90: //do{}while(busy==0);XBYTE[0XC410]=0XC0;
 250   3                             do{}while(busy==0);XBYTE[0X8002]=XBYTE[0XC410];
 251   3                             do{}while(busy==0);XBYTE[0X8003]=XBYTE[0XC411];
 252   3                             do{}while(busy==0);XBYTE[0X8004]=XBYTE[0XC412];
 253   3                             do{}while(busy==0);XBYTE[0X8005]=XBYTE[0XC413];
 254   3                             do{}while(busy==0);XBYTE[0X8006]=XBYTE[0XC414];
 255   3                             do{}while(busy==0);XBYTE[0X8007]=XBYTE[0XC415];
 256   3                             do{}while(busy==0);XBYTE[0X8008]=XBYTE[0XC416];
 257   3                             do{}while(busy==0);XBYTE[0XC409]=0;
 258   3                             break;
 259   3                  case 0x92:
 260   3                             do{}while(busy==0);XBYTE[0XC410]=0x20;                   //最大输出通道数
 261   3                             do{}while(busy==0);XBYTE[0XC411]=0X20;                   //支持阶段表数
 262   3                             do{}while(busy==0);XBYTE[0XC412]=0X20;                   //一个阶段表支持的最大阶段
             -数
 263   3                             do{}while(busy==0);XBYTE[0XC413]=0X20;                   //最大控制方案数
 264   3                             do{}while(busy==0);XBYTE[0XC414]=0X20;                   //最大日计划数
 265   3                             do{}while(busy==0);XBYTE[0XC415]=0X18;                   //一个日计划支持的最大时段
 266   3                             do{}while(busy==0);XBYTE[0X72E2]=XBYTE[0XC416];          //开机时间小时
 267   3                             do{}while(busy==0);XBYTE[0X72E3]=XBYTE[0XC417];          //开机时间分钟
 268   3                             do{}while(busy==0);XBYTE[0X72E4]=XBYTE[0XC418];          //关机时间小时
 269   3                             do{}while(busy==0);XBYTE[0X72E5]=XBYTE[0XC419];          //关机时间分钟
 270   3                             do{}while(busy==0);XBYTE[0X72E6]=XBYTE[0XC41a];          //关机后状态
 271   3                             do{}while(busy==0);XBYTE[0X8000]=XBYTE[0XC41b];
 272   3                             do{}while(busy==0);XBYTE[0X8001]=XBYTE[0XC41c];
 273   3      
 274   3                             do{}while(busy==0);XBYTE[0XC409]=0;
 275   3                             break;
 276   3                  case 0x93:       //设置系统时间
 277   3                             do{}while(busy==0);XBYTE[0XC009]=XBYTE[0XC420];  //year
 278   3                             do{}while(busy==0);XBYTE[0XC008]=XBYTE[0XC421];  //month
 279   3                             do{}while(busy==0);XBYTE[0XC007]=XBYTE[0XC422];  //date
 280   3                             do{}while(busy==0);XBYTE[0XC004]=XBYTE[0XC423];  //hour
 281   3                             do{}while(busy==0);XBYTE[0XC002]=XBYTE[0XC424];  //min
 282   3                             do{}while(busy==0);XBYTE[0XC000]=XBYTE[0XC425];  //sec
 283   3                             do{}while(busy==0);XBYTE[0XC006]=XBYTE[0XC426];  //day
 284   3      
 285   3                             do{}while(busy==0);XBYTE[0XC409]=0;
 286   3                             break;
 287   3                  case 0x94:if(idcode==0){    //设置相位信息
 288   4                             j=XBYTE[0XC40D];
 289   4                             j=(j-1)*18;
 290   4                             for(i=0;i<18;i++){
 291   5                                         do{}while(busy==0);XBYTE[0x5001+i+j]=XBYTE[0XC410+i];
 292   5                                                 }
 293   4                                           }else{
 294   4                                   j=XBYTE[0XC40D];
 295   4                                   j=(j-1)*18;
 296   4                                   if(XBYTE[0XC412]==3)XBYTE[0XC413]=4;  //相位属性
 297   4                                   for(i=0;i<18;i++){
 298   5                                                   //  tt=0x5122+i+j;
 299   5                                                   //  ttd=0XC410+i;
 300   5                                         do{}while(busy==0);XBYTE[0x5122+i+j]=XBYTE[0XC410+i];
C51 COMPILER V6.02  LCDDRAM                                                                08/02/2006 14:44:14 PAGE 6   

 301   5                                                      //
 302   5                                                      }
 303   4                                                 }
 304   3                             //
 305   3                             do{}while(busy==0);XBYTE[0XC409]=0;
 306   3                             //
 307   3      
 308   3                             if(idcode==0){
 309   4                                 cpu_fpga_set(0x94,0x5001,289);
 310   4                                         }else {

⌨️ 快捷键说明

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