Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

Project Request

Return
Oluwaseyi Ilori
oluwaseyi

posted on 2016/05/27 06:58:55 PM CEST

Graphics & LCD

lcd

i am trying to interface an LCD with a PIC16f887 microcontroller but my lcd is on but not displaying anything. i have crosschecked all my connections several times the code is as shown below.

// LCD module connections
sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB3_bit;

sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;
// End LCD module connections

void main(){
ANSEL = 0; // Configure AN pins as digital I/O
ANSELH = 0;
Lcd_Init(); // Initialize LCD
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
Lcd_Out(1,1,"seyi");
}

USER Comments

Mohammed Mazed Hossain
loosha

posted on 2016/05/28 08:24:04 AM CEST

I check tour code.It is "OK" I just //ANSEL & ANSELH because i use PIC16F877A.
Pleas check the LCD contrast VR [ Which one connected to the pin 1 2 & 3]


loosha_bd@yahoo.com

  • Rating:
0
No Abuse Reported

Do you want to report abuse comment ID: 1779 in "lcd" request.