Home Forums MikroC Pro for PIC Project Discussions LCD does not boost A_E Ports

Tagged: ,

This topic contains 4 replies, has 2 voices, and was last updated by  Bitahwa Bindu 1 month, 3 weeks ago.

  • Author
    Posts
  • #2651

    taylor
    Participant

    Program code. The LCD does not start with the LCD_int () function, nor with the entire program displayed, but if you use, for example, the PORTb, the program works normally and the LCD shows the texts. My development board has 10K RA4 pull-up resistor

    sbit LCD_RS at RA1_bit;
    sbit LCD_EN at RA2_bit;
    sbit LCD_D4 at RA3_bit;
    sbit LCD_D5 at RA4_bit;
    sbit LCD_D6 at RA5_bit;
    sbit LCD_D7 at RE0_bit;
    // Pin direction
    sbit LCD_RS_Direction at TRISA1_bit;
    sbit LCD_EN_Direction at TRISA2_bit;
    sbit LCD_D4_Direction at TRISA3_bit;
    sbit LCD_D5_Direction at TRISA4_bit;
    sbit LCD_D6_Direction at TRISA5_bit;
    sbit LCD_D7_Direction at TRISE0_bit;

     

    void main()
    {

    Lcd_Init ();
    Lcd_Chr_CP (‘I’);
    Lcd_Chr_CP (‘ ‘);
    Lcd_Chr_CP (‘H’);
    Lcd_Chr_CP (‘E’);
    Lcd_Chr_CP (‘R’);
    Lcd_Chr_CP (‘E’);
    Lcd_Out_CP (“TODAY”);
    Lcd_Out (2,1, “YOU CAN FRIEND”);
    delay_ms (300);
    Lcd_Cmd (_LCD_CLEAR);
    Lcd_Cmd (_LCD_CURSOR_OFF);
    delay_ms (300);
    Lcd_Cmd (_LCD_BLINK_CURSOR_ON);
    Lcd_Out_CP (“TAYLOR”);
    delay_ms(200);
    Lcd_Cmd (_LCD_CLEAR);

    }

     

    Attachments:
    You must be logged in to view attached files.
  • #2655

    Bitahwa Bindu
    Keymaster

    Don’t split the data pins of the LCD, for data use the same PORT. Split the RS or E pin

  • #2656

    Bitahwa Bindu
    Keymaster

    That’s why we asked you to upload your mikroC project together with your proteus project. You only uploaded Proteus project. Here In the Forum you are writing:

    Sbit LCD_RS at RA1_bit;

    Sbit LCD_E at RA2_bit;

    Sbit LCD_D4 at RE0_bit;

    But now you wrote on YouTube:

    EN is connected to RE0.

    Which one is correct? Don’t split the data pins D4 to D7 must be on same port.

  • #2657

    taylor
    Participant

    The first time I just tested with other pins but did not initialize the LCD. Correct remains the one in the attached Mikroc and Proteus file. Thanks Friend!

    Attachments:
    You must be logged in to view attached files.
    • #2661

      Bitahwa Bindu
      Keymaster

      We have tried many combinations worked except that combination on PORTA. We have no idea what could be the problem. Please raise the issue on mikroe: Forum

You must be logged in to reply to this topic.