温湿度传感器 sht11 仿真程序 sbit out =P3^0; //加热口 //sbit input =P1^1;//检测口 //sbit speek =P2^0;//报警 sbit clo =P3^7;//时钟 sbit ST =P3^5;//开始 sbit EOC =P3^6;//成功信号 sbit gwei =P3^4;//个位 sbit swei =P3^3;//十位 sbit bwei =P3^2;//百位 sbit qwei =P3^1;//千位 sbit speak =P0^0;//报警音 sbit bjled =P0^1;//报警灯 sbit zcled =P0^2;//正常LED int count; uchar xianzhi;//取转换结果 uchar seth;//高时间 uchar setl;//低时间 uchar seth_mi;//高时间 uchar setl_mi;//低时间 bit hlbz;//高低标志 bit clbz; bit spbz; ///定时中断程序/// void t0 (void) interrupt 1 using 0 { TH0=(65536-200)/256;//5ms*200=1000ms=1s TL0=(65536-200)%256; clo=!clo;//产生时钟 if(count>5000) { if(hlbz) { if(seth_mi==0){seth_mi=seth;hlbz=0;out=0;} else seth_mi--; } if(!hlbz) { if(setl_mi==0){setl_mi=setl;hlbz=1;out=1;} else setl_mi--; } count=0; } else count++; } ///////////// ///////延时/////// delay(int i) { while(--i); } ///////显示处理/////// xianshi() { int abcd=0; int i; for (i=0;i<5;i++) { abcd=xianzhi; gwei=1; swei=1; bwei=1; qwei=1; P1=dispcode[abcd/1000]; qwei=0; delay(70); qwei=1; abcd=abcd%1000; P1=dispcode[abcd/100]; bwei=0; delay(70); bwei=1; abcd=abcd%100; P1=dispcode[abcd/10]; swei=0; delay(70); swei=1; abcd=abcd%10; P1=dispcode[abcd]; gwei=0; delay(70); gwei=1; } } doing() { if(xianzhi>100) {bjled=0;speak=1;zcled=1;} else {bjled=1;speak=0;zcled=0;} } void main(void) { seth=60;//h60秒 setl=90;//l90秒 seth_mi=60;//h60秒 setl_mi=90;//l90秒 TMOD=0X01;//定时0 16位工作模式 TH0=(65536-200)/256; TL0=(65536-200)%256; TR0=1; //开始计时 ET0=1; //开定时0中断 EA=1; //开全中断 while(1) { ST=0; _nop_(); ST=1; _nop_(); ST=0; // EOC=0; xianshi(); while(!EOC) { xianshi(); } xianzhi=P2; xianshi(); doing(); } }
上传时间: 2013-10-16
上传用户:黄蛋的蛋黄
A CCITT-16 CRC calculator. The source contains both the calculated (smaller but slower) version, and the table driven (faster but larger) version.
标签: calculator calculated contains smaller
上传时间: 2015-01-13
上传用户:s363994250
8051上的CRC8校验 A CCITT-8 CRC calculator. The source contains both the calculated (smaller but slower) version, and the table driven (faster but larger) version.
标签: calculator calculated contains smaller
上传时间: 2013-12-13
上传用户:CSUSheep
这是PC机间相互通信的例子,程序“require”为用查询方式实现,程序“interrupt”为用中断方式实现
上传时间: 2013-12-19
上传用户:Pzj
汇编作业:sound,hentobia,interrupt, countnumber,count_numberandtel
上传时间: 2013-11-25
上传用户:1101055045
这是PC机间相互通信的例子,程序“require”为用查询方式实现,程序“interrupt”为 用中断方式实现
上传时间: 2015-03-28
上传用户:yyq123456789
REMOVE removes a TSR. It takes two command line arguments. The first is the name of TSR to be removed (or an * to remove the last one), and the second is a file name which MUST contain the interrupt vectors to be loaded when the TSR is removed.
标签: TSR arguments removes command
上传时间: 2013-12-09
上传用户:wys0120
8259A中断控制器实验 253A的计数器0为工作方式0,装入时间常数FFFFH,结束中断时显示信息:8253A INTERRUPT EXPERIMENT!
上传时间: 2015-04-15
上传用户:fhzm5658
The following Philips LPC2k CAN examples in this directory were provided by ESAcademy. LPC2_CANAll_V110: Receives all CAN messages in a receive queue. LPC2_CANFull_V110: Uses Full-CAN-like reception filtering. LPC2_CANBlinky_V130: Minimal example of MicroCANopen, uses Full-CAN-like reception filtering and implements both Rx and Tx Interrupt Service Routines.
标签: ESAcademy following directory examples
上传时间: 2015-04-25
上传用户:hasan2015
The following Philips LPC2k CAN examples in this directory were provided by ESAcademy. LPC2_CANAll_V110: Receives all CAN messages in a receive queue. LPC2_CANFull_V110: Uses Full-CAN-like reception filtering. LPC2_CANBlinky_V130: Minimal example of MicroCANopen, uses Full-CAN-like reception filtering and implements both Rx and Tx Interrupt Service Routines.
标签: ESAcademy following directory examples
上传时间: 2013-12-13
上传用户:牛津鞋