Shop OBEX P1 Docs P2 Docs Learn Events
Changing the DS1302 time/date — Parallax Forums

Changing the DS1302 time/date

hmlittle59hmlittle59 Posts: 404
edited 2007-09-18 18:39 in General Discussion
Hello Everyone,
Does anyone know of the best user input device for adjusting the time/date, such as push button switches (1,2, or 3),or maybe a joystick type input device on front of these hand held games? I'm talking about a finished product of course. I could not find anything like this at Parallax web site. Any Suggestion???

hmlittle59

Comments

  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-09-18 18:39
    I designed a 16x16 LED matrix clock using a DS1302 and an SX-52 protoboard. However, an SX-48 could have been used. In the design I used a 74HC165 for up to 8 input switches to change the date and time. However, I only needed 3 switches to to this (but I left the additional circuitry in for future expansion). If you are doing this with an SX chip then my code should be helpfull but even adapting it to a Basic Stamp 2 should be doable.

    http://forums.parallax.com/showthread.php?p=649643

    I used the first 2 push buttons to change the time/date either up or down and the 3rd to cycle to the next entry. For example it would start at some value of time being HOURS first - let's say 12:00 AM.

    I would first start with the 1 and either go up or down with the 1st or 2nd push button. When it was correctly listed, I would push the 3rd to move to the next digit being the 2 and follow this sequence. When the time was finished (including AM and PM) it would then move on to the DATE and repeat.

    You may also want to see this other link using an LCD and an SX-28 with a DS1302:

    http://forums.parallax.com/showthread.php?p=643780

    On the Basic Stamp 2, most people do it with the DEBUG screen for convienience.

    Let me know if I can help.
Sign In or Register to comment.