【LoRa模块免费送】评测1 读E32-TTL-100配置
【LoRa模块免费送】评测1 读E32-TTL-100配置LoRa通讯牵涉到发送和接收模块工作参数的正确配对,任何一方出现问题,都无法顺利进行通讯。所以评测一开始就应该先读取模块工作参数,然后针对配对模块对进行工作参数配置。
本次评测,先使用一片带液晶显示屏的STM32F769I-Discovery板来控制LoRa模块,在板上的液晶屏幕可以方便显示模块的工作参数。这块E32-TTL-100模块控制方式采用UART串口通讯模式进行。将其连接到STM32F769I-Discovery的Arduino接口的CN13上的USART6_TX、USART6_RX上。模块的M0、M1连接到PF6、PJ1上。Get_SX1276()函数读取E32-TTL-100模块出厂设置,几个重要的参数在液晶屏幕显示。你可以修改TFT显示代码以适应你的开发板的液晶屏。
STM32F769I-Discovery显示了重要的工作参数
E32-TTL-100通讯参数一览表
USART6的配置代码就不再贴上了。
void Get_SX1276(void)
{uint16_t temp;
Tx_buffer=Tx_buffer=Tx_buffer=0xc1;
USART6->ICR = UART_CLEAR_IDLEF;
M0_H;
M1_H;
HAL_Delay(150);
RxCount=0;
HAL_UART_Transmit(&UartHandle, (uint8_t *) Tx_buffer, 0X03,5000);
while(Rx_Ok==0x00);
Rx_Ok=0x00;
temp=(Rx_buffer+410);
To_Dispbuff(temp,3);
BSP_LCD_DisplayStringAtLine(6, (uint8_t *)" Frequ(MHZ):");
BSP_LCD_DisplayStringAt(75, 175,Dispbuff,LEFT_MODE);
temp=(uint8_t)((Rx_buffer>>3)&0x07);
BSP_LCD_DisplayStringAtLine(9, (uint8_t *)" Baud rate(bps):");
switch (temp)
{
case 0:
BSP_LCD_DisplayStringAtLine(10,(uint8_t *) " 1200");
break;
case 1:
BSP_LCD_DisplayStringAtLine(10,(uint8_t *) " 2400");
break;
case 2:
BSP_LCD_DisplayStringAtLine(10,(uint8_t *) " 4800");
break;
case 3:
BSP_LCD_DisplayStringAtLine(10,(uint8_t *) " 9600");
break;
case 4:
BSP_LCD_DisplayStringAtLine(10,(uint8_t *) " 19200");
break;
case 5:
BSP_LCD_DisplayStringAtLine(10,(uint8_t *) " 38400");
break;
case 6:
BSP_LCD_DisplayStringAtLine(10,(uint8_t *) " 57600");
break;
case 7:
BSP_LCD_DisplayStringAtLine(10,(uint8_t *) " 115200");
break;
default:break;
}
temp=(uint8_t)(Rx_buffer&0x07);
BSP_LCD_DisplayStringAtLine(12, (uint8_t *)" Radio rate(bps):");
switch (temp)
{
case 0:
BSP_LCD_DisplayStringAtLine(13,(uint8_t *) " 0.3K");
break;
case 1:
BSP_LCD_DisplayStringAtLine(13,(uint8_t *) " 1.2K");
break;
case 2:
BSP_LCD_DisplayStringAtLine(13,(uint8_t *) " 2.4K");
break;
case 3:
BSP_LCD_DisplayStringAtLine(13,(uint8_t *) " 4.8K");
break;
case 4:
BSP_LCD_DisplayStringAtLine(13,(uint8_t *) " 9.6K");
break;
case 5:
BSP_LCD_DisplayStringAtLine(13,(uint8_t *) " 19.2K");
break;
case 6:
BSP_LCD_DisplayStringAtLine(13,(uint8_t *) " 19.2K");
break;
case 7:
BSP_LCD_DisplayStringAtLine(13,(uint8_t *) " 19.2K");
break;
default:break;
}
BSP_LCD_DisplayStringAtLine(15, (uint8_t *)" Address:");
temp=(Rx_buffer<<8|Rx_buffer);
To_Dispbuff(temp,5);
BSP_LCD_DisplayStringAt(75, 390,Dispbuff,LEFT_MODE);
}
补充内容 (2018-4-5 20:55):
劳驾破总破解一下,我这个编辑权限怎么没有了,帖子无法修改。 帖子末尾变成酱紫了。:L
是不是在这个板块里发帖会出现这个问题?
多谢分享。。。赞 Paderboy 发表于 2018-4-5 22:59
多谢分享。。。赞
谢谢支持 谢谢分享 斜阳__ 发表于 2018-4-7 16:31
谢谢分享
:):):):) 围观就是力量,我来了 {:3_41:}围观一下
mark……
页:
[1]