Just do as you're told and download that Datasheet!After all, this is a forum on PicBASIC Pro. I guess I should of registered at Maxim's forum (assuming one exists) to ask for technical assistance with the data format from the DS1307.
Then, and ONLY THEN you will be able to compare that I2C Statement with the DS1307's Registers. IT IS the Rosetta stone... until you've looked you won't see it.
I'm NOT being iffy or off-hand with my answer to your query... I'm actually telling you EXPLICITLY that IT WILL HELP YOU UNDERSTAND.
Skip all the crap and jump straight into the section on the Registers... look, it's all laid out crystal clear - it shows you what sequence they're in, how they're addressed, what's inside them... how on earth can you possibly understand what's going on in a piece of code if you don't understand what a particular BYTE of DATA has got inside it at any point in time.
If I told you that Bit 7 of the SECONDS Register was kinda IMPORTANT - How would you know? I could be talking Greek (sorry Ioannis)!
One look, and you know what the $D0 is all about in the I2C Statement. And what about $00 - what's it there for? The answer is screaming at you from the pages of the PBP Manual description of the I2C Command, and the DS1307's Datasheet. The two of them go together hand-in-hand. There's NO other secret document, no Training Course in Electronics or programming... just those two items together allow you fully understand, manipulate and control that chip. Don't handicap yourself unnescessarilly by dismissing it's 'beyond' your understanding. The DS1307 is a simple chip. But more importantly it's a stepping stone on the path to progressing to more complex hardware devices.
Armed with that information, THEN come on the forum and ask your questions. Then folks can point you as to WHY something is the way it is. YOU ASKED about accessing Data out of sequence... that $00 holds the key, and that Datasheet tells you what you should change it to if you wanted just to extract say HOURS. But if I simply said you change it to $02, my answer would be totally meaningless unless you knew WHY!
That is WHY I really PUSH folks to TRY and get to grips with Datasheets. The Ds1307 only has a dozen pages or so, and a chunk of those are irrelevant, so it's not like I'm asking you to digest Tolstoy's War & Peace.
Bookmarks