摘要: #includesbit key_left=P1^0;sbit led4=P1^4;void main(void){ unsigned char KeyStep=0; unsigned short int KeyDelay=0; while(1) { switch(KeyStep) ... 阅读全文
posted @ 2015-03-22 22:37 zhaoyang16 阅读(179) 评论(0) 推荐(0) 编辑
摘要: #includesbit BUZZER=P3^4;void main(void){ unsigned long int dly=100000; BUZZER=1; while(dly--); BUZZER=0; while(1) { }} 阅读全文
posted @ 2015-03-22 22:36 zhaoyang16 阅读(173) 评论(0) 推荐(0) 编辑
摘要: #includesbit relay=P3^3;void delay(void){ unsigned int i,j; for(i=0;i<100;i++) { for(j=0;j<100;j++) { } }}void main(void)... 阅读全文
posted @ 2015-03-22 22:34 zhaoyang16 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1 #include2 void main(void)3 {4 P1=0xaa;5 while(1)6 {7 }8 } 阅读全文
posted @ 2015-03-22 22:32 zhaoyang16 阅读(449) 评论(0) 推荐(0) 编辑