Microcontroller › 8051 › 8052-Basic programing question › re: display 3 digits on lcd
i don’t know “Basic” but i did that part in c. here i am writin logic it might help you. this logic use to print any no just depends on type of varialbe “value“(size of variable)
1) take array uchar display[x];
2) let the digit/number to be display on lcd is in varialbe value
3)i=0;
while(value<10)
{
display= value%10;
value = value/10;
i++;
}
display =value;
for(;i>=0;i–)
{
LCD_write(diaplay+48);
}
………………………………………………………………………………..
for more details reffer to the links:
http://www.engineersgarage.com/microcontroller/8051projects/Celsius-scale-thermometer-AT89C51
http://www.engineersgarage.com/microcontroller/8051projects/digital-clock-rtc-12c887-AT89C51
http://www.engineersgarage.com/microcontroller/8051projects/LCD-based-digital-clock-AT89C51