Hi all. i just want to know how can i convert variables to strings for eg-,
unsigned char b[2]; unsigned char a; void main() { a=20; a=b; print_lcd(b); }
i want to print the value to 'a' which is 20 to 16x2 lcd using keil. but the above program does not work for me... can anybody please give me an idea of how can i do it...
Here's some references to get you started:
blog.antronics.co.uk/.../
Gaurav, Before you write any program in any language, it is advisable to invest initial good time on learning that language basics, what functionalities it can support, available functions and so on. This will save much of your effort and time.
Regards, Girish
what is sprintf....???? how does it work... do i need to write any function for sprintf.
May be you need to learn how to read books, digest available technical documentation, and search the internet for resources you need.
Find a copy of the K&R C Language Manual, and READ it, otherwise you just come across as lazy and clueless.
A number of people all around the world have spent time writing documentation about sprintf() - what it is, what it does, how to use it. Even Keil have spent time with documentation about sprintf().
May I guess that you don't see an interest in looking at such documentation?
void main() { char buf[16]; int a = 20; sprintf(buf, "%d", a); print_lcd(buf); }
View all questions in Keil forum