Hi there,
New to Arduino but not in hobby electronics I have a question regarding the LicquidCrystal library.
I have different types of LCD modules that behave strange depending on the selected bit mode, 4 or 8.
I mean some displays works in both modes, some works only in one mode?!?
See list below…
Hyundai HB16203 : 162 : both modes ok
OPCVO L2432 : 242 : both modes ok
Optrex PWB 20434 : 204 : works only in 4 bit mode
Sharp LM40x2 IA : 402 : works only in 8 bit mode
Delta Opto PDC1602M : 16*2 : never works
I’m sure the Optrex can work in 8 bit mode since I used these displays for several projects based on 8051 controllers in 8 bit mode.
So, why not when using the Arduino ?!!?
Any of you experienced this behaviour?
Just to be 100% clear, same 8 bit wiring used for the Hyundai works perfect.
Although I’m not the C specialist here I used Notepad++ to look at the code in the library and I have some questions… …
I suppose
void LiquidCrystal::init
routine is called with following code in the sketch, right ?
LiquidCrystal lcd(41, 40, 45, 44, 43, 42)
Why is the routine “begin” called from that “ini” routine?
Even strange some default values (1 line, 16 char) are used :o
The “ini” routine first initialize the display as a 1*16 display :o ![]()
The initialization routine as described in the data sheet of the HD44780 is in row 115 to 147, right?
Any idea why in case of 4 bit mode the routine “write4bits” is used to send data to the LCD while in 8 bit mode everything goes via routines “command” and “send” ?
Why not using the routine “write8bits” directly as in case of 4 bit mode?
I copied the full “LicquidCrystal” library, renamed it to “LCD_Lib” and tested above observations:
a) No “begin” call in “ini” routine
b) Use “write8bits” directly instead of “command” and “send”
With no luck ![]()
4 bit mode is always ok, 8 bit always incoherent text on the display.
Any other ideas I can try????
Sorry for the very looooooooong message
Last but not least I’m using IDE 1.6.10