
Originally Posted by
richard
Malcom is nearly correct
Hi Richard, nice to know I was almost there 

Originally Posted by
richard
ps can't see the need for bcd - bin - bcd conversions though
Roger stated that the RTC uses BDC format, which needs converting

Originally Posted by
flotulopex
Data from DT1307 is in BCD format and data conversion, that's where I think I'm wrong, is not my cup of tea

I presume that once you've converted the BDC format and stored them into variables as decimal values for hours and minutes you would then simply write those to the external memory, although they would need to be word variables, so would this be correct ?
Code:
I2Cwrite SDApin,SCLpin,$a0,eprom_location,[TimeH.lowbyte, TimeH.highbyte,TimeM.lowbyte, TimeM.highbyte,SS.lowbyte, SS.highbyte]
Assuming TimeH, TimeM and SS are all declared as word variables
Bookmarks