PDA

View Full Version : 12H format setting for DS1307



larzazral
- 23rd February 2010, 07:28
how to write data DS1307 in 12H format....

aratti
- 23rd February 2010, 07:34
From DS1307 datasheet.....



The DS1307 can be run in either 12-hour or 24-hour mode. Bit 6 of the hours register is defined as the 12-hour or
24-hour mode-select bit. When high, the 12-hour mode is selected. In the 12-hour mode, bit 5 is the AM/PM bit with
logic high being PM. In the 24-hour mode, bit 5 is the second 10-hour bit (20 to 23 hours). The hours value must be
re-entered whenever the 12/24-hour mode bit is changed.


Al.