Shop OBEX P1 Docs P2 Docs Learn Events
RTC on PPDB — Parallax Forums

RTC on PPDB

It has been a while since I have been on this forum. I still use the propeller a lot. I have a PPDB with the I think sixteen segment displays and a RTC. I saw the object for the RTC, but I cannot fine in the code which pins to use. I want to make a clock and then port it to 6" seven segment displays using transistors (TIP31) and 12 v. I have tested that part already. Thanks, Curtis

Comments

  • Which object are you using? Are you sure the pins aren't configurable via parameters to the object's start method?
  • Keep studying the code until you find it and then you'll have one of those wonderful 'aha' moments that makes this stuff so rewarding. You'll learn something as well.

    I'm assuming your project is not time critical :-)

    Sandy
  • PublisonPublison Posts: 12,366
    edited 2015-09-21 17:39
    Long time no see. Welcome back!

    In this demo:

    http://obex.parallax.com/object/14

    the demo calls these for pins:
    'call this function each time the propeller starts
      rtc.init( 4, 5, 6 )                             'ports Clock, io, chip enable
    

    Does that help?


  • Thanks everyone.
    It sample code helped, but I see no pin connections on the PPDB that tells me where to connect it. I will experiment. Once I get this code going, How do I send it to 4 seven segment displays? I built one already with 8 inputs for the digits (multiplexed) and 5 pins to enable or disable each segment. Thanks again.
    Curtis
  • The PPDB does not connect any pins to the propeller, (except the EEPROM).

    The RTC section is just open to connect to the pins on VCC, VSS and propeller pins using jumper wires. There are no committed connections.

    164 x 164 - 70K
  • Thank you,
    I got it to work to the serial terminal. I cannot set the date greater than"99" for the year. I probably need to get a more current ic. Now to send the time to four giant seven segment displays. Any ideas would be appreciated.
    Thanks
    Curtis
  • ElectrodudeElectrodude Posts: 1,658
    edited 2015-09-29 21:29
    You can't set the date past 99 on any RTC chip I've ever used. Just set the date to 15 (for 2015) and add 2000 to it after reading the value and subtract 2000 before writing it back and you should be fine. Leap years should work with that except maybe when year == 00.
Sign In or Register to comment.