DMX512灯光调光控制程序.docVIP

  • 194
  • 0
  • 约4.16千字
  • 约 7页
  • 2019-04-05 发布于广东
  • 举报
编写周工,单片机开发,上位机开#include reg51 .h #define uchar unsigned char #defineDELAY_TIME60/*经实验,不要小于50!否则可能造成时序混乱*/ #define TRUE 1 //IIC返冋应答正确 #define FALSE 0 sbitT_D=P3八 1; //TXD sbit R_D=P3A2; //RXD sbit led_green=P2A0; //信号发送指示灯 sbit led_yellow=P2Al; //信号接收指示灯 sbit TorR = P3A7; //485 接收标志 sbit SDA=P0Al;/*假设由 P0.1 和 P0.2 控制*/ sbit SCL=P0A2; bit flag; //数据标志位 static uchar rdata[721; static uchar n=72; static uchar counter; static uchar totalnum; static uchar times;// static uchar rdata[721; static uchar n=72; static uchar counter; static uchar totalnum; static uchar times; //接收数据缓冲区 //接收汁数

文档评论(0)

1亿VIP精品文档

相关文档