发布时间:2015-05-25 18:46:00
#include<reg51.h>sbit k1=P3^4;sbit led=P1^0;void main(){ while(1) //通过大循环不断扫描按键状态 { if(k1==0) led=0; &nb.........【阅读全文】
发布时间:2015-05-23 14:27:17
1 电路图:2 源代码 (1)接收程序:#include <reg51.h>#include <string.h>sbit led=P1^0;#define uchar unsigned charsbit LCD_1602_RW=P2^1;sbit LCD_1602_RS=P2^0;sbit LCD_1602_EN=P2^5; /*****************************************************函数功能:延时1ms(3j+2.........【阅读全文】
发布时间:2015-05-19 21:50:20
1电路图:2 代码(1)include <reg51.h> unsigned char SEG_CC[10]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; unsigned char SEG_CA[10]={ 0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};void delay_ms (){unsigned char a ,b;for (b=102;b>0;b--);{for (a=3;a>0;a--);.........【阅读全文】
发布时间:2015-05-15 19:52:54
1 代码:#include <reg51.h> unsigned char SEG_CC[10]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};unsigned char SEG_CA[10]={ 0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};unsigned char SEG_123[8]={0x7f,0xbf,0xDF,0xEF,0xF7,0xFB,0xFD,0xFE}; sbit num=P2^0;sbit a=.........【阅读全文】
发布时间:2015-05-10 20:48:00
1.原理图2.源代码#include<reg51.h>sbit dx_zhi_red=P1^0;sbit dx_zhiman_yellow=P1^1;sbit dx_zhi_green=P1^2;sbit dx_zuo_red=P1^3;sbit dx_zuoman_yellow=P1^4;sbit dx_zuo_green=P1^5;sbit nb_zhi_red=P1^6;sbit nb_zhiman_yellow=P1^7;sbit nb_zhi_green=P2^0;sbit nb_zuo_red=P2^1;sbit nb_zuoman_yell.........【阅读全文】