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.

wat help to display on Lcd using microc

Status
Not open for further replies.

nicko-391

Member level 2
Joined
Dec 8, 2010
Messages
42
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Sri Lanka
Activity points
1,542
how does value(integer) stored in variable directly display on LCD display? is there any command to do that?
 

Try reading through the board, there are lots of threads/replies on the subject of displaying contents on LCD, read the datasheet of LCD, normally its HD44780.
Keep the sample code and datasheet side by side and you will understand the command structure.
If you are using C for programming both Hitech and CCS have sample code in their directories.
 

Hi nicko-391,

LCD can only display it's character-code. It has been tabulated in LCD datasheet (eg for HD44780 check https://www.sparkfun.com/datasheets/LCD/HD44780.pdf)

There you may see "code" for each and every character. Always you have to use this code to command LCD to display relevant character.

So, your variable-value must be equal to this code to directly write it on LCD.

Otherwise;
If you generate some number in variables (say 10,12,13...) and stored in memory-registers, you can not directly put them on LCD to write (to display digits 10,12,13...). They have to be converted to LCD code. You have to program for this convention.

You may see ASCII-value is the LCD-code for English alphabet and digits in HD44780 datasheet.

You may read some LCD sample programs as abidr suggested.

Hope this helps you,
 
Last edited:

how does value(integer) stored in variable directly display on LCD display? is there any command to do that?
sbit LCD_RS at RB2_bit;
sbit LCD_EN at RB3_bit;
sbit LCD_D4 at RB4_bit;
sbit LCD_D5 at RB5_bit;
sbit LCD_D6 at RB6_bit;
sbit LCD_D7 at RB7_bit;

sbit LCD_RS_Direction at TRISB2_bit;
sbit LCD_EN_Direction at TRISB3_bit;
sbit LCD_D4_Direction at TRISB4_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D7_Direction at TRISB7_bit;

void main() {
unsigned int temp=123;
char c[8];
LCD_init();
Lcd_Cmd(_LCD_CLEAR);
Lcd_Cmd(_LCD_CURSOR_OFF);
IntToStr(temp,c); //Converts input(temp) integer number to a string
Lcd_Out(1,1,c);
}
 

Thank you dinesh,i choosed BASIC COMPILER to do this.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top