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.

trouble with HD44780 driver with PIC

Status
Not open for further replies.

carlos_elt

Newbie level 5
Joined
Jul 7, 2005
Messages
9
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,281
Activity points
1,376
Hi,
I've just began to work with microcontrollers and i've built a simple HD44780 LCD driver with a PIC microcontroller but i have some trouble in the module initialization. I've used a library a found on the net and that is like the one that come with the CCS PCW compiler but u can choose the pins u want to use.
It works but only when the timing is really accurate like when i turn it on it just initializes and the cursor stays blinking in a aleatory place of the display. I have to reset the PIC in order to get the characters to show up in the display correctly.
The library is attached.

P.S: I've already added delay routines before and after i call the lcd_init().
The commentaries on the library are in portuguese.
It uses the 4 bit mode.
 

Before initializing the LCD, you have to wait about 100 mSec after power ON, in order to allow the HD44780 controller to wakeup and gain the LCD system control.

The accurate time to wait after Power ON can be obtained easily from the HD44780 datasheet.

I can attach it for you if u wish.

Yours,
 

    carlos_elt

    Points: 2
    Helpful Answer Positive Rating
Yes, thanks but i am already doing that in fact i'm waiting even more 500ms i guess i have already tried to mix with the delay routines but without success.
 

It seems to me the initialization is incorrect. D5 and D4 should be 1, not 0, as in the code.
Check the datasheet, page 213 (fig. 26) and make sure you follow those steps.
If you need the datasheet, I can post it.
 

well the initialization sends 0x03 three times then send 0x02 as i have seen in many data around the net. It then sends this
"byte CONST INI_LCD[4] = {0x20 | (lcd_type << 2), 0xf, 1, 6}; "

just like the library in the PCW compiler any idea why it doesn't works, VVV?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top