problems with I2C.... and ideas why dosent work?


Results 1 to 26 of 26

Threaded View

  1. #25
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    The RTC works in BCD Format.

    If you want to set the date to the 25th. you would have to write $25 not a decimal 25 (which is $19)

    If you write a decimal 25 for the 25th of a month you are in trouble:
    at midnight the RTC will increment the decimal 25 ($19) to $20 (NOT $1A, because we are talking BCD!),
    which results in decimal 32, which is an invalid date in your decimal coding!

    If you want decimal numbers for easier editing/calculation you have got to convert them.

    See the examples you have got.
    Last edited by NavMicroSystems; - 26th April 2005 at 00:27.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



Similar Threads

  1. I2C problems
    By Mad_Labs in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 25th September 2005, 05:22

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