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.

16x2 Blue Backlight LCD driving me up the wal!!

Status
Not open for further replies.

chimera786

Member level 2
Joined
Jun 16, 2011
Messages
42
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,710
Hello. Here is the background: bought an HD44078 compatible 16x2 LCD from ebay (cheap). It arrived yesterday and I wrote a very simple code to see if the LCD works. Before actually wiring it up with the PIC, I wrote the program and ran it on Proteus Isis; the programs worked.

When I built it, the LCD doesnt show anything. The screen shows random blocks, lines..basically..junk. This leads me to believe that the LCD is not even initializing.

What am doing wrong. I have looked carefully at the portB pins and they do not have comparators or analog inputs multiplexed to them.

Is the inbuilt LCD library in MikroC not working -- I mean, the timing sequences used in the LCD library by MikroC are not compatible with the LCD that I am currently using? ---> possibility?


USING: PIC16F818, MikroC Pro compiler, LCD 16x2 (HD44078) compatible (atleast according to the ebay seller :-?) and I have wired the thing up correctly

Code:
// Lcd pinout settings
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() {
OSCCON=0x74;   // 8Mhz  OSC
Delay_ms(500);// just in case to see if the LCD needed some extra time to settle down after start up
Lcd_Init();
Delay_ms(500);
}
 
Last edited:

Hello. Here is the background: bought an HD44078 compatible 16x2 LCD from ebay (cheap). It arrived yesterday and I wrote a very simple code to see if the LCD works. Before actually wiring it up with the PIC, I wrote the program and ran it on Proteus Isis; the programs worked.

When I built it, the LCD doesnt show anything. The screen shows random blocks, lines..basically..junk. This leads me to believe that the LCD is not even initializing.

What am doing wrong. I have looked carefully at the portB pins and they do not have comparators or analog inputs multiplexed to them.

Is the inbuilt LCD library in MikroC not working -- I mean, the timing sequences used in the LCD library by MikroC are not compatible with the LCD that I am currently using? ---> possibility?


USING: PIC16F818, MikroC Pro compiler, LCD 16x2 (HD44078) compatible (atleast according to the ebay seller :-?) and I have wired the thing up correctly

Hello,
Please search for similar posts before starting a new thread, there are many similar posts regarding working of 16x2 lcd.
The thing is, everything works in simulation world but when it comes to real world they simply wont. Real world is Quite different as in simulation many assumptions are made regarding components being used.

I think your lcd is working fine as it is showing black box line!!! Photo0160.jpg
You just need to set delays. Use busy pin of Lcd and you wont get any problem regarding delays in future.
Go to this thread and follow down to my thread : https://www.edaboard.com/threads/234835/
i.e. Post No. 27 (#27)

Good Luck :)
 

thank you for the good luck :)

However, I really think that u didn't carefully read my post; I am using mikroc: the lcd delays are already set in there and I cant change their library because I can't access it.

Anyways, best of luck to you as well :)

Anyone else, any suggestions.. ideas?? I really cant figure it out..
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top