Hi, I'm using an 89c51cc03 atmel microcontroller to receive strings from a GPS and sending latitude and longitude to a 2x16 LCD screen. I am stuck on converting a number in BCD to ASCII to send to the screen. Here is what I have:
My entire program is attached. Thanks for any help.
Trent
Code:
int ConvertToASCII(long BCD)
{int x,y,z;
x = BCD & 0x0F;
y = BCD & 0xF0;
y = y >> 4;
z = x + y;
z = z | 0x30;
return z;
}
My entire program is attached. Thanks for any help.
Trent