I have gotten a DS1307 working with my Arduino (easier than I expected!)
However, it appears to be running in 24-hour mode, and I want 12-hour mode. I understand the theory behind how to make it switch, and thanks to the code I stole (which included functions to set and get the time) I even know where to make the change, but I just don't know exactly what to do.
The code I stole had this line in the function to get the time:
*hour = bcdToDec(Wire.receive() & 0x3f); // Need to change this if 12 hour am/pm
the bcdToDec() function converts from BCD to decimal, FWIW. I'm guessing I need to change the 0x3f part of this line? If so, what to? I'm betting this will be an easy question for someone to answer who has more experience in this than I do.
I suppose I could put a little case statement that subtracted 12 from the value if it was over 12, but that would seem like cheating.