LCD read/write, high/low (SOLVED - I think)

Share your how-tos and guides with other users

Moderators: ChriThor, LXF moderators

LCD read/write, high/low (SOLVED - I think)

Postby cbuffer » Fri Feb 02, 2018 5:41 pm

I hope this is a suitable forum.

I want to use a Hitachi HD44780 LCD with a Raspberry Pi Zero. Datasheets tells me that pin 5 is the read/write definer and that set high is read and set low is write.
But three user articles tell me to short pin 5 to Grnd to read the display. This is non-intuitive for me, or am I missing something? I would expect read and write to be with reference to what the device is doing ie. set to Grnd it would be writing to the Pi. But the three articles imply that the setting is what the Pi will do to the LCD. Is this true for all devices?

TIA Ken
Last edited by cbuffer on Fri Feb 09, 2018 12:07 pm, edited 1 time in total.
cbuffer
LXF regular
 
Posts: 110
Joined: Thu Nov 01, 2007 12:04 am
Location: Cumbria

Re: LCD read/write, high/low

Postby guy » Sat Feb 03, 2018 10:41 am

Are the user articles effectively saying, "to read out your display from the pi you have to write it to the display chip first" ?
"We don't need no frikkin' aliens, we c'n do this ourselves!" — anon.
guy
LXF regular
 
Posts: 1331
Joined: Thu Apr 07, 2005 12:07 pm
Location: Worcestershire

Re: LCD read/write, high/low

Postby cbuffer » Sun Feb 04, 2018 12:23 pm

Yes guy that is the implication. My problem is that if I wanted to read with the device I would expect to set it to read. Is this High/Low, 1/0 uniform across all devices just as npn/pnp is universal across all transistors, or do I have to check each device? And does it apply to all controlling devices such as Pis and Arduinos?

Regards, Ken
cbuffer
LXF regular
 
Posts: 110
Joined: Thu Nov 01, 2007 12:04 am
Location: Cumbria

Re: LCD read/write, high/low

Postby guy » Mon Feb 05, 2018 9:46 am

cbuffer wrote:Yes guy that is the implication. My problem is that if I wanted to read with the device I would expect to set it to read. Is this High/Low, 1/0 uniform across all devices just as npn/pnp is universal across all transistors, or do I have to check each device? And does it apply to all controlling devices such as Pis and Arduinos?

Regards, Ken


I think the user articles are explaining that if you want to visually read the LCD display yourself, you have to write the data to it from its driver chip by setting the READ/WRITE flag low. This is consistent with the data sheet.

But of course, to get that data into the display chip in the first place, you will initially have had to set it to READ (high) and then got the Pi to output it. Only then do you toggle the flag low.

I suspect that the fact that this is a two step process - first high then low - may be the cause of the confusion.

Does this help?
"We don't need no frikkin' aliens, we c'n do this ourselves!" — anon.
guy
LXF regular
 
Posts: 1331
Joined: Thu Apr 07, 2005 12:07 pm
Location: Worcestershire

Re: LCD read/write, high/low

Postby cbuffer » Tue Feb 06, 2018 4:01 pm

Hello guy thanks for your comments. I attach three web addresses where the read write pin is grounded. The first is the pdf I first worked from and noticed what seems to me a contradiction which was in heavy type on page seven. The others are picked for the ease of seeing the fixity of grounding pin5. There are many more
but I have yet to come across one which mentions switching from high to low or use a coding which implies the need to change wiring. Struggling with Gert van Loo's manual for the Gertboard at present where at least I feel I'm reading a well written detailed document and am getting somewhere. :))

https://www.element14.com/community/doc ... displaypdf

https://pimylifeup.com/raspberry-pi-lcd-16x2/

http://www.circuitbasics.com/raspberry- ... in-python/

Regards, Ken
cbuffer
LXF regular
 
Posts: 110
Joined: Thu Nov 01, 2007 12:04 am
Location: Cumbria

Re: LCD read/write, high/low

Postby guy » Tue Feb 06, 2018 9:18 pm

Sorry I can't check them out now, it'll be a day or two before I have time.

Meanwhile, you may be able to experiment with the read/write setting to see what happens. Hardware writers have a habit of assuming prior knowledge of standard stuff that "everybody knows" (huh!) and just telling you the extra bit, so don't assume they are telling you everything!

Best of luck with it.
"We don't need no frikkin' aliens, we c'n do this ourselves!" — anon.
guy
LXF regular
 
Posts: 1331
Joined: Thu Apr 07, 2005 12:07 pm
Location: Worcestershire

Re: LCD read/write, high/low

Postby cbuffer » Fri Feb 09, 2018 12:05 pm

I suggest you don't waste any more time on this guy. I've been combing the web and nowhere does the LCD Read and LCD Write search throw up anything but an R/S grounded diagram. On the All about Circuits site which has some pretty high power users someone was asking how to read from an LCD and he was told it was not possible - such devices cannot send the contents of their memory. And going through the Liquidcrystal Library on the Arduino website there is a Write instruction for sending data to the LCD memory but no Read equivalent. I can only assume that R/W is used on datasheets to avoid confusion with the RS (reset) connection. however that makes me wonder why it is not internally grounded. Anyway, thank you for encouraging me to think about the matter, I've picked up some interesting stuff on the journey.

Regards, Ken
cbuffer
LXF regular
 
Posts: 110
Joined: Thu Nov 01, 2007 12:04 am
Location: Cumbria

Re: LCD read/write, high/low (SOLVED - I think)

Postby guy » Sat Feb 10, 2018 10:09 am

That makes sense. I am sure I recall functional WRITE modes, but that would have been in the days when the driver chip and the LCD display were separate devices. The toggle action I described would allow the display parameters to be entered at leisure before toggling the flag to update the whole display at once. I expect the R/W label is a hangover from those days. Anyway, glad you have got to the bottom of it.
"We don't need no frikkin' aliens, we c'n do this ourselves!" — anon.
guy
LXF regular
 
Posts: 1331
Joined: Thu Apr 07, 2005 12:07 pm
Location: Worcestershire


Return to Hints and tips

Who is online

Users browsing this forum: No registered users and 0 guests