2 x 8 LCD APPmod Questions
gillet38
Posts: 5
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.
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
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
Comments
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
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.
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?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
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