Does the standard LiquidCrystal read, and use the HD44780 busy flag?

Does the standard Arduino LiquidCrystal library read, and use the standard HD44780 character display busy flag?

For example if I write long strings to the 40 character x 2 line LCD in 8 bit data mode, do I need to add delays in my code so that the HD44780 has time to process the data?

I need the display not to periodically trip up and display weird characters, as it does now.

The display is actually a 40 character x 4 line LCD, but needs to be instantiated twice as two 40 character x 2 line LCDs because it has two Enable (E) pins, one for each of the two 40 character x 2 line LCDs that are combined as one big LCD.

I would like to use 8 bit mode because when I use a dual row header, it makes the 8 bits easy to connect. I don't need the speed increase.

Your comments and thoughts are appreciated..

(1) No

(2) No, the library includes the required time delays.

(3) What else is connected? Motors and relays frequently cause problems.

(4) That’s should work for a 40x4 display.

(5) How can it be easier to connect 8 wires than to connect 4 when the 4 are a subset of the 8? There’s no perceptible speed increase.

(6) You’re welcome!

Don

Don:

Thank you for your help, and quick response.

Referring to your numbers below:

  1. Nothing else is connected, but maybe the wires are too long. I will increase the number of ground wires, and add a +5V ceramic bypass capacitor at the LCD itself. I don't see any bypass capacitors on the back of the LCD module.

  2. My thought was just to use a 16 pin dual row header (two rows of 8 pins), to connect the LCD to the dual row of pins on the right hand side of the Arduino board. I have pins to spare on this project, so the wasted use of the pins does not concern me. However I wonder if the V- voltage on pin 16 of the LCD will interfere with the Arduino GND voltage, or if the Arduino will interfere with the LCD voltage?

Cam

Pins 15 and 16 on most LCD modules are used to deal with the backlight LED which is works independently from the LCD controller.

On some boards the circuitry is totally independent and on others pins 1 and 16 are connected. In either case the backlight may affect the visibility of the displayed characters but it won't (shouldn't) affect which characters are displayed.

If you can describe the 'weird characters' more fully this may provide a clue as to what is happening.

  • When they do appear are they always the same?
  • Do they always appear at the same location on the display?
  • Does the number of weird characters correspond to the number of un-weird characters that you are trying to display?
  • Does the problem exist when you only use half of the display?
  • Does the problem exist when you display the same information on both halves of the display by connecting both Enable pins together?

Don

Don:

The "weird characters" look like the alternate (non alpha numeric) characters as defined in the HD44780 datasheet.

It happens on both halves of the 40x4 LCD.

After the weird display characters start, they continue. So if new data is written to either of the two LCD's,
new and different, but also weird characters are displayed, not the proper characters that are sent to the LCD's by the Arduino program.

The problem can be cured by cycling the power, or doing an lcd.clear() command. The problem with doing an lcd.clear() however, is that the LCD flickers while it is being reset and the display data is refreshed. There is also a question of how often the lcd.clear() is needed, considering that the weird characters appear at a random time.

Thoughts? Comments?

The "weird characters" look like the alternate (non alpha numeric) characters as defined in the HD44780 datasheet.

Specifically which 'alternate' characters are you seeing and which alphanumeric characters are you trying to display at that time?

Thoughts? Comments?

Not without seeing the characters you are attempting to display along with their weird counterparts. A comparison of the bit patterns will frequently point to the source of the problem.

Are you sure you aren't using the 4-bit mode? This type of problem is has cropped up more than once in such cases.

Don

CamJackson:
After the weird display characters start, they continue. So if new data is written to either of the two LCD's,
new and different, but also weird characters are displayed, not the proper characters that are sent to the LCD's by the Arduino program.

Are you by chance using custom characters?
If so, there is an issue with the createChar() function in the standard LiquidCrystal library that leaves the display in CGRAM mode instead of putting it back into DDRAM mode.

It would be useful to see your test program and to know what Arduino board you are using and if you are using a 3v processor.

--- bill