example code for DS1337


Closed Thread
Results 1 to 26 of 26

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi Jellis,

    Try this line in place of the Cntrl you are now using:
    Code:
    cntrl CON %00000101 ' sets the SQW/OUT to 1Hz pulse, logic level low
    I used a 4.7K pullup on the SQW/INTB pin then into a 1K resistor to the base
    of a PNP transistor. Then I used the transistor to drive an LED.

    Your current control register setting of %00011001 should cause the 1337 to
    output the 32Khz pulse.

    I would suggest you focus first on just getting the clock to work then add the
    SQW output then the alarm1 features.

    Unfortunately I don't have the circuit board with me that I had mine working
    on.

    Also I have a jumper on my clock board that I put through the uC so when I first powerup my clock it looks to see if the jumper is on (low) and if it is, then I go to the SetTimeand Date routine. If its high it skips over the routine.

    Did you look at the wiring I mentioned previously? Do you have 4.7K pullups on the SCL and SDA lines?

    BobK
    Last edited by BobK; - 2nd December 2009 at 00:36. Reason: Another thought

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. Re-Writing IF-THEN-AND-ENDIF code?
    By jessey in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th August 2006, 17:23

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts