Interfacing the LCD with the Real Time Clock Chip (both from the Stampworks)
I am trying to figure out a way to put the day and time from the
debug window onto the LCD. I haven't been able to put any characters
out yet. I have been successful interfacing the LCD with the
temperature chip though.
Any help would be appreciated.
Sincerely,
RP
debug window onto the LCD. I haven't been able to put any characters
out yet. I have been successful interfacing the LCD with the
temperature chip though.
Any help would be appreciated.
Sincerely,
RP
Comments
When you want to display something, all you have to do is send the ASCII
codes of the characters.
The problem is that you have a value in a byte variable, for example
hour=19. If you send directly the variable to the display, you'll get
nothing, or strange behaviours.
In this case, the "DIG" function is very useful. If hour=19, hour dig 0
returns 9 (the first DIGit begining on the right), and hour dig 1 returns 1
(the second digit).
The ASCII code of "0" (zero) is 48. If you add 48 to the value returned by
the dig function, you have the ASCII codes you need.
In the example : (hour dig 0) + 48 = 57, which is the ASCII code of '9'.
If you already display the temperature given by the temp chip, this should
be a piece of cake.
Hope this helps,
Phil.
Original Message
From: <rpsu279@y...>
Subject: [noparse][[/noparse]basicstamps] Interfacing the LCD with the Real Time Clock Chip
(both from the Stampworks)
> I am trying to figure out a way to put the day and time from the
> debug window onto the LCD. I haven't been able to put any characters
> out yet. I have been successful interfacing the LCD with the
> temperature chip though.
>
> Any help would be appreciated.
>
> Sincerely,
> RP