+ Post New Thread
Results 1 to 8 of 8
  1. #1
    Newbie level 6
    Points: 119, Level: 1

    Join Date
    Jan 2013
    Posts
    14
    Helped
    0 / 0
    Points
    119
    Level
    1

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

    My program doesn't showing anything on the LCD just this row of flags even though the Proteus shows the required results ?



    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

    •   AltAdvertisment

        
       

  2. #2
    Newbie level 4
    Points: 1,239, Level: 7

    Join Date
    Jul 2012
    Posts
    7
    Helped
    0 / 0
    Points
    1,239
    Level
    7

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

    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?



  3. #3
    Newbie level 6
    Points: 119, Level: 1

    Join Date
    Jan 2013
    Posts
    14
    Helped
    0 / 0
    Points
    119
    Level
    1

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

    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 :((



    •   AltAdvertisment

        
       

  4. #4
    Advanced Member level 4
    Points: 7,319, Level: 20
    Achievements:
    Created Blog entry 7 years registered
    xpress_embedo's Avatar
    Join Date
    Jul 2011
    Location
    India
    Posts
    1,162
    Helped
    199 / 199
    Points
    7,319
    Level
    20
    Blog Entries
    4

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

    Quote Originally Posted by Shamooooot View Post
    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.



  5. #5
    Banned
    Points: 23,048, Level: 36

    Join Date
    Dec 2012
    Location
    Bangalore, India
    Posts
    4,294
    Helped
    830 / 830
    Points
    23,048
    Level
    36

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

    Show the hardware connection of LCD not the Proteus. Vee pin should be connected to +5V through a 10K pot.



    •   AltAdvertisment

        
       

  6. #6
    Advanced Member level 4
    Points: 7,319, Level: 20
    Achievements:
    Created Blog entry 7 years registered
    xpress_embedo's Avatar
    Join Date
    Jul 2011
    Location
    India
    Posts
    1,162
    Helped
    199 / 199
    Points
    7,319
    Level
    20
    Blog Entries
    4

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

    Click image for larger version. 

Name:	Lcd_Connection.PNG 
Views:	6 
Size:	10.8 KB 
ID:	88615

    Connect a Potentiometer and vary the voltage value on the Contrast pin, i think when voltage is between 0 to 1V you will be able to view the text messages on the LCD



  7. #7
    Newbie level 6
    Points: 119, Level: 1

    Join Date
    Jan 2013
    Posts
    14
    Helped
    0 / 0
    Points
    119
    Level
    1

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

    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.



  8. #8
    Advanced Member level 4
    Points: 7,319, Level: 20
    Achievements:
    Created Blog entry 7 years registered
    xpress_embedo's Avatar
    Join Date
    Jul 2011
    Location
    India
    Posts
    1,162
    Helped
    199 / 199
    Points
    7,319
    Level
    20
    Blog Entries
    4

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

    Quote Originally Posted by Shamooooot View Post
    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



--[[ ]]--