Microcontroller › AVR › Temperature display on LCD › as you get digital value you
March 21, 2011 at 2:03 pm
#5780
Amit Joshi
Participant
as you get digital value you have to extract unit, decade and hundred position values. by dividing and taking remainder . for example
for(i=0;i<2;i++)
{
ar=value%10;
value=value/10;
}
for example if you get 123 you will found following values-
when i=0;
ar[0];
value=12;
when i=1
ar[1]=2
value=1
when i=2
ar[2]=1
value=0
add 0x30 in ar values and print it one by one.
hope this method will work