1 / 21
文档名称:

仓库门窗防盗系统.ppt

格式:ppt   大小:1,532KB   页数:21页
下载后只包含 1 个 PPT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

仓库门窗防盗系统.ppt

上传人:电离辐射 2022/8/8 文件大小:1.50 MB

下载得到文件列表

仓库门窗防盗系统.ppt

相关文档

文档介绍

文档介绍:仓库门窗防盗系统
Creative pure hand painted business presentations Creative pure hand painted business presentations
汇报人:视觉设计
路信号仿真组件。利用此软件完成了主系统板和扩展板PCB板的设计。
STC单片机ISP下载软件 通过Keil编译软件编译过得程序,会生成一个hex文件,通过这个软件能把这个hex文件通过串口下载到单片机进行调试。
五、算法流程图
六、核心编程
sbit rst=P2^0;
sbit sda=P2^1;
//sbit key=P2^0;
//sbit l1=P1^2;
//sbit l2 =P1^3;
//sbit fm=P1^7;
uchar flag1,flag2,flag3,flag4;
void delay_Voice(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}
void delayus_Voice(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=10;y>0;y--);
}
void Read_Voice(uchar add)
{
uchar i;
EA=0;
rst=0;
delay_Voice(1);
rst=1;
delay_Voice(17); /*复位延时 17MS*/
rst=1;
delay_Voice(6); /* delay_voice 6ms */
sda=0;
delay_Voice(5); /* delay_voice 5ms */
for(i=0;i<8;i++)
{sda=1;
if(add & 1)
{delayus_Voice(4); /* 400us */
sda=0;
delayus_Voice(2); /* 200us */
}
else {
delayus_Voice(2); /* 200us */
sda=0;
delayus_Voice(4); /* 400us */
}
add>>=1; }
sda=1;
EA=1;
}
/*void Read_Num1(uchar num)
{
Read_Voice(num);
}
void Read_Num2(uchar num)
{
if(!(num%10)){ //10的倍数
delay_Voice(600);//700);
Read_Voice(num/10);
delay_Voice(1000);
Read_Voice(10); //十
}
else{ //11-19
//if(num>=11 && num <=19){
// Read_Voice(10); //十
// delay_Voice(700);
// Read_Voice(num%10); //十
//}
//else { //21-29,31-39......91-99
delay_Voice(600);//700);
Read_Voice(num/10);
delay_Voice(750);//800);
Read_Voice(10); //十
delay_Voice(700);//700);
Read_Voice(num%10);
//}
}
}
void Read_Num3(uchar num)
{
Read_Voice(num/100);
delay_Voice(700);//1000);
Read_Voice(11); //百
num%=100;
if(num){ //如果不是整百则执行
if(num<=9){
delay_Voice(600);//700);
Read_