|
- #include <REGX52.H>
- #include "usart.h"
- #include "LCD1602.h"
- #include "delay.h"
- extern unsigned char Usart_Cnt;
- extern unsigned char Usart_Receive[30];
- extern bit Usart_AT_flage;
- void main()
- {
- int i;
- InitUART();//初始化串口
- Send_Uart(0);
- init1602();
- while(1)
- {
- // if(Usart_AT_flage == 1)
- {
- /*
- 数据处理
- */
- write1602_com(0x80);
- for(i=0;i<4;i++)
- {
- write1602_dat('0'+ Usart_Receive[0]);
- }
- // write1602_com(0x80 + 0x40);
- // for(i=0;i<12;i++)
- // {
- // write1602_dat('0' + Usart_Receive[i+13]);
- // }
-
- Usart_Cnt = 0;
- Usart_AT_flage = 0;
- }
- }
- }
复制代码
|
|