1332【毕设课设】基于单片机的多机通信控制系统设计

【资源下载】下载地址如下:
https://docs.qq.com/doc/DTlRSd01BZXNpRUxl

1332【毕设课设】基于单片机的多机通信控制系统设计

 

# include <STC12C5A60S2.h>
# define uchar unsigned char 
# define vtime	10000   //定时3ms,一帧8*3=24ms,频率=40Hz
# define sub1	0x11   
# define sub2	0x12  
sbit LED11=P1^0;
sbit LED12=P1^1;
sbit LED21=P1^2;
sbit LED22=P1^3;
uchar	over_t=0;
uchar	addr=sub1,sum=0,count1,count2;
//uchar i,j,temp,m=0x01;

uchar	tn=0;  //发送循环变量
uchar	txdv[3];
void main( )
{
/*	//m1:m0  00=标准;   01=推挽;   10=输入;   11=开漏输出
	P2M1 = 0X00;
	P2M0 = 0Xff;
	P1M1 = 0X00;
	P1M0 = 0Xff; //设定P2,P1推挽输出
	P3M1 = 0X0d;
	P3M0 = 0X02;
*/	//
	SCON = 0xd0;
 	PCON = 0X80;
 	TH1 = 0XFd;
 	TL1 = 0XFd;

1332【毕设课设】基于单片机的多机通信控制系统设计

 

 

  

 

上一篇:P1553 数字反转(升级版)


下一篇:1332.remove-palindromic-subsequences