Steve2381
Senior Member
Hi all
I am programming a DS1307 RTC. Its hooked up to a 14m2.
If I remember rightly, you program the RTC using hex numbers, but read them back in BCD.
I can't use BCDtoBin or any of the other pre-coded conversions, because it says they are not supported on the 14m2.
Is there a long way of converting a decimal to a hex value (for when I program it ). The clock needs to be programmed from a decimal variable.
Same goes for reading the time back. I need to convert that back to decimal.
Thanks
Edit.... just out of interest, what is the first chip up from a 14m2 that allows Unary mathmatics?
I am programming a DS1307 RTC. Its hooked up to a 14m2.
If I remember rightly, you program the RTC using hex numbers, but read them back in BCD.
I can't use BCDtoBin or any of the other pre-coded conversions, because it says they are not supported on the 14m2.
Is there a long way of converting a decimal to a hex value (for when I program it ). The clock needs to be programmed from a decimal variable.
Same goes for reading the time back. I need to convert that back to decimal.
Thanks
Edit.... just out of interest, what is the first chip up from a 14m2 that allows Unary mathmatics?
Last edited: