Real time clock on 4X 20X LCD And Strings
chris jones
Posts: 391
Hello
NOTE· : i am new to the propekller world but i will try 100% to read if i need to read and follow instructions
i have done some reading in the manual and found my section for· a run time clock but there is no exmpales on how i can access that clock and keep it running on 1 COG. i want to waste a COG just haveing it keep time is there a internal clock without using a cog.
i have a LCD screen that i got from parallax 4X 20X serial communication i know i need to use an object but not sure what section to look under for the object exchange.
the time format i want to display is
Days Hours minuts Seconds
00:00:00:00
BUT i can do the logic on that how do i get that info from the propeller chip.
Last can i do things with strings with teh propeller instead of serial or since the devices i am using are serial i have to send serial?
NOTE· : i am new to the propekller world but i will try 100% to read if i need to read and follow instructions
i have done some reading in the manual and found my section for· a run time clock but there is no exmpales on how i can access that clock and keep it running on 1 COG. i want to waste a COG just haveing it keep time is there a internal clock without using a cog.
i have a LCD screen that i got from parallax 4X 20X serial communication i know i need to use an object but not sure what section to look under for the object exchange.
the time format i want to display is
Days Hours minuts Seconds
00:00:00:00
BUT i can do the logic on that how do i get that info from the propeller chip.
Last can i do things with strings with teh propeller instead of serial or since the devices i am using are serial i have to send serial?
Comments
obex.parallax.com/objects/532/
The demo uses a serial terminal but the code is easily adapted to an LCD.
ERROR
required subroutine
here is my line of code
lcd.time12(value.8)
here is your line of code
term.str(rtc.time12)
Any ideals, i know you used the terminal but i setup my 4x 20x lcd
See attached demo.
i have my lcd working but i was wanting to know if someone can help i am trying to call a func from an object but why am i geting subrotine requred
code listed..........................
You are trying to reference the method "time12" in the "lcd" object, but it's actually in jm_softrtc which is "TIM" in your code.
<edit> On top of that, time12 does not take parameters... What is it you are trying to do?
Something like lcd.str(tim.time12) would probably achieve what I assume you want (put the time on the display) ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.
Post Edited (BradC) : 11/4/2009 1:18:41 AM GMT
JonnyMac·posted his code and it looks like he is calling time12.i caqll lcd so i can display it on my debug lcd, also it looks like time 12 takes a peram of (d).
·
Have a closer look at time12 in jm_softrtc. It does not take a parameter.
It returns the address of a zero terminated string with a representation of the current rtc time in it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.
ok i will look maybe i need to look at --> pub initx