Shop OBEX P1 Docs P2 Docs Learn Events
DS 1302 12/HR Mode — Parallax Forums

DS 1302 12/HR Mode

ArchiverArchiver Posts: 46,084
edited 2001-10-17 09:38 in General Discussion
I am looking for documentation or sample code for using the 12/hr
mode of the DS1302 clock chip. Or is it simpler to convert to 12 hr
mode using math and the // operator?

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-10-16 15:02
    Bit 7 of the HOURS REGISTER is defined as the 12- 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-23 hours).

    Right from the manual.

    James R. Parish
    J-Tech Internet Services
    J-Com Enterprises, Inc.

    Original Message
    From: coondog45@h... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=7kygsqqiru2NGI-JMZIcjcIwU4IAKACl57X9HlnP4m-J8reXeY4C4YSZ692d8hS5vnjzlmTC901erZXo]coondog45@h...[/url
    Sent: Tuesday, October 16, 2001 4:41 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] DS 1302 12/HR Mode

    I am looking for documentation or sample code for using the 12/hr
    mode of the DS1302 clock chip. Or is it simpler to convert to 12 hr
    mode using math and the // operator?


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2001-10-17 09:38
    Do you set bit 7 high with a seperate write command then mask it when
    you write to register to set the time? Also I guess you have to set
    bit 5 also to tell the chip it is AM or PM, do you do this when
    setting bit 7 high?

    --- In basicstamps@y..., "James R. Parish" <wiz@a...> wrote:
    > Bit 7 of the HOURS REGISTER is defined as the 12- 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-23 hours).
    >
    > Right from the manual.
    >
    > James R. Parish
    > J-Tech Internet Services
    > J-Com Enterprises, Inc.
    >
    >
    Original Message
    > From: coondog45@h... [noparse][[/noparse]mailto:coondog45@h...]
    > Sent: Tuesday, October 16, 2001 4:41 AM
    > To: basicstamps@y...
    > Subject: [noparse][[/noparse]basicstamps] DS 1302 12/HR Mode
    >
    > I am looking for documentation or sample code for using the 12/hr
    > mode of the DS1302 clock chip. Or is it simpler to convert to 12 hr
    > mode using math and the // operator?
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@y...
    > from the same email address that you subscribed. Text in the
    Subject and
    > Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
Sign In or Register to comment.