DS1302 3 pushbuttons 2x16 LCD BS2P40
LuXo12
Posts: 31
Hi guys, I have a small problem with displaying time on my backlit 2x16 lcd (#27977), what happens is after I write time to DS1302 chip and try to display it on LCD I am getting value above 59 when I am in dec mode and values above 9 in hex
I suspect that my problem is within writing time to ds1302 chip but im not exactly where as the minutes on the lcd do change every 60 seconds but they go over their legal limits
Thanks
I suspect that my problem is within writing time to ds1302 chip but im not exactly where as the minutes on the lcd do change every 60 seconds but they go over their legal limits
Thanks
Comments
In this mode you can read and write which ever Register you want
····························································································································
You· must read and write in this way when in the burst mode
·Here is one way if you want·to save something in RAM and read from RAM
This· [noparse][[/noparse]A.HIGHBYTE,A.LOWBYTE]· = a WORD
This· [noparse][[/noparse]D] = BYTE or less
·I hope this help
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·Now wanting to learn Spin· Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 4/19/2010 5:37:29 AM GMT
this command solved the issue
bcdNum = (decNum / 10 << 4) + (decNum // 10) ' Decimal To BCD
decNum = (bcdNum.NIB1 * 10) + bcdNum.NIB0 ' BCD To Decimal
Many thanks to Chris Savage (Parallax) who posted that command
Here is what happened I was testing my clock and had it running for few hours (I guess around 12) when I noticed that the LCD display froze and the time was stuck, as I unplug the debug serial cable it was working again.
My question is do I need to pull-down the serial cable interface pins of BS2P or is my problem related to something else? I would like to mention that the clock was working for several hours before i notice this happened