A:我将lcd显示程序和串口程序这样写,插上开发板发现lcd有显示,但是串口不发送数据, 我将lcd显示程序部分删除,串口就恢复了正常,不知道这两个程序哪出现了冲突,有大佬能讲解一下吗?
- void main()
- {
- unsigned char str[12];
-
- Delay(10000);
- InitLcd1602();
- UART_INIT();
- while(1)
- {
- //DHT11
- RH();
- //lcd显示
- str[0] = U8T_data_H/10 + '0';
- str[1] = U8T_data_H%10 + '0';
- Lcd1602Show(0,0,"WenDu:");
- Lcd1602Show(7,0,str);
- Lcd1602Show(10,0,"C");
- str[0] = U8RH_data_H/10 + '0';
- str[1] = U8RH_data_H%10 + '0';
- Lcd1602Show(0,1,"ShiDu:");
- Lcd1602Show(7,1,str);
- Lcd1602Show(10,1,"%");
-
- //串口显示程序
- PutString("TaskValueSet,2,1,");
- uart_send_byte(U8T_data_H/10 + '0');
- uart_send_byte(U8T_data_H%10 + '0');
- uart_send_byte('\n');
- Delay(30000);
- PutString("TaskValueSet,2,2,");
- uart_send_byte(U8RH_data_H/10 + '0');
- uart_send_byte(U8RH_data_H%10 + '0');
- uart_send_byte('\n');
- Delay(30000);
- }
- }
复制代码
|