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.

Why my LCD showing this ? where did I go wrong ?

Status
Not open for further replies.

Shamooooot

Newbie level 6
Newbie level 6
Joined
Jan 1, 2013
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,420
My program doesn't showing anything on the LCD just this row of flags even though the Proteus shows the required results ?

3163801800_1364569563.jpg


This is the circuit :




and here is my code:

int i;
int n;
char txt[6];
unsigned short adc_val ;

sbit LCD_RS at Rc3_bit;
sbit LCD_EN at Rc5_bit;
sbit LCD_d0 at Rb0_bit;
sbit LCD_d1 at Rb1_bit;
sbit LCD_d2 at Rb2_bit;
sbit LCD_d3 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;

//Pin direction

sbit LCD_RS_Direction at TRISc3_bit;
sbit LCD_EN_Direction at TRISc5_bit;
sbit LCD_d0_Direction at TRISB0_bit;
sbit LCD_d1_Direction at TRISB1_bit;
sbit LCD_d2_Direction at TRISB2_bit;
sbit LCD_d3_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()
{
int R;
LCD_Init();
LCD_out(1,4,"What's");
delay_ms(1000);
LCD_out(1,3,"Up");
LCD_out(2,3,"Edaboard");
delay_ms(1000);
Lcd_Cmd(_LCD_CLEAR);
delay_ms(1000);
LCD_out(1,4,"Done By");
LCD_out(2,3,"Shamooooot");
delay_ms(1000);
Lcd_Cmd(_LCD_CLEAR);
LCD_out(1,4,"thank");
LCD_out(2,3,"you");
delay_ms(1000);
Lcd_Cmd(_LCD_CLEAR);
LCD_out(1,1,"for");
LCD_out(2,1,"helping");
delay_ms(1000);
Lcd_Cmd(_LCD_CLEAR);

adc_val = adc_read(2);

while (adc_val>115)
{
LCD_out(1,3,"WARNING!!!");
LCD_out(2,1,"help needed");
}
}

Thanks all
 

Do you have same result on Proteus?
Mostly these problems are related to LCD Lib which is used. Is it compatible with your LCD hardware?
Next point is your compiler and micro controller.Are they same for example both side(Compiler, hardware) must be ATMEGA8?
Next point is Clock frequency. Is it same at both side?
 

Dear ali-
No I don't have this result on Proteus, Proteus shows the exact results I want. but on the hardware this thing appearing on the LCD... and I am pretty sure I configured everything as it is in Proteus and I made sure everything is compatible :((
 

Dear ali-
No I don't have this result on Proteus, Proteus shows the exact results I want. but on the hardware this thing appearing on the LCD... and I am pretty sure I configured everything as it is in Proteus and I made sure everything is compatible :((

As per your Schematic Diagram, you had grounded the third pin i.e is contrast pin, which result in this.
 

Oh thank you very much guys you are a bless. I didn't thought that VEE matter. I though if I just grounded it, it will only effect the contrast of the LCD. I didn't thought it will do this. But I wonder why I am seeing these squares on the screen.
Please all note that this is not my real output I don't have back light at all just these squares.
 

Oh thank you very much guys you are a bless. I didn't thought that VEE matter. I though if I just grounded it, it will only effect the contrast of the LCD. I didn't thought it will do this. But I wonder why I am seeing these squares on the screen.
Please all note that this is not my real output I don't have back light at all just these squares.

You have grounded the Vee pins thats why it is darkest try to increase the voltage and you will see everything.

Compare it with the tv remote brightness button and contrast button, but happen when you increase one and decrease one
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top