UberNewbie can't set his clock...


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    sinoteq's Avatar
    sinoteq Guest


    Did you find this post helpful? Yes | No

    Default Ds1302

    If you look at the datasheet for the DS you will se that you have to do some formating of the DS result before you can display it. The DS does not store each SEC MIN HOUR and so on as a byte, it is stored in a mixed byte (I bet Melanie knows the correct word for it)

    Example:
    The register for seconds is 8 bits wide but is split into a 10 SEC part and a SEC part. So you have to look at the DS data as (n*10SEC)+SEC.
    You have to move this into a byte before you can display it. I have never used DS1302 but I have used the DS1307 and the idea is similar.

    Please look at http://pdfserv.maxim-ic.com/en/ds/DS1302.pdf Table 3 page 9

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    (I bet Melanie knows the correct word for it)

    Melanie has all kinds of words for all kinds of situations... but in this instance I'll chose to use BCD (Binary Coded Decimal)...

Similar Threads

  1. Interruptus Frustratus
    By Byte_Butcher in forum General
    Replies: 16
    Last Post: - 17th April 2009, 21:36
  2. 16F628A - Stops if release power switch.
    By dene12 in forum General
    Replies: 16
    Last Post: - 14th February 2009, 08:57
  3. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 21:36
  4. error on compiling
    By parker in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th June 2005, 15:31
  5. How to set external clock source in PBP
    By TurboLS in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 19th February 2005, 16:56

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