Basic Stamp Clock with date
Microcontrolled
Posts: 2,461
I am designing a Basic Stamp Clock using the Parallax Serial LCD and a BS2. I have not finished tweeking it yet; but the clock should still work. It dosn't. The LCD displays the spacers inbetween the variables but not the number themselfs; it instead displays jibberish. this program has been modified. I originally had all the SEROUT command in one line instead of in seperate lines.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontrolled.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontrolled.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontrolled.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
Anyway when I tried this it was at 9600 baud and I had to adjust the variables. The variables need to be transmitted as ASCII characters this is how I adjusted them.
Jeff T.
You need to tell it where you want it to display on your screen like this
and you·are not telling what the·Baud Rate is ether
Try this and see if this will work for you
DispLightOn···· CON···· $11
DispLightOFF··· CON···· $12
LineOne0······· CON···· $80
LineTwo0······· CON···· $94
LineTwo4······· CON···· $98
ClearScreen···· CON···· $0C
Baud·············· ·CON···· 32············· ' baudmode constant for LCD Display
·SEROUT LCD, Baud, [noparse][[/noparse]Clearscreen]
SEROUT LCD, Baud, [noparse][[/noparse]LineOne0, HEX2 month, HEX2 day]
SEROUT LCD, Baud, [noparse][[/noparse]LineTwo0, HEX2 hrs,· HEX2 mins,· HEX2 secs]
I hope this work for you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 5/27/2009 1:22:21 AM GMT
What did I say??
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
···· But the use of HEX instead of the addition of 48 is much better
I did not have to do anything with cursor position it worked fine just dropped the 2 off the end of HEX.
Jeff T.
SEROUT TX, LcdBaud, [noparse][[/noparse]LcdCls]
SEROUT TX, LcdBaud, [noparse][[/noparse]LcdBLon]
· PAUSE 5
SEROUT TX, LcdBaud, [noparse][[/noparse]LineOne0, DEC2· hour, ":", DE2 minutes, ":",·DEC2 secs]
SEROUT·TX, LcdBaud, [noparse][[/noparse]LineTwo0, ·DEC2·day,· "·/ " ,DEC2 month, "/", ·DEC2 year , CR]
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
@Unsoundcode: I tryed your addition trick at 19200 baud and it just displayed / and : in where the numbers should have been.
@sam_sam_sam: I am not using the Time chip just the Basic Stamps timing mechenism
I will try the HEX command instead ASAP and see if it works any differently.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontrolled.
You may want to also try the DEC one as well
the Hex2 is for the Time chip
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
Just a question, how accurate do you expect such a clock to be?
Why not rather go for the time chip DS1302, its very cheap and you find so many good programming examples on this forums too.
KjellO