How to print variable value on an lcd?

Status
Not open for further replies.

ajumt

Newbie level 1
Joined
Mar 17, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
kerala
Activity points
1,289
I am a beginner in mikroc. I was just checking to read a key from 4x2 keypad and print it on lcd.
but how could i print the variable value.


char key;
LCD_out(2,1,key);
 

You need to convert the value to text and then use LCD_Out or you can convert it to characters and send them using LCD_Chr
 

see its really simple , convert the keys hex value into an ascii using a look up table and then output it on port on which you have connected datalines of LCD and do the DATA WRITE SUBROUTINE ... thats it .... if u need further help do let me know
 

unsigned char temp;

temp = IntToStr(key);

LCD_Out(2,1,temp);
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…