Printing the Value of Variable Directly on LCD

Post your requests and ideas on the future development of mikroC PRO for PIC.
Post Reply
Author
Message
shreevs
Posts: 38
Joined: 16 Jun 2011 16:04

Printing the Value of Variable Directly on LCD

#1 Post by shreevs » 21 Sep 2011 08:41

Hello,
I am new to MIKROE's C. I learnt that while using a 16X2 LCD, if I wanted to print a value contained in a variable, I have to first break it up and make it a char value (0-255) and then convert the number to its ASCII value (+48). This has made the code real long and bit of cumbersome. I wish if it's possible to directly print the value contained in variable (irrespective of its size) instead of going through the above procedure. It will make things lot more easier for novice ppl like me.
Thanks in advance
Shree

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Printing the Value of Variable Directly on LCD

#2 Post by filip » 22 Sep 2011 08:57

Hi,

You can convert a variable to string, using some of Conversion library routines (like ByteToStr) and display this string to Lcd using Lcd_Out function.
Regards,
Filip.

Post Reply

Return to “mikroC PRO for PIC Wish List”