Re: DS1302 ask for and input load chip

Originally Posted by
Dave
SHIFTOUT DG, CLK, 0, [HEX2 TEMP] ' Send hours
will not work
the value needed to be sent is a packed bcd byte not two hex chrs
consideration also of the 12/24 hour bit must be considered also
simple way to convert binary hour value in tmp to packed bcd in hour
HOUR = ((tmp / 10) << 4) + (tmp // 10) ; bin to bcd
Last edited by richard; - 20th December 2017 at 21:56.
Warning I'm not a teacher
Bookmarks