DS1302 Sample Program Problem
Guido
Posts: 195
A few years back I found this DS1302 sample program somewhere????? I am trying to get EMIC to speak the actual month, not a numeric number. Anyway after an hour looking for this program I found out that it can only display the month until September.....How can I get it to say the other months?
BS2
6K
Comments
·
·· Since the EMIC relies on ASCII strings to speak, you need to send the time information to it in that format.· In SEROUT you can use the HEX formatter to get the time into the correct format.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
·
·· I’ve never seen/used this particular code before, but it appears that while the date is stored in BCD format the program is using the literal value for the lookup.· $10 is October to the DS1302, but it is the 16th element of the lookup table, which doesn’t work.· The value would have to be converted to Decimal before the lookup.· You can do that with the following line of code.
The code I use is located at the following link.· Take care.
http://forums.parallax.com/showthread.php?p=531080
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support