PDA

View Full Version : LCD and Manual output.



Dwayne
- 26th March 2004, 16:50
Hello Folks.

Does anyone know how to control the LCD manually using 4 bits? Can someone give a example?

Here is how I do it using 8 bits:

Enable Var Porta.1
LCDDataCommand Var Porta.0

...
...

Portb=x+45 " or Whatever Value" (To display numbers)
LCDDataCommand=(High or low depending on if it is a command or data)
Toggle Enable to send that data to the LCD.

endProgram.


This is using all 8 bits of the LCD pins.


I would like to use the LSB 0-4 for data/command, but don't know how to toggle the data into the LCD.

My guess would be Toggling twice... one time with High Order bits, then immediately following with Low order bits. But then How do you make sure the LCD is in 4 bit Mode, and not 8 bit?

The purpose of this, is because I have very very little overhead, if I use my own LCD writing, compared to using a subroutine

Thanks very much.

Dwayne

Melanie
- 26th March 2004, 20:05
You first have to tell the LCD you're using 4-bit mode. The programming manual for your LCD's controller chip should tell you the initialisation sequence that you need to achieve this.

Dwayne
- 1st April 2004, 00:39
Hello Melanie!

Melanie >>You first have to tell the LCD you're using 4-bit mode. The programming manual for your LCD's controller chip should tell you the initialisation sequence that you need to achieve this.<<

That was the problem <grin>. My LCD is over 12 years old, and I cannot find it on the internet. I finally took the chip number and hoped for the best. Thus I have had a lot of trail and errors trying to figure out this LCD. I finally endup up ordering a new one about 3 days ago.

Thanks a million!

Dwayne