Shop OBEX P1 Docs P2 Docs Learn Events
DS1307 clock question — Parallax Forums

DS1307 clock question

stargazer2050stargazer2050 Posts: 89
edited 2012-05-25 08:43 in Propeller 1
Quickstart board
Ds1307 sparkfun board (red one)
Put the tin foil in to fix the short in the battery casing
Obex object 420 ds1307__rtcdemo.zip

Clock works when I type 'help' into serial terminal
Displays help data

When I type 'date' it comes up ' , 00, 2000, 12:00:00 am'

When I type 'time' the change time routine starts, but wont change the time

How to get it to hold the time???

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-24 14:09
    It would help if you gave more information.

    Which object are you using (preferably with a link)?
  • stargazer2050stargazer2050 Posts: 89
    edited 2012-05-24 14:45
    Hi

    Obex.parallax.objects/420

    Ds1307__rtcdemo_1.zip
  • MacTuxLinMacTuxLin Posts: 821
    edited 2012-05-24 18:19
    I think that's Kye's object. Are you able to get & set any of the 56-bytes in DS1307?
  • stargazer2050stargazer2050 Posts: 89
    edited 2012-05-25 05:54
    MacTuxLin wrote: »
    I think that's Kye's object. Are you able to get & set any of the 56-bytes in DS1307?

    Nothing seems to stick, I'm stabbin in the dark on this one. Just trying to use the headings inside of the brackets as I dont see any explanations anywhere.

    Wondering if...since sparkfun mails out shorted units if the internal eprom is fried.
  • RaymanRayman Posts: 14,827
    edited 2012-05-25 06:36
    This works on an I2C bus. What pins are you using? Are you giving it 5V power?

    DS1307 must be powered by 5 V, but you can connect the I2C bus directly to the propeller.
    However, if you are not using the existing I2C bus on P28 and P29, you have to provide your own 10k pullup resistors on whichever pins you are using.
  • stargazer2050stargazer2050 Posts: 89
    edited 2012-05-25 07:10
    Hi

    I'm on pins 0 & 1 per software in the CON section
    I use an lm7805 and get 4.96 volts off it. (by the way I get the exact same results with 3.28 volts)

    I have tried pins 28 & 29 with this software & jm's version.
    I have used 10k's and not used 10k's.

    When using 10k's would you do it on series or pin to ground and chip to pin?

    All to no avail
  • RaymanRayman Posts: 14,827
    edited 2012-05-25 07:21
    The 10k resistors need to be configured as pull-ups. You connect DS1307 SDA to Propeller SDA and run a 10k from SDA to +3.3 VDC. Same for SCL...
    Make sure you don't have SDA and SCL reversed...
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-25 07:39
    I'm on pins 0 & 1 per software in the CON section

    I see pins 28 and 29 are used withing the object.

    If you go back to using those pins, you wont need to worry about resistors since the QuickStart already has pull-up resistors on these pins.

    Is there any reason you can't use pins 28 and 29?

    P28 (clock) is position 31 and P29 (data) is position 29 on the QS's header. I'm not sure why thy switch the order around like that.

    I'm going to test it on my QS just to be sure.
  • stargazer2050stargazer2050 Posts: 89
    edited 2012-05-25 07:57
    Hi

    So thats what a pullup resistor is.
    its workin good and remembers it too.
    I may switch to 28 & 29 I guess

    As both gomer pyle used to say and kandi on 2.5 men, thankyou thankyou thankyou
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-25 08:43
    The baud rate of 250,000 was too fast for my USB cable. I switched it to 57,600 and it worked fine with the QuickStart.

    BTW, I used the "Vin", position 40 on header, to power the DS1307.
Sign In or Register to comment.