Now I need to understand how to convert from decimal (which comes from the user setup) to write to the RTC chip.
Now I need to understand how to convert from decimal (which comes from the user setup) to write to the RTC chip.
Last edited by menta; - 5th July 2008 at 23:11.
Found it
ConvertBCD:
CounterB=CounterA DIG 1
CounterB=CounterB<<4
CounterB=CounterB+CounterA DIG 0
Return
We're talking about a DS1307 RTC here (and ignoring the MSB of certain Registers) where the only valid individual digits are in the range 0-9. The subroutine converts two digit DECIMAL in the range 0-99 to a single BCD Byte. $EC is not a valid conversion requirement for this application.
Hi!!!
I just wan't to know if its possible how i can set manualy the initial time of the clock using a bic basic code!i tried to do it but i found some problems due to bcd and hex code!
so there someone that do it?!?!
thank you so much
bye bye Cris
Bookmarks