#include "usart.h" void SendByte(u8 byte) { while(!TXIF) /* set when register is empty */ continue; TXREG = byte; } //把数据转换为文本格式 void SendText(unsigned int byte) { unsigned char k1,k2,k3,k4; k1 = byte/1000; k2 = byte%1000/100; k3 = byte%100/10; k4 = byte%10; SendByte(k1+0x30); SendByte(k2+0x30); SendByte(k3+0x30); SendByte(k4+0x30); SendByte(32); //space key 's ASCII } void SendString(u8 *s) { while(*s!='