How often to re-initialize a character LCD display?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I'm just wondering what "standard practice" is for re-initializing a charac
ter-based LCD display (i.e., a 2x16 backlit LCD)?

I have a project in the works now that erratically displays a blank LCD.
I haven't quite tracked down what might be wrong, but I could "fix" the who
le issue by just re-initializing the LCD on every pass.  (This is very simp
ly loop software..., check some inputs, throw some relays, etc..)

I don't think it's a flaky LCD, and like I said, I'm not 100% sure why it's
 doing this?   The power rails are good and solid, and really nothing that  
stands out in the code (which is hand-assembler).  And probably 95%+ of tha
t code is from other projects over the years which I know to be bulletproof

So, not asking for help on the "fix".  

I'm just wondering how often (if ever?) folks re-initialize the LCD display
This particular code never "sleeps".

If it did, I could more easily justify re-setting the LCD (via initializati
on) when coming out of low-power, or power-down modes.  (You know, just to  
be sure!)

This project uses an AT89LP51ED2 8-bit, 8051 derivative -- and the standard
 Hitachi language LCD character display.  Nothing special.  (The LCD is int
erfaced in 4-bit mode, and my code has complete control over it.)

Nothing unexpected if I'm in front of it, even if for hours.
But leave it a few days or weeks, and sometimes the LCD will be blank even  
though the code is working fine otherwise.  A reset fixes it, as does a sof
tware switch (toggle a port pin) to call the LCD init routine.

Re: How often to re-initialize a character LCD display?
On 06/06/18 13:18, mpm wrote:
Quoted text here. Click to load it

The Hitachi-compatible 16x2 display chips vary in the delays they need
after each kind of operation. If you have a flaky system, add some big
delays. If it's not flaky any more, go looking for which delays fixed
it and reduce them to the required duration.

Clifford Heath.

Re: How often to re-initialize a character LCD display?
AT Wednesday 06 June 2018 14:07, Clifford Heath wrote:

Quoted text here. Click to load it

Quite often the cheap displays containing these controllers have no internal  
caps on the power supply. I had similar problems that several times when the  
customer switched to cheaper displays. But your argument about the timing is  
also correct, the required timing seems to vary with he moon phase.


Re: How often to re-initialize a character LCD display?
On 06/06/2018 03:10 AM, Reinhardt Behm wrote:
Quoted text here. Click to load it

Those eBay-special displays can be pretty sensitive to  
brownouts/droops/noise on the supply rail; even very brief dips in the  
supply or EMI injected from a motor spinning up or relay switching can  
cause the controller IC to latch up and the display won't come back up  
until the power is cycled.

I would ensure the supplies and ground were actually as "solid" as I  
thought they were

Re: How often to re-initialize a character LCD display?
AT Wednesday 06 June 2018 15:21, bitrex wrote:

Quoted text here. Click to load it

I had luck with one type - butnot all - by putting a tantal directly over  
the supply connector.


Re: How often to re-initialize a character LCD display?
On Wednesday, June 6, 2018 at 3:21:54 AM UTC-4, bitrex wrote:
Quoted text here. Click to load it

Yes - these are "El Cheapo" variety.  A 16x2 white characters with blue LED backlight.  $10 in single quantities from Digikey.

I will scope it today.  Maybe I missed something...

Re: How often to re-initialize a character LCD display?
On 06/06/2018 06:58 AM, mpm wrote:
Quoted text here. Click to load it

That it will run for many days or weeks without a problem and then blurp  
all of a sudden doesn't sound like a timing issue or noise on the clock  
and data lines, that usually results in garbled characters but not the  
whole display going down.

If boards are already made and stuff re-initializing the display every  
so often is one of those pragmatic hacks that while not particularly  
elegant has probably been done before without anyone noticing.

Re: How often to re-initialize a character LCD display?
On 06/06/2018 07:07, Clifford Heath wrote:
Quoted text here. Click to load it

Quoted text here. Click to load it

Quoted text here. Click to load it

Quoted text here. Click to load it

Quoted text here. Click to load it

The other thing to check if you can get at any of the LCD pins is to  
make sure that there is an oscillating signal present. LCD displays fade  
to nothing if they are DC biassed for any length of time.

Martin Brown

Re: How often to re-initialize a character LCD display?
On 6/06/2018 1:18 PM, mpm wrote:
Quoted text here. Click to load it

It has constraints on the rise and fall time of the clock signal. If  
you're driving it through a level-shifter, you might not be complying  
with them


Re: How often to re-initialize a character LCD display?
On 06/05/2018 11:18 PM, mpm wrote:
Quoted text here. Click to load it

One thing that might be a good idea to do in future for debugging this  
kind of problem is if one is gonna go the China-special route on  
"Hitachi-compatible" 16x2 LCDs whose brain is a little chip-board-blob  
made by God-knows-who is I picked up some display modules from the late  
1980s (also on eBay) that have the actual HD44780 OEM IC from goddamned  
Hitachi themselves on the board.

That way one can do a "compare and contrast" on the performance and if  
the OEM works and the China-special doesn't you at least know the  
problem isn't you.

Re: How often to re-initialize a character LCD display?
On Wednesday, June 6, 2018 at 12:36:38 PM UTC-4, bitrex wrote:
Thanks, Bitrex

Re: How often to re-initialize a character LCD display?

Quoted text here. Click to load it

Do not know if your processor does anything else apart from driving the LCD,
but check for brownout and power cycles, check that your reset
is correct in those cases.
You could test by switching power on/off a few times.

Re: How often to re-initialize a character LCD display?

Quoted text here. Click to load it

I re-initialize our 122 X 32  pixel (20 chars X 4 lines) every 5
minutes although I never notice it.

This was because the LCD is above a switching power supply and the
EMIs want to get back to ground somehow.  Does the problem go away
when you move the LCD away from the processor ?

Another thing to try if necessary is to put the lines driving the LCD
through a common mode ferrite to help keep the common mode signals
away.   More careful bypassing of EMIs in the power section have
quieted things down a lot so no need for the ferrite but it's simple
and free to re-initialize once in a while, lest the display justs get
stuck in a bad way and have to make the user re-power the whole thing.


Re: How often to re-initialize a character LCD display?
On Wednesday, June 6, 2018 at 7:23:20 PM UTC-4, boB wrote:

Quoted text here. Click to load it

Now that's interesting...
The left end of the display is fairly close to the 52 kHz switching regulator (more importantly, the coil).  By close, I mean half an inch, maybe.
Of course, it passed emissions.

MAYBE the regulator is doing something squirrely under light loads (i.e., switch from continuous mode?)  Hummmm.....   new ideas and places to look.  Thanks.

The LCD is on a ribbon (2-inch), but I could monkey with it.
Might be easier to just shield it.  Need to look at the cabinet again for that.
I mean, if that's the root cause and not just a ching-chang-chong issue.
I wonder if we still have any legit Hitachi LCD controller styles laying around...?

Re: How often to re-initialize a character LCD display?

Quoted text here. Click to load it

If you don't find the original display board, perhaps you can extract
something useful from the original data sheets:

If you want an LCD display with a real HD44780A00 chip, I have a
display that I extracted from my Korg DSS-1 synthesizer:
Here's the board:

I just peeled off the paper label covering the chip and found that's a
genuine Hitachi HD44780.  

The display has an internal electroluminescent backlight that over the
years had dimmed and faded away.  It's difficult, but not impossible,
to see the display.  Also, it's not a 16x02 but is a 20x02 display.  

You're welcome to the board (for free) if you want it.  Send me an
email (see signature) with a USPS mailing address and I'll mail it to

Jeff Liebermann
150 Felker St #D
We've slightly trimmed the long signature. Click to see the full one.
Re: How often to re-initialize a character LCD display?

Quoted text here. Click to load it

Forgot to mention that the most valuable change to the PCB was
swapping the inner layers to make sure the ground plane layer
(negative actually) was next to the bottom layer on the stackup...
Also, moving some traces that were on that ground plane to another
layer and using more of that ground plane for actual ground
(negative).  Better shielding against the EMIs trying to get back to
ground through the sensitive signal lines.


Quoted text here. Click to load it

Re: How often to re-initialize a character LCD display?
On Wed, 06 Jun 2018 21:36:30 -0700, boB wrote:

Quoted text here. Click to load it

 Don't overlook the fact that all colander layers carrying voltage rails  
that are linked to the zero volt 'ground' reference rail via decoupling  
capacitors are effectively 'ground rails' as far as screening and 'ground  
return' pathways are concerned.

 The PCB designer should be more than well aware of the pitfalls of  
unexpected parallel tuned resonance effects when using decoupling  
capacitors in parallel to 'make two (or multiple) separate voltage rails  
behave as one' with regard to the whole spectrum of frequencies being  
handled by the circuit components, including unwanted interference  
signals that might leak past any assumed external screening provided in  
the final build.

 Even assuming the designer correctly specifies the decoupling capacitors  
(and their placement), it's still possible for manufacturing to derail  
the designer's best intentions either due to component supply logistic  
issues or simply 'Beancounteritis' using cheaper sub-standard substitutes  
for those critical parts.

 In the case of 'Beancounteritis', it's often the tactic of eliminating  
'surplus to requirements' parts[1] that don't appear to provide any  
useful function during the functional testing phase but the removal of  
which can save thousands of dollars on a half million production run  
which represents at most maybe a whole half a percent on the BoM costs.

 Astonishingly, the beancounters don't seem to have any understanding of  
mathematics beyond 1st order "Sums" nor any appreciation of such penny  
pinching actions on the net worth of the company they have been placed  
into the unwarranted position of destroying by such short sighted 'money  
saving' actions.

[1] I'm forcibly reminded of one very memorable act of Beancounteritis  
vandalism that left one reviewer of Akai's then latest and greatest R2R  
tapedeck, namely the GX630DB (of which I owned one example of - hence the  
interest in the reviewer's article) rather puzzled by its playback  
performance using pre-recorded tapes made on other tape decks which had  
successfully recorded to levels in excess of +8dB VU but which clipped in  
the GX630DB's replay amp.

 The 0dB VU level is normally set to 12dB below standard tape saturation  
(maybe corresponding to 15 to 18 dB below the saturation level of the  
more modern high output low noise tape formulations currently available  
from Japanese tape manufacturers (Maxell and TDK) at that time).

 Since the only perceivable limits on performance should be that of the  
magnetic recording tape alone (the weakest link in the whole enterprise)  
rather than have anything to do with the amplifiers which could so easily  
outperform the limitations of the media and therefore contribute no  
further degradation to the process of recording and playback of analogue  
magnetic tape recordings, this finding was rather a disappointing  
surprise to the reviewer who tried to mitigate just what a disaster it  
truly was by claiming it could be worked around by using lower recording  
levels than were considered desirable with higher noise tapes to take  
advantage of the modern low noise tape formulations, overlooking the  
glaring deficiency in handling existing high level recordings.

 He was obviously motivated to excuse this singular defect on a machine  
that so clearly outperformed everything else in the market including  
"professional class" machines costing ten times as much, in every other  
way (almost unmeasurable wow and flutter, virtually no head scrape noise  
due to the absence of pressure pads and glass smooth glass crystal heads  
(which, as a bonus, didn't so readily clog up with shed tape coating  
material) and with a service life at least two orders of magnitude better  
than the standard Mumetal based heads).

 Since I had taken the precaution of obtaining the service manual for  
this tape deck as soon as I'd bought it, I was able to peruse the circuit  
diagrams to try and work out why the replay amplifiers had such a low  
clipping point. Luckily, the circuit diagram showed test voltage values  
at critical points which swiftly indicated where the problem lay.

 The 'DB' suffix in the model number indicates the use of the Dolby B  
noise reduction system. In this case, the deck used a total of four Dolby  
circuit boards, two in the playback amplifier chain and two in the  
recording amplifier chain.

 In the case of the recording chain, they sat between the bass and HF EQ  
sections (the bass lift being applied first meant the Dolby processor,  
which didn't react to this subsonic to 200Hz frequency range, could be  
safely used at this point in the recording amplifier chain[2]).

 In the case of the playback chain, they formed the last link immediately  
connected to the line out sockets via the 2.7K? emitter load resistor of  
the emitter follower output stage. The Dolby boards were powered from a  
24v rail which supplied 21.8v to the output transistor's collector so one  
might reasonably expect to see an emitter voltage on a class A emitter  
follower amplifier stage around about the half voltage mark, circa 11  
volts in this case. What the circuit diagram revealed was a test voltage  
value of 5.5 volts, just half of what it should have been!

 I didn't want to alter the amplifier gain so I added a capacitor and a  
resistor to the bias feedback network so I could alter the DC feedback  
without upsetting the audio frequency gain in order to re-bias the  
emitter voltage to 12 volts to eliminate the worst of the asymmetric  
clipping characteristics of this resistor loaded emitter follower stage.

 Seeing as how driving even a 10K? line input would aggravate the  
asymmetric clipping behaviour (there was already a 33K? load after the  
output coupling capacitor to the line out socket), I decided to replace  
the emitter resistor with a constant current generator so as to preserve  
symmetry of clipping down to 3K? loadings, effectively raising the  
originally observed clipping level by some 10dB (If a job's worth  
doing... and all that). In so doing, I re-optimised the emitter voltage  
to a value of 10v (figuring on a 2v drop from the driver collector load  
resistor I'm now guessing).

 It was quite gratifying to quash the handiwork of Akai's beancounters  
but even more gratifying was my discovering about a year later from a  
Wireless World magazine article which showed the original Dolby B circuit  
in its intended form which revealed that I had simply recreated the  
original biassing/feedback network that Akai's beancounters had so  
devilishly vandalised.

 After you've read [NOTE 2] below, you'll understand my utter contempt  
for the beancounters of this world.

 Strangely, in the case of the GX747's electronic tape counter, a version  
of beancounteritis could have immeasurably improved the accuracy of this  
hours, minutes, seconds tape counter by saving on the cost of a drive  
belt and a seperate optical counter disk and its bearing assembly by  
mounting the optical sensor directly to the rubber faced tape driven  
counter shaft. Ghod only knows what possessed the designer to cobble up  
such an abortion as this in the first place. :-(

[2] It could have more conventionally been placed ahead of the whole  
recording amp's EQ chain but this was a neater insertion point. However,  
the beancounter's act of sabotage gave rise to another observation by the  
reviewer with regard to bass frequency clipping and gross intermodulation  
when recording at moderately highish levels (above 0dBVU), a problem I'd  
assumed to be due to a limitation of lower flux saturation levels in the  
choice of ferrite over Mumetal in the recording head, an assumption I may  
have have adopted from the the reviewer - I can't be certain now after  
all this time.

 Anyway, I knew something that the reviewer didn't, the placement of the  
Dolby recording boards between the bass and HF EQ sections of the  
recording amps. The penny hadn't dropped straight away since it was only  
months later that it occurred to me what the true nature of this poor  
bass frequency recording limitation might be.

 I performed an almost identical modification to the recording Dolby  
boards which completely cured the issue of bass distortion/
intermodulation on moderate to high levels of recorded bass, thus  
completely exonerating the glass crystal recording head of all blame.  
Now, at last, I could aim for healthy recording levels into the red of  
the VU meter's scale just like I'd been able to with my Akai 4000D a  
decade earlier.

Johnny B Good

Re: How often to re-initialize a character LCD display?
On Wednesday, June 6, 2018 at 12:49:42 PM UTC-4, wrote:
Quoted text here. Click to load it

Processor has brown-out detection and power-on reset.
I've been unable to duplicate the problem with on/off tests.

BTW:  Backlight on LCD stays on when problem occurs.
It's the characters that vanish.

Site Timeline