convert a decimal variable to a string
Crosswinds
Posts: 182
Hello.
This is probably a very simple question, but i cant seem to get it to work.
I have an LCD driver, that only takes null terminated strings, and it works great.
But i want to interface the ds1302 with it, and it puts out decimal values. I have tried to use simplenumbers, dec function, but no go.
example:
This is probably a very simple question, but i cant seem to get it to work.
I have an LCD driver, that only takes null terminated strings, and it works great.
But i want to interface the ds1302 with it, and it puts out decimal values. I have tried to use simplenumbers, dec function, but no go.
example:
rtc.readTime( @hour, @minute, @second )
LCD.Goto(0, 0)
SN.decstr(second)
LCD.writestring(second)
waitcnt (30_000_000 +cnt)
Comments
oh sorry, i uploaded the wrong routine, that one is a private routine inside of serial numbers, it should be just SN.dec..
Thanks for your reply, though, didnt work either..
ie:
12 will be
1
2
Maybe this will help. Replace the PST with the LCD object.
and i had also difined the variable wrong, stupid stupid
Thank you mike for your help!