📄 lcddram.bak
字号:
do{}while(busy==0);XBYTE[0XC418]=0x00;
do{}while(busy==0);XBYTE[0XC419]=0x00;
do{}while(busy==0);XBYTE[0XC41a]=led83[9]; //下一阶段放行的相位
do{}while(busy==0);XBYTE[0XC41b]=led83[10];
do{}while(busy==0);XBYTE[0XC41C]=led83[11]; //当前阶段的倒计时
do{}while(busy==0);XBYTE[0XC41D]=led83[12]; //运行故障信息
do{}while(busy==0);XBYTE[0XC41E]=led83[13]; /*驱而不亮的红灯组*/
do{}while(busy==0);XBYTE[0XC41F]=led83[14]; /*驱而不亮的红灯组*/
do{}while(busy==0);XBYTE[0XC420]=led83[15]; /*驱而不亮的黄灯组*/
do{}while(busy==0);XBYTE[0XC421]=led83[16]; /*驱而不亮的黄灯组*/
do{}while(busy==0);XBYTE[0XC422]=led83[17]; /*驱而不亮的绿灯组*/
do{}while(busy==0);XBYTE[0XC423]=led83[18]; /*驱而不亮的绿灯组*/
do{}while(busy==0);XBYTE[0XC424]=led83[19]; /*不驱而亮的红灯组*/
do{}while(busy==0);XBYTE[0XC420]=led83[20]; /*不驱而亮的红灯组*/
do{}while(busy==0);XBYTE[0XC421]=led83[21]; /*不驱而亮的黄灯组*/
do{}while(busy==0);XBYTE[0XC422]=led83[22]; /*不驱而亮的黄灯组*/
do{}while(busy==0);XBYTE[0XC423]=led83[23]; /*不驱而亮的绿灯组*/
do{}while(busy==0);XBYTE[0XC424]=led83[24]; /*不驱而亮的绿灯组*/
do{}while(busy==0);XBYTE[0XC420]=led83[25]; /*检测器故障*/
do{}while(busy==0);XBYTE[0XC421]=led83[26]; /*检测器故障*/
do{}while(busy==0);XBYTE[0XC422]=led83[27]; /*检测器故障*/
do{}while(busy==0);XBYTE[0XC423]=led83[28]; /*检测器故障*/
do{}while(busy==0);XBYTE[0XC408]=0;
break;
case 0x8c:
do{}while(busy==0);XBYTE[0XC410]=0XCC; //查询统计周期
do{}while(busy==0);XBYTE[0XC408]=0;
break;
case 0x8d:
do{}while(busy==0);XBYTE[0XC410]=0XCd; //应答统计数据
do{}while(busy==0);XBYTE[0XC408]=0;
break;
case 0x8e: do{}while(busy==0);XBYTE[0XC410]=0xde; //遥控阶段对应表
do{}while(busy==0);XBYTE[0XC411]=XBYTE[0X6d28];
do{}while(busy==0);XBYTE[0XC412]=XBYTE[0X6d29];
do{}while(busy==0);XBYTE[0XC408]=0;
break;
case 0x8f: do{}while(busy==0);XBYTE[0XC410]=0xcf; //遥控阶段对应表
do{}while(busy==0);XBYTE[0XC411]=XBYTE[0X6d20];
do{}while(busy==0);XBYTE[0XC412]=XBYTE[0X6d21];
do{}while(busy==0);XBYTE[0XC413]=XBYTE[0X6d22];
do{}while(busy==0);XBYTE[0XC414]=XBYTE[0X6d23];
do{}while(busy==0);XBYTE[0XC415]=XBYTE[0X6d24];
do{}while(busy==0);XBYTE[0XC416]=XBYTE[0X6d25];
do{}while(busy==0);XBYTE[0XC417]=XBYTE[0X6d26];
do{}while(busy==0);XBYTE[0XC418]=XBYTE[0X6d27];
do{}while(busy==0);XBYTE[0XC408]=0;
break;
default:break;
}
}
//设置
do{}while(busy==0);flag=XBYTE[0XC409];
do{}while(busy==0);id=XBYTE[0XC40b];
do{}while(busy==0);idcode=XBYTE[0XC40c];
if(flag==1){
switch(id){
case 0x92:
do{}while(busy==0);XBYTE[0XC410]=0x20; //最大输出通道数
do{}while(busy==0);XBYTE[0XC411]=0X20; //支持阶段表数
do{}while(busy==0);XBYTE[0XC412]=0X20; //一个阶段表支持的最大阶段数
do{}while(busy==0);XBYTE[0XC413]=0X20; //最大控制方案数
do{}while(busy==0);XBYTE[0XC414]=0X20; //最大日计划数
do{}while(busy==0);XBYTE[0XC415]=0X18; //一个日计划支持的最大时段
do{}while(busy==0);XBYTE[0X72E2]=XBYTE[0XC416]; //开机时间小时
do{}while(busy==0);XBYTE[0X72E3]=XBYTE[0XC417]; //开机时间分钟
do{}while(busy==0);XBYTE[0X72E4]=XBYTE[0XC418]; //关机时间小时
do{}while(busy==0);XBYTE[0X72E5]=XBYTE[0XC419]; //关机时间分钟
do{}while(busy==0);XBYTE[0X72E6]=XBYTE[0XC41a]; //关机后状态
do{}while(busy==0);XBYTE[0X8000]=XBYTE[0XC41b];
do{}while(busy==0);XBYTE[0X8001]=XBYTE[0XC41c];
do{}while(busy==0);XBYTE[0XC409]=0;
break;
case 0x93: //设置系统时间
do{}while(busy==0);XBYTE[0XC009]=XBYTE[0XC420]; //year
do{}while(busy==0);XBYTE[0XC008]=XBYTE[0XC421]; //month
do{}while(busy==0);XBYTE[0XC007]=XBYTE[0XC422]; //date
do{}while(busy==0);XBYTE[0XC004]=XBYTE[0XC423]; //hour
do{}while(busy==0);XBYTE[0XC002]=XBYTE[0XC424]; //min
do{}while(busy==0);XBYTE[0XC000]=XBYTE[0XC425]; //sec
do{}while(busy==0);XBYTE[0XC006]=XBYTE[0XC426]; //day
do{}while(busy==0);XBYTE[0XC409]=0;
break;
case 0x94:if(idcode==0){ //设置相位信息
j=XBYTE[0XC40D];
j=(j-1)*18;
for(i=0;i<18;i++){
do{}while(busy==0);XBYTE[0x5001+i+j]=XBYTE[0XC410+i];
}
}else{
j=XBYTE[0XC40D];
j=(j-1)*18;
for(i=0;i<18;i++){
do{}while(busy==0);XBYTE[0x5122+i+j]=XBYTE[0XC410+i];
//
}
}
//
do{}while(busy==0);XBYTE[0XC409]=0;
//
if(idcode==0){
cpu_fpga_set(0x94,0x5001,289);
}else {
cpu_fpga_set(0x94,0x5122,289);
}
break;
case 0x95:j=(idcode-1)*98; //设置阶段表
for(i=0;i<98;i++){
if(i==4){
do{}while(busy==0);XBYTE[0x5242+i+j]=XBYTE[0XC410+i]-1;
}else{
do{}while(busy==0);XBYTE[0x5242+i+j]=XBYTE[0XC410+i];
}
}
do{}while(busy==0);
XBYTE[0XC409]=0;
cpu_fpga_set(0x95,0x5242+j,98); //发送到fpga
break;
case 0x96:j=(idcode-1)*41; //设置控制方案
for(i=0;i<41;i++){
do{}while(busy==0);XBYTE[0x5e82+i+j]=XBYTE[0XC410+i];
}
do{}while(busy==0);XBYTE[0XC409]=0;
cpu_fpga_set(0x96,0x5e82+j,41); //发送到fpga
break;
// case 0x97:break;
case 0x98:j=(idcode-1)*74; //设置计划
for(i=0;i<74;i++){
do{}while(busy==0);XBYTE[0x63A2+i+j]=XBYTE[0XC410+i];
}
XBYTE[0XC409]=0;
cpu_fpga_set(0x98,0x63a2+j,74); //发送到fpga
break;
case 0x99: j=XBYTE[0XC40c];
j=(j-1)*6;
for(i=0;i<6;i++){ //设置日计划调度表
do{}while(busy==0);XBYTE[0x6cE2+i+j]=XBYTE[0XC410+i];
}
do{}while(busy==0);XBYTE[0XC409]=0;
cpu_fpga_set(0x99,0x6ce2,60); //发送到fpga
break;
// case 0x9a:break;
// case 0x9b:break;
// case 0x9c:break;
// case 0x9d:break;
case 0x9e://do{}while(busy==0);XBYTE[0XC410]=0xde; //遥控阶段对应表
do{}while(busy==0);XBYTE[0X6d28]=XBYTE[0XC410];
do{}while(busy==0);XBYTE[0X6d29]=XBYTE[0XC411];
do{}while(busy==0);XBYTE[0XC409]=0;
break;
case 0x9f://do{}while(busy==0);XBYTE[0XC410]=0xde; //遥控阶段对应表
do{}while(busy==0);XBYTE[0X6d20]=XBYTE[0XC410];
do{}while(busy==0);XBYTE[0X6d21]=XBYTE[0XC411];
do{}while(busy==0);XBYTE[0X6d22]=XBYTE[0XC412];
do{}while(busy==0);XBYTE[0X6d23]=XBYTE[0XC413];
do{}while(busy==0);XBYTE[0X6d24]=XBYTE[0XC414];
do{}while(busy==0);XBYTE[0X6d25]=XBYTE[0XC415];
do{}while(busy==0);XBYTE[0X6d26]=XBYTE[0XC416];
do{}while(busy==0);XBYTE[0X6d27]=XBYTE[0XC417];
do{}while(busy==0);XBYTE[0XC409]=0;
break;
default:break;
}
}
return 1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -