Shop OBEX P1 Docs P2 Docs Learn Events
2 x 8 LCD APPmod Questions — Parallax Forums

2 x 8 LCD APPmod Questions

gillet38gillet38 Posts: 5
edited 2007-04-07 16:50 in BASIC Stamp
Let me preface this by saying that i'm a mechanical engineering major who has been handed a bit of an ECE / EE design project and am a little bit like a fish out of water. rolleyes.gif

EDIT: Using a BS2

I have used the demo LCD appmod code as the basis for my program / UI but have several questions.

First some functional info:

The program is essentially a digital thermostat, and I would like to out put the temperatures from 2 different DS1620 thermometers to the LCD display in real time.

I sort of understand the functionality of the LCD demo code, but now for the questions:

The LCD messages are stored in EEPROM during program initialization, how do I update them in real time?
How do I write a message to display a variable, IE here is the Current message code (For eeprom)

Msg1 Data "This is the first message" , 0

is there a way to add a variable to that message? Or do I have to use some kind of serout command? IS that possible with the APPMOD LCD?

Thanks in advance for any pointers!

Andy rolleyes.gif

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-03-21 14:12
    Andy,

    On a Parallel LCD you cannot use formatters as you would on a Serial LCD. You can still print messages as in the demo, but for variables you need to grab the individual digits from within the numeric value and send them to the LCD using the subroutine. Use the DIG operator and add $30 to each character before sending it to get the ASCII value for the display. Done right your original value should remain intact. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-03-21 15:01
    You could use a "special" character that your program would use to insert a value.

    Like:

    Msg1 DATA "The first value is $1", 0

    Then your program would know to look for the "$1" and replace it with a parameter value string.
  • gillet38gillet38 Posts: 5
    edited 2007-03-21 17:53
    allan, would the $1 be able to be updated even though it is set at the inital setup in the EEPROM?

    Chris, Hate to be a pain, but could you give me a code example???

    I've got temperature data from the DS1620 in a word variable HOUSETEMP - Which digits do I need to pull out?
  • Capt. QuirkCapt. Quirk Posts: 872
    edited 2007-03-21 18:02
    Try out this code
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-03-21 21:02
    Example? No problem...I hope this helps...Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • gillet38gillet38 Posts: 5
    edited 2007-04-05 00:03
    Wow it's been a while, got a little side tracked on the hardware side of things.

    Capt. Quirk, your file didn't do anything for my LCD, something I missed?

    Chris, thanks for the file!

    Edit: Replaced the addr with the Dsdata and it works great, but how do I scroll it?

    I've seen in the example code how to scroll with a message, so what I want to do now is to say:

    "House temp:" dsdata (temp) and scroll that message... or since the temp is assigned to an address can I just scroll the message around it??

    Post Edited (gillet38) : 4/5/2007 12:23:33 AM GMT
  • gillet38gillet38 Posts: 5
    edited 2007-04-06 00:57
    any body?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-04-06 21:06
    Scrolling isn’t exactly straight forward, but you can do it…Remember, you can write past the visible area of the display. Then there are commands you can send to the display to shift the display left/right. This can move displayed data off screen and off screen data onto the display. Is this what you are trying to do? There are examples which could help you as well as the Hitachi Datasheet, which explains the command you must send to do this. I hope this helps. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Capt. QuirkCapt. Quirk Posts: 872
    edited 2007-04-07 07:26
    The mill example is for taking in data up upto 5 digits wide and displaying that data. If only 1 # changes, it will replace just that 1 #, or 2#'s or 3#'s and so on.·Until it recieves data next Main loop. All the other examples deal with a base "DATA" statement and then manipulate it.
  • gillet38gillet38 Posts: 5
    edited 2007-04-07 16:50
    chris, i have use the sample LCD code from the data sheet to scroll a couple of phrases across each line of the LCD. That is what I'm trying to do, I don't want to do it with temperature data, just with static messages.

    The problem I'm seeing right now is that when I copy the code from the example program into the example code that you gave me (changing variables and such to match) the messages appear but do not scroll. I'll try to do a bit more trouble shooting to see if I can figure out why it's not working.

    Thanks

    Andy
Sign In or Register to comment.