heyyy guyss,,,
i am using kiel4 c51 compiler and using 89c51 uC with ads1230 20 bit serial adc and an lcd.i want to show the data of adc as a float value on lcd.i am using sprintf function but it is not working.wenever i use it the program doesnt run, even on the compiler.i cant understand y it is happening.wen i delete only sprintf function, program runs..i am using usual routine of it as shown in the help menu.
void print_ADC() {
char buffer[20];
char timer3;
if(++timer3<50) {
timer3=0;
sprintf(buffer,"%f\n",adc_data);
LCD_command(0xc4);
LCD_sendstring(buffer);
}
will anyone help me asap.
I am using kiel4 c51 compiler eval or licence?
i am using sprintf function but it is not working elaborate "not working" can mean anything - any error messages?
i cant understand y does that mean you understand x?
Erik
i am using sprintf function but it is not working.
That's not a very helpful problem description.
By the way, what's with the timer3 variable? The code looks so wrong. There is no point in trying to figure anything out when the basics are wrong.
www.catb.org/.../smart-questions.html
www.danlhenry.com/.../keil_code.png
#define BEGIN { #define END }
#define END.
#define VAR int
#define EMPTY void
#define BECOMES =
#define CALL(fn,a) fn(a)
#define MAIN void main ( void )
#define FOREVER for ( ; ; )
MAIN BEGIN VAR Poo;
Poo BECOMES 7;
FOREVER BEGIN CALL(my_function,Poo) END END
END.
"my code is good"
that is good.
LOL !
Where did all the urgency go?
well, if my code is good is true, then there can be no urgency.
PS #define BEGIN { #define END } .....
I think he is trying to develop the 'D' language
www.d-programming-language.org/index.html
Note that "My code is good" is posted by "my code jamilla" who seems to have a bit of fun - and the code is good, except a bit unusual. But the really funny/sad thing is that a number of people who come from PASCAL thinks that it is actaually a good thing to create a lot of defined symbols to be able to pascalify C code - they are convinced that their code is much more readable.
"they are convinced that their code is much more readable."
which they are fully entitled to believe and isn't without merit.