文件名称:DMX512
介绍说明--下载内容均来自于网络,请自行研究使用
void DMX_SendPacket(void) //发送DMX512数据
{
//配置为普通IO
pDMX_buf = 0 发送起始码 00
GPIO_Tx_Config(0) //设置发送的引脚为普通IO
PA2 = 0 //输出低电平
delay_us(150) //延时150us
PA2 = 1 //输出高电平
delay_us(13) //延时13us
GPIO_Tx_Config(1) //设置发送的引脚为复用IO
//USART1->DR = 0x0100 | TXDData[0] //第0帧前导码-DMX512 receiving procedDMX512 receiving procedure ure DMX512 receDMX512 receiving procedure iving procedure DMX512 receiving procedure
{
//配置为普通IO
pDMX_buf = 0 发送起始码 00
GPIO_Tx_Config(0) //设置发送的引脚为普通IO
PA2 = 0 //输出低电平
delay_us(150) //延时150us
PA2 = 1 //输出高电平
delay_us(13) //延时13us
GPIO_Tx_Config(1) //设置发送的引脚为复用IO
//USART1->DR = 0x0100 | TXDData[0] //第0帧前导码-DMX512 receiving procedDMX512 receiving procedure ure DMX512 receDMX512 receiving procedure iving procedure DMX512 receiving procedure
(系统自动生成,下载前可以参看下载内容)
下载文件列表
DMX512.txt