1、SerialChart
预览
配置文件
[_setup_] port=COM5 baudrate=57600 width=1000 height=200 background_color = white grid_h_origin = 100 grid_h_step = 10 grid_h_color = gray grid_h_origin_color = black grid_v_origin = 10 grid_v_step = 10 grid_v_color = gray grid_v_origin_color = red [_default_] min=-1024 max=1024 [Field1] color=green [Field2] color=blue [Field3] color=red
串口发送实例
//x轴 USART_Tx(USART0,0x31); USART_Tx(USART0,0x31); USART_Tx(USART0,0x30); USART_Tx(USART0,0x2c); //y轴 USART_Tx(USART0,0x36); USART_Tx(USART0,0x30); USART_Tx(USART0,0x37); USART_Tx(USART0,0x2c); //z轴 USART_Tx(USART0,0x31); USART_Tx(USART0,0x30); USART_Tx(USART0,0x32); USART_Tx(USART0,0x30); USART_Tx(USART0,0x0d); USART_Tx(USART0,0x0a);
2、ComAssistant
预览
通信协议 0xfc data 0x00 0x05
eg:16bit数据分4次发送,高位在前
USART_Tx(USART0,0xfc); USART_Tx(USART0,ChartoAscii((unsigned char)(hand_sup_curr_data>>12)&0xf)); USART_Tx(USART0,ChartoAscii((unsigned char)(hand_sup_curr_data>>8)&0xf)); USART_Tx(USART0,ChartoAscii((unsigned char)(hand_sup_curr_data>>4)&0xf)); USART_Tx(USART0,ChartoAscii((unsigned char)(hand_sup_curr_data)&0xf)); USART_Tx(USART0,ChartoAscii(0x00)); USART_Tx(USART0,ChartoAscii(0x05));
时间: 2024-10-06 03:48:10