We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
currently, i am able to get 8bit data from ADC to the micro-p using D0-D7. i want to convert the 8bit data to temperature reading on the LCD. since 8bit data there are total 256 combination and each step would be: x = 100/256; //to get the each step temperature. in this case is 0.39 dC y = inputval*x; // i get the inputval from D0-D7 and mult by x to give me the exact temperature val in y. but how can i covert it into asiic? when i programme my LCD put char as: lcdClrScr(); lcdPutStr("N:Jepthah"); //the enclosed will be displayed on the screen therefore it would be ricdulas to dump the y lie this: lcdClrScr(); lcdPutStr("Y"); because it can display the 'y' char rather than the temperature value. I need help, thanks!
"do it need to include in files like #include <stdio.52h>" Read the Manual! The description of each library file tells you what headers it needs!
as stefan has mentioned sprinf(}; do i simply just put sprintf("Tempreture = %f\n", y); //???
You need to look sprintf() up in the C51 manual. There you will find a description of the parameters and output. Stefan
Note that the Keil Manuals assune that you are already a competent 'C' programmer - they do not even attempt to teach you 'C' programming. From your questions, it looks like what you really need is a good beginners 'C' textbook. Better still, a C programming course.