Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem in display the value of variable in LCD

Status
Not open for further replies.

abhishekdixit

Full Member level 2
Joined
Dec 30, 2011
Messages
124
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Location
India
Activity points
2,182
hello,
i am using 16X2 LCD with 8051 micro controller. in my c programing i declared a variable(say char a) in which the value 0xAE is stored manually(e.g. a=0xAE;) now when i want to show this value on LCD but when i send on LCD the variable name on lcd data (lcd_data(a);) then it send tha ascii value of variable a rather i want to display the value of variable a on LCD ehich 0xAE. now i am unable to understand what should i do?
Please hepl me!!

Thank you,

with regards,
Abhishek Dixit
 

maybe this source can help you,


Code Basic4GL - [expand]
1
2
3
4
5
6
7
8
9
void print_hex_to_lcd(char hex){
   unsigned char temp;
   temp=hex/16;
   if(temp>9)lcd_putc(temp+55);  //this procedure to print char to lcd
   else lcd_putc(temp+48);
   temp=hex%16;
   if(temp>9)lcd_putc(temp+55);
   else lcd_putc(temp+48);
}



I assume you have "lcd_putc" procedure,

Thanks
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top