Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 230092

Forum Post: RE: help with 16x2 LCD

$
0
0

This reporter has designed/produced & sold enough of these character Lcd modules - should be able to resolve this simple issue.   Here's what you report:  (note that I've made time/effort to better organize/present)

MCU output:      Display shows...

A   0x41              C  0x43  Error, 2 bits over

B   0x42              B  0x42  Correct

C  0x43               C  0x43  Correct

D  0x44               F  0x46  Error, 2 bits over (again)

Of course - more data would speed/ease this analysis.  Yet - from this limited data set - it seems safe to conclude that bit D1 (value =2) is indeed, "stuck high."

Here's the justification: 0x41 does not order bit D1 high - thus should D1 be "stuck" high - your 0x41 + bit D1 = 0x43.

Next, 0x42 does order bit D1 high - and as it's "stuck" high - no harm,  no foul.  This displays correctly.

Onto 0x43 - now this again sets bit D1 (and bit D0) high - and displays C correctly.  D1 stuck high has no impact.

And finally 0x44 - does not order bit D1 high - your stuck D1 does that nicely - and voila 0x44 + bit D1 = 0x46 = F.

Q.E.D.  (one final weasel/hedge - HD44780 & most clones pull-up their D-Bus.  Thus - your "stuck" bit may be evidence of an "open" circuit between MCU's D1 & Lcd's D1.) 

The effect remains the same - the cure though is different!  Far easier to imagine your shorting bit D1 to D0 or D2 - how you short it to 3V3 - bit harder.  Thus - I lean to an "open" between your MCU->Lcd's D1 - preventing the MCU from overcoming the "weak pull up" resident w/in the Lcd controller... 

Last Mohican point(s) - Petrei correctly recalled ~40uS as character to character delay.  But use a safety factor - 2x seems reasonable.  And the CLS command (0x01) and Home (0x02) may require a bit over 1mS!  (use 2mS)  It's good form to have 0x01 as the final entry w/in your Lcd initialization listing.  (yours appeared earlier)

A nice, Verify answertick seems proper/fitting & should close this topic.  (cards/letters/applause also welcome)


Viewing all articles
Browse latest Browse all 230092

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>