Hello,
When using the following code, the display (a parallax serial lcd) will display the correct time for the first five seconds.
The subsequent loops display irrelevant data. It might be cycling through dow/day/month/year once, but it does not display a recognizable pattern after the first cycle.
Will someone point out what I'm missing?
Thanks.
DBoyd
When using the following code, the display (a parallax serial lcd) will display the correct time for the first five seconds.
The subsequent loops display irrelevant data. It might be cycling through dow/day/month/year once, but it does not display a recognizable pattern after the first cycle.
Will someone point out what I'm missing?
Thanks.
DBoyd
Code:
symbol secs = b0
symbol mins = b1
symbol hour = b2
'symbol dow = b3
'symbol day = b4
'symbol month = b5
'symbol year = b6
'symbol century = b7
'symbol control = b8
hi2csetup i2cmaster, %11010000, i2cslow, i2cbyte
pause 50
main:
hic2in (secs,mins,hour) ; Receive information from clock
bcdtoascii secs, b15, b16 'seconds
bcdtoascii mins, b11, b12 'minutes
bcdtoascii hour, b13, b14 'hours
serout c.1, t2400, (128, "Time ", b13, b14, ":", b11, b12, ":", b15, b16)
pause 5000
goto main
end
Attachments
-
585 bytes Views: 4
Last edited by a moderator: