LDC module - busy flag etc
I got my WWVB time signal decoded but still cannot get the LCD to work.
I tried two modules with same results.
I still think I may have faulty modules.
How can I tell?
The power on reset comes up with blank screen, only the backlight works.
If I am reading the Hitachi doc correctly – it should come up in 8-bit mode and not display anything anyway on internal power up reset.
I am trying to use the BF busy flag but it keeps coming up as busy (all four read cycles) after 4-bit operation is established.
I have looked over many sample codes and none of them using BASIC (only in an assembly code ) checks for BF after the command is send. Sound reasonable.
Is there any other way to check if my LCD modules are OK?
Thanks for reading
·
I tried two modules with same results.
I still think I may have faulty modules.
How can I tell?
The power on reset comes up with blank screen, only the backlight works.
If I am reading the Hitachi doc correctly – it should come up in 8-bit mode and not display anything anyway on internal power up reset.
I am trying to use the BF busy flag but it keeps coming up as busy (all four read cycles) after 4-bit operation is established.
I have looked over many sample codes and none of them using BASIC (only in an assembly code ) checks for BF after the command is send. Sound reasonable.
Is there any other way to check if my LCD modules are OK?
Thanks for reading
·
Comments
It almost seems like we’re missing information about your system. Perhaps this was a follow up to another thread that had the missing information? What is your setup? Which microcontroller are you using? The LCD displays appear to be parallel, not serial, but I wanted to confirm. Typically in 4-bit mode on a BASIC Stamp you wouldn’t be reading the busy flag. Generally speaking these operations are slow enough for the LCD to keep up. If this is during the initialization then you can use small pauses. This is explained in our documentation for our parallel LCD and can be downloaded from our website. I hope this helps. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
Post Edit -- After placing lowbyte or highbyte, pulse E hi then hold low, increased low time PAUSE to 10ms.
Post Edited (PJ Allen) : 2/6/2009 1:39:16 AM GMT
I am using old BS2-1C in parallel mode. I need to use 4 bits because·I need other pins in my setup.
I am generally following Hitachi's HD44780 LCD II document to setup this 4 - bits mode.
I had it running before (few years back) in another application and vaguely remember that I needed to do something extra to get the 5x8 dots on all of the characters which indicated the LCD·was working. Unfortunately I messed up the LCD module and now I am using different ones.· I got two and neither one works properly.
I just cannot be sure they are OK and not getting anywhere with my code.
I guess the basic problem is that the LCD comes up in 8-bit mode but the display is not active (by design). A blinking cursor would be nice!
As far as BF flag goes - Hitachi documentation is not exactly clear but it appears that it should be used especially in 4- bit mode to speed things up. I wish they would be more specific about how much delay we are dealing with when the BF is not read back.
(I’ll put some pauses into code to see if it makes a difference)
They actually state that one should read the LCD module four times, but only the first cycle should have BF = 1. I am guessing that BASIC is slow enough that it should not matter, but it looks like I may be wrong judging from your experience.
I do not want to bug you guys but should I post my code here? It is little too long, peppered with DEBUGS!
·
PS I could not find my original post / thread. Sorry.
LCD demo s/w·(Parallax) attached.
All active pins (P4 - P7) are pulled down, E too.
However, when I switched to another module I misswired the control pins.
The BF is now working properly - I get one busy followed by 0 without any pauses inserted.
Still no cursor, back to Hitachi doc.
I also wired all inactive pins together and when I directly ground them I get them all high!
I am adding another pull down (only on unused LCD pins P0-P3) to see what happens.
I am not sure how am I getting them high when tied directly to ground.
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
The intensity pot did not work! Replaced it with another and all is well.
I did try the submitted code and it did not play. And yes, I did rewite the control pins to match mine setup.
I am still puzzled by the BF flag. It appears that if it is read after the 8 bit initilaization ( which Hitachi doc does not eleborate on - they just do not recomend it·) that it won't work at all.
I mean neither after power up or software reset from that point on! Ever.
But I did have it working as advertized at one time - before I found my· intensity pot problem.
I got my stuff partially working so I'll not worry about these unaswered questions for now.
What is interesting is that after the initial message is on the screen and you turn the power off and back on it will flicker all kinds of characters - including the message during the initial power-up reset! Than the software reset clears·it all up.
I am looking forward to experimet with the LCD module internal RAM and use it as an extra data store for my setup.
Thanks guys for all your help.
·
Display data RAM (DDRAM) stores display data represented in 8-bit character codes. Its extended
capacity is 80 ´ 8 bits, or 80 characters. The area in display data RAM (DDRAM) that is not used for
display can be used as general data RAM. See Figure 1 for the relationships between DDRAM addresses
and positions on the liquid crystal display.
Page 10 on Hitachi's data sheet
every little bit helps
Reply with your access subroutine/s when you get that worked out sometime.
I'll need some help here.
What I got so far is pretty simple - set DDRAM address with RS = 0 and RW = 0 , than I should be able to read it with RS = 0 and RW = 1 but it does not explain how to get the low / high bits in 4 bit mode.
I am reading from the visible second line ( $Cx) and it does not match what I wrote in it ( which I can see).
I'll try Google but so far no luck.
Anybody ever tried that?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php