资源简介
线束检测仪。可检测48根线。有程序和Proteus 仿真。可运行。
(Harness detector. Line 48 can be detected. There are procedures and Proteus simulation. Can run.)
(Harness detector. Line 48 can be detected. There are procedures and Proteus simulation. Can run.)
代码片段和文件信息
#include
#include
#include
#define uchar unsigned char
#define uint unsigned int
uchar abcdefgh;
sbit P3_0=P3^0;
sbit P3_1=P3^1;
sbit P3_2=P3^2;
sbit P3_4=P3^4;
sbit SET=P3^3;
int outnextstop;
int n1n2n3n4n5n6n7n8n9n10n11n12n13n14n15n16n17n18n19n20n21n22n23n24n25n26n27n28n29n30;
int n31n32n33n34n35n36n37n38n39n40n41n42n43n44n45n46n47n48;
void service_int1() interrupt 2 using 2
{
while(SET==0)
{out=0;} //等待按键释放,如一直按下一直调用显示函数,防止显示中断
out=0;
// next=0;
}
/*void delay(uint xms) //ms级延时函数
{
uint ij;
for(i=0;i for(j=0;j<123;j++);
} */
void delay() //ms级延时函数i
{
uint ij;
for(i=0;i<5;i++)
for(j=0;j<123;j++);
}
void delay2() //ms级延时函数i
{
uint ij;
for(i=0;i<20;i++)
for(j=0;j<123;j++);
}
void delay3() //ms级延时函数i
{
uint ij;
for(i=0;i<20;i++)
for(j=0;j<123;j++);
}
void delay4() //ms级延时函数i
{
uint ij;
for(i=0;i<20;i++)
for(j=0;j<123;j++);
}
/*void Scan_Key(void) //键盘检测函数
{
if(SET==0)
{
while(SET==0)
{delay();out=0;} //等待按键释放,如一直按下一直调用显示函数,防止显示中断
out=0;
// next=0;
}
}*/
void led()
{
while(out==1)
{ //Scan_Key();
if(next==1&(a&0x01)==1) //1 0b00000001
{P2=0x60; // 0b01100000
delay2();}
if(next==1&(b&0x01)==1) //2
{P2=0x61; //0b01100001
delay2();}
if(next==1&(c&0x01)==1) //3
{P2=0x62; //0b01100010
delay2();}
if(next==1&(d&0x01)==1) //4
{P2=0x63; //0b01100011
delay2();}
if(next==1&(e&0x01)==1) //5
{P2=0x64; //0b01100100
delay2();}
if(next==1&(f&0x01)==1) //6
{P2=0x65; //0b01100101
delay2();}
if(next==1&(g&0x01)==1) //7
{P2=0x66; //0b01100110
delay2();}
if(next==1&(h&0x01)==1) //8
{P2=0x67; //0b01100111
delay2();}
if(next==1&(a&0x02)==2) //9
{P2=0x68; //0b01101000
delay2();}
if(next==1&(b&0x02)==2) //10
{P2=0x69; //0b01101001
delay2();}
if(next==1&(c&0x02)==2) //11
{P2=0x6a; //0b01101010
delay2();}
if(next==1&(d&0x02)==2) //12
{P2=0x6b; //0b01101011
delay2();}
if(next==1&(e&0x02)==2) //13
{P2=0x6c; //0b01101100
delay2();}
if(next==1&(f&0x02)==2) //14
{P2=0x6d; //0b01101101
delay2();}
if(next==1&(g&0x02)==2) //15
{P2=0x6e; //0b01101110
delay2();}
if(next==1&(h&0x02)==2) //16
{P2=0x6f; //0b01101111
delay2();}
if(next==1&(a&0x04)==4) // 17
{P2=0x50; //0b01010000
delay2();}
if(next==1&(b&0x04)==4) // 18
{P2=0x51; //0b01010001
delay2();}
if(next==1&(c&0x04)==4) // 19
{P2=0x52; //0b01010010
delay2();}
if(next==1&(d&0x04)==4) // 20
{P2=0x53; //0b01010011
delay2();}
if(next==1&(e&0x04)==4) // 21
{P2=0x54; //0b01010100
delay2();}
if(next==1&(f&0x04)==4) // 22
{P2=0x55; //0b01010101
delay2();}
if(next==1&(e&0x04)==4)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
I.A.... 6376 2005-03-22 15:22 xianshuceliang\66\STARTUP.A51
I.A.... 14053 2014-06-06 17:28 xianshuceliang\66\STARTUP.LST
I.A.... 755 2014-06-06 17:28 xianshuceliang\66\STARTUP.OBJ
I.A.... 26808 2014-07-21 19:10 xianshuceliang\66\yy
I.A.... 28219 2014-06-09 11:57 xianshuceliang\66\yy.c
I.A.... 56232 2014-07-21 19:10 xianshuceliang\66\yy.hex
I.A.... 46590 2014-07-21 19:10 xianshuceliang\66\yy.LST
I.A.... 45402 2014-07-21 19:10 xianshuceliang\66\yy.M51
I.A.... 51267 2014-07-21 19:10 xianshuceliang\66\yy.OBJ
I.A.... 1044 2014-07-21 19:11 xianshuceliang\66\yy.Opt
I.A.... 345 2014-07-21 19:11 xianshuceliang\66\yy.plg
I.A.... 1918 2014-07-21 19:11 xianshuceliang\66\yy.Uv2
I.A.... 1015 2014-06-09 11:57 xianshuceliang\66\yy_Opt.Bak
I.A.... 1685 2014-06-06 10:35 xianshuceliang\66\yy_Uv2.Bak
I.A.... 42709 2014-07-31 16:58 xianshuceliang\66.pdsprj
I.A.... 2199 2014-07-31 16:58 xianshuceliang\66.pdsprj.PC-201207061007.Administrator.workspace
I.A.... 742 2014-07-11 18:00 xianshuceliang\66.PWI
I.A.... 42705 2014-07-17 20:38 xianshuceliang\Backup Of 66.pdsbak
I..D... 0 2014-07-31 17:00 xianshuceliang\66
I..D... 0 2014-07-31 17:00 xianshuceliang
----------- --------- ---------- ----- ----
370064 20
- 上一篇:加快Windows XP操作系统开机速度
- 下一篇:opencv环境配置
评论
共有 条评论