Shop OBEX P1 Docs P2 Docs Learn Events
LCD Experts — Parallax Forums

LCD Experts

agentileagentile Posts: 101
edited 2005-02-18 22:32 in BASIC Stamp
I am trying to understand how one of the LCD commands works.· I am using a 2x8 parallel display.· The command I am trying to make sense out of is Set DDRAM Address.· According to the manual, the command %1AAAAAAA sends the cursor to the address indicated by AAAAAAA.· The manual also states that upon startup, the DDRAM addresses which are visible within the display are 00-07 and 40-47.· So, if I send the command %10000101, and then send the character "T", I will have a "T" in·DDRAM 05.· This command works perfectly well until I get into the second register.· If I send the command %10101000, followed by the character "T", I will get a "T" in the first position of the second register, or DDRAM 40.· But if I increase the command number by 1, I get the same results as before.· In fact, I can continually increase the number all the way up to %11000000 without any change.· According to the manual, this should be writing in DDRAM 64, but it is writing in DDRAM 40.· Now, if I continue to increment my command number from %11000000, then the LCD begins writing in the right register.· It seems that the left register (DDRAM 0 to 39) is mapped to command %10000000 to %10100111.· And this is obvious because bits 0-6 of that command equal 0 and 39.· But the right register seems to be mapped to %11000000 to
%11100111.· This does not seem to match up with what the manual says.· Can anyone explain how the addresses are mapped to the Set DDRAM Address command?

thanks,

AG

Comments

  • Pinoy NYCPinoy NYC Posts: 30
    edited 2005-02-17 22:58
    post your code here, so we can see... to make sure there are no symantics errors.
  • agentileagentile Posts: 101
    edited 2005-02-17 23:13
    There are no syntax errors that I know of.· However, I found one little mention of this mystery in the hitachi manual on page 196.· It says that when using a 2 line display, the first line can be accessed by·the commands %10000000 through %10100111, however the second line does not follow in order.· IT to access the second line, you need commands %11000000 through %11100111.·



    AG
  • Pinoy NYCPinoy NYC Posts: 30
    edited 2005-02-18 21:48
    symantics errors is different from syntax errors, if you have syntax errors your program wont compile.

    symantics errors in programming world means, program logic error.

    if yyou post your code here, maybe we can tell.
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2005-02-18 22:04
    Sorry, I couldn't resist....
    Pinoy NYC said...
    if yyou post your code here, maybe we can tell
    So would this be a "syntax error" or a "symantics error" ?

    scool.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe - Mask Designer III

    National Semiconductor Corporation
    (Communication Interface Division)
    500 Pinnacle Court, Suite 525
    Mail Stop GA1
    Norcross,GA 30071
  • agentileagentile Posts: 101
    edited 2005-02-18 22:12
    Pinoy,

    ·Thanks for the offer, but as I mentioned in the previous email, I found the idiosyncracy in the command.



    AG
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2005-02-18 22:17
    agentile said...
    ...I found one little mention of this mystery in the hitachi manual on page 196

    Can you post a link to the manual, so we are all on the same page?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe - Mask Designer III

    National Semiconductor Corporation
    (Communication Interface Division)
    500 Pinnacle Court, Suite 525
    Mail Stop GA1
    Norcross,GA 30071
  • agentileagentile Posts: 101
    edited 2005-02-18 22:32
    The particular bit of information that helped me figure out why the LCD was doing what it was doing is on the top of page 196.··The Hitachi manual can be found at>>>· http://www.parallax.com/detail.asp?product_id=603-00006·.· I don't know if you are familiar with the Set DDRAM Address command, but there is a big difference in the way the command works for a 1 line or 2 line display.· An explanation of the difference is as indicated on page 196.
    I hope this is as useful to you as it has been to me.

    AG·
Sign In or Register to comment.