Hey Uall!
Working with the DS1307 and an 18M2 with the serial to parallel pic to monitor outputs of various PICAXE projects. I have the RTC feeding the 18M2 and displaying the time on an LCD. What I am confused about is, what am I seeing? I thought the output of the RTC via the i2C would be Hex values but, displaying the values on the LCD using "#" to convert the hex does not give me the date time...the second value is incrementing, but it is obviously not decimal.
Where have I mislead myself?
Working with the DS1307 and an 18M2 with the serial to parallel pic to monitor outputs of various PICAXE projects. I have the RTC feeding the 18M2 and displaying the time on an LCD. What I am confused about is, what am I seeing? I thought the output of the RTC via the i2C would be Hex values but, displaying the values on the LCD using "#" to convert the hex does not give me the date time...the second value is incrementing, but it is obviously not decimal.
Where have I mislead myself?
Code:
hi2csetup I2CMASTER, %11010000, i2cslow, i2cbyte
hi2cout 0,($00,$33,$14,$01,$04,$11,$10)
writei2c 0, ($00,$59,$11,$3 ,$9, $5,$11, $10)
main:
pause 700
hi2cin 0,(b0,b1,b2,b3,b4,b5,b6,b7)
high c.1:SEROUT c.1,t2400,("?f") ' clear the LCD
high c.1:SEROUT c.1,t2400,(#b0," ",#b1," ",#b2)
high c.1:SEROUT c.1,t2400,("?n",#b4," ",#b5," ",#b6)
debug
goto main