基于单片机双机通信原理图设计

1497下载地址 https://docs.qq.com/doc/DWEpnR2pOWU91b3p4?pub=1&dver=2.1.0

 

 

 

#include<reg51.h> 					 //调用51库

#define uchar unsigned char 

#define uint unsigned int 

sbit k1=P3^4; 					//接收

sbit k2=P3^5; 				   //流水灯
						
sbit k3=P3^6; 				  	  	 //摇摆灯

sbit k4=P3^7;        //关闭数据

sbit dula=P2^6;       //段选 

sbit wela=P2^7;      //位选 

sbit beep=P2^3;    //蜂鸣器 

uchar wendu,temp; 						 //温度 和 暂存数据

unsigned char code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d, 

 0x07,0x7f,0x6f};      //不带小数点显示0到9 

unsigned char code table1[]={0xbf,0x86,0xdb,0xcf,0xe6,0xed,0xfd, 

 0x87,0xff,0xef};                                      // 带小数点显示0到9 

 /****************************** 

 

 

  

 

posted @ 2021-03-15 18:33  roadroad  阅读(423)  评论(0编辑  收藏  举报
电设屋
上千套电子毕设课设方案