I need change my program, how do I use some function change a char to ASCII? my mobile receive data from 8051, always show '0', it's not true.
char to ASCII code.
void Data_TX(unsigned char Y)
{
unsigned char Buff_Y[3];
Buff_Y[2] = (Y / 100) + 0x30;
Buff_Y[1] = (Y / 10) % 10+0x30;
Buff_Y[0] = (Y % 10) + 0x30;
SBUF = *Buff_Y;
while (TI == 0);
TI = 0;
}
this's my circuit original code, LCD interfacing with 8051.
bit Sensor_read(unsigned char read[5]);
use my function.
Data_TX(read[2]); //read data.
Data_TX((int)read[2]); //read data, this program can't to run.