/************************************************
功能:将整形转换为ascii码字符串
示例:dat = 12345 buffer[10]
转换后
buffer[0] = '1'
buffer[1] = '2'
...
buffer[4] = '5'
buffer[5] = '
'
**********************************************/
void DtoA(unsigned long dat, unsigned char* buffer)
{
unsigned long tmp = dat;
char length = 0;
while(tmp != 0)//求出数字的实际长度
{
tmp = tmp/10;
length++;
}
buffer[length] = '