+ Post New Thread
Results 1 to 3 of 3
  1. #1
    Full Member level 4
    Points: 2,601, Level: 11
    Achievements:
    7 years registered

    Join Date
    May 2010
    Location
    Bangalore
    Posts
    212
    Helped
    34 / 34
    Points
    2,601
    Level
    11

    LCD not working in Proteus 7

    this is my 2nd project to diaplay data in 2x16 character lcd. i have interface with 8051. it worked fine but with PIC 16f877a only LCD backlight is coming but data is not displayed. when i checked with development board for the same program it works fine but in Proteus i cant.
    Please help me

    Microcontroller -PIC16f877a
    LCD pins- 1-gnd,2-vcc,3-10k pot,4-RB0,5-GND,6-RB1, 11 to 14- RB2 to RB5

    4Mhz crystal with 22pf capacitors i have connected

    for 1st pin i have connected VDD with 10k series resistor
    below is my code which works fine with hardware

    Code C - [expand]
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    
    sbit LCD_RS at RB0_bit;
    sbit LCD_EN at RB1_bit;
    sbit LCD_D4 at RB2_bit;
    sbit LCD_D5 at RB3_bit;
    sbit LCD_D6 at RB4_bit;
    sbit LCD_D7 at RB5_bit;
     
    // Pin direction
    sbit LCD_RS_Direction at TRISB0_bit;
    sbit LCD_EN_Direction at TRISB1_bit;
    sbit LCD_D4_Direction at TRISB2_bit;
    sbit LCD_D5_Direction at TRISB3_bit;
    sbit LCD_D6_Direction at TRISB4_bit;
    sbit LCD_D7_Direction at TRISB5_bit;
     
    void main()
    {
         ADCON1=0x07;//disable ADC
         CMCON=0;//Disable comparators
         Lcd_Init();
         Lcd_Cmd(_LCD_CLEAR);             // CLEAR display
         Lcd_Cmd(_LCD_CURSOR_OFF);        // Cursor off
         Lcd_Out(1,1,"LCD Ready");
         delay_ms(100);
     
    }


    ---------- Post added at 08:06 ---------- Previous post was at 07:35 ----------

    LCd working fine now.I removed the oscillator circuit and rest circuit then i got the result

    But i am confused whether they are in built in Proteus or what?
    Last edited by alexan_e; 1st March 2012 at 09:27. Reason: added SYNTAX tags

    •   AltAdvertisement

        
       

  2. #2
    Full Member level 4
    Points: 2,601, Level: 11
    Achievements:
    7 years registered

    Join Date
    May 2010
    Location
    Bangalore
    Posts
    212
    Helped
    34 / 34
    Points
    2,601
    Level
    11

    Re: LCD not working in Proteus 7

    i connected the oscillator it is working fine but when i connect RC circuit to Reset pin the output is not displayed but when i don't connect anything to Reset pin it will work.......
    Can u explain why is it so



    •   AltAdvertisement

        
       

  3. #3
    Newbie level 2
    Points: 553, Level: 5

    Join Date
    Jan 2011
    Location
    srilanka
    Posts
    2
    Helped
    0 / 0
    Points
    553
    Level
    5

    Re: LCD not working in Proteus 7

    you don't need connect power/reset/osc pins in the protuse environment. please post your design.



--[[ ]]--