Question about Stampworks experiment 13 and Hitachi 2x16 LCD data sheet
Hi,
Experiments 11 through 13 involve programming the 2x16 Hitachi LCD. I read the code for those experiments and after I understood the code everything made sense. The code shows a particular way to read/write to/from data/custom character RAM of the LCD. The way to do that is to pulse the enable line of the LCD with the Basic Stamp. For example: to send a character to the display RAM, you would set the data bus then pulse the enable line for a few micro secs and to read from the cg RAM, you would pull the enable line high, set the data bus then pull enable low. The one question I have about this whole process is why this information isn't given in the data sheet of the LCD. I looked over the data sheet from beginning to end several times but no where in it does it say to pulse the enable line a certain way for read and a certain way for write.
If I had to do this for a living, I would be given the data sheet for the LCD and told to program it and without the luxury of having example code, how would I know to how to manipulate the enable line to get it to work?
I'm learning the Basic Stamp as a hobby right now but in the future I'm hoping to work as a programmer of some sort. This is my first exposure to reading data sheet, I'm hoping that someone with experience with data sheets would be able to explain this to me, thanks in advance.
Experiments 11 through 13 involve programming the 2x16 Hitachi LCD. I read the code for those experiments and after I understood the code everything made sense. The code shows a particular way to read/write to/from data/custom character RAM of the LCD. The way to do that is to pulse the enable line of the LCD with the Basic Stamp. For example: to send a character to the display RAM, you would set the data bus then pulse the enable line for a few micro secs and to read from the cg RAM, you would pull the enable line high, set the data bus then pull enable low. The one question I have about this whole process is why this information isn't given in the data sheet of the LCD. I looked over the data sheet from beginning to end several times but no where in it does it say to pulse the enable line a certain way for read and a certain way for write.
If I had to do this for a living, I would be given the data sheet for the LCD and told to program it and without the luxury of having example code, how would I know to how to manipulate the enable line to get it to work?
I'm learning the Basic Stamp as a hobby right now but in the future I'm hoping to work as a programmer of some sort. This is my first exposure to reading data sheet, I'm hoping that someone with experience with data sheets would be able to explain this to me, thanks in advance.
Comments
I’m not sure what datasheet you’re referring to, but assuming it is ours that information is covered. Most of the examples show an 8-bit data bus, however the Stamp Works example is using 4-bit mode. Nonetheless, the procedure is actually to setup the necessary lines before strobing the enable line. In 4-bit mode this has to be done in two consecutive transactions to get all 8 bits (4-bits at a time).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
And the only clue we have on how to strobe the enable line for read and write is figure 9 on page 189 of the LCD data sheet located here: http://www.parallax.com/Portals/0/Downloads/docs/prod/audiovis/Hit44780.pdf.
I'm·staring at it as we speak and for the life of me I can't figure out how we're expected to know the procedure to strobe the enable line from this diagram. Can anyone tell me what i'm missing?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
If you look closely at the code you'll find that to write to RAM you would need to set data bus then strobe E line. To read from RAM, you would need to pull E high set data bus then pull E low. My question is: which diagram on what page in the data sheet tells me to do that?
I'm looking at the bus timing characteristics table for read/write operations on page 53 and figures 27 & 28 on page 59 but I still don't see how the procedure to strobe E can be derived from that info. The link to the pdf for Stampworks: http://www.parallax.com/Portals/0/Downloads/docs/books/sw/Web-SW-v2.1.pdf
If I had to do this on my own, looking at the figures on page 59, I would probably use the pulse command on E for both read and write. You know what I'm saying?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support