-
-
...d delay();
char getkey()
{
P1=0xfe;P3_6=P3_7=1;P3_3=1;
if(!P1_4)return 1; //ON
if(!P1_5)return 2; //7
if(!P1_6)return 3; //8
if(!P1_7)return 4; //9
if(!P3_6)return 5; //X
if(!...
-
-
...while(1)
{
b=0x80;
for(i=0;i<8;i++)
{
P2=b;
if((i%2)==0)c=dat[i/2]%10;else c=dat[i/2]/10;
P0=~num[c];
for(a=0;a<10;a++) ;
b>>=1;P0=0;
//if(i==7) for(a=0;a<10000;a++) ;
}
}
}
void CodingsWitchPolling1()//
{
 ...
-
-
可预设电压的数控电源#ifndef _PWLOCK_H // 防止PWLock.h被重复引用
#define _PWLOCK_H
#include <reg52.h>
#include <absacc.h>
#include <stdio.h>
#include <math.h>
#define uchar unsigned char
#define uint unsigned int
uchar px;
uint a;
uint b;
...
-
-
...istribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* ...
-
-
...包括:大厂面试真题+Java学习指南+工作总结。将介绍优化if-else代码的八种方案。### 优化方案一:提前return,去除不必要的else如果if-else代码块包含return语句,可以考虑通过提前return,把多余else干掉,使代码更加优雅。**优化前...
-
-
...imer2();
while(1){
/*防止sec、minute、hour超出合理范围*/
if(sec>=60||sec<0) sec=0;
if(minute>=60||minute<0) minute=0;
if(hour>=25||hour<0) hour=0;
/*UpdateTimeFlag标注位来刷新Buffer区*/
if(UpdateTimeFlag=1){
UpdateTimeFlag=0;
...
-
-
...nbsp;E=0;
}
void pianxuan(unsigned int i)
{
if(i==1)
CS1=0,CS2=1;
if(i==2)
CS1=1,CS2=0;
if(i==3)
CS1=0,CS2=0;
}
void shuju()
{
pianxuan(i);
writecommand(ye);
writecommand(lei);...
-
-
...document.getElementsByTagName && document.createElement);
2.
3. if (compatible)
4. document.write('<link rel="stylesheet" href="navstyles.css" />')
5.
6. function initNavigation() {
7. var lists = document.getElementsByTagName('ul');
8. for (var i=0;i<lists.length;i++) {...
-
-
...赋值50MS定时
TL0=(65536-50000)%256; //重装计数初值
if(yhsh==1)
{
TCNTY++;//用户定时计数
if(shw==1)
{
TR0=0;
TCNTY=0;
}
if(TCNTY==400)
{
TR0=0;//关闭T0定时器
&nbs...
-
-
...
P3_0=1;
P3_1=1;
P3_2=1;
P3_3=1;
_nop_();_nop_();
if(!P3_0)return '7';
if(!P3_1)return '8';
if(!P3_2)return '9';
if(!P3_3)return '/';
P1_4=1;
P1_5=0;
P1_6=1;
P1_7=1;
_nop_();_nop_();
if(!P3_0)return '4';
&nb...