is it possible to reprogram a RTC.

Discussion in 'Embedded Systems and Microcontrollers' started by EM., Jan 14, 2016.

  1. EM.

    Thread Starter New Member

    Nov 13, 2015
    9
    0
    If anyone can answer this question?

    Is it possible to program a DS3231 RTC that it shod give out a different type of date format.

    I mane to say if it is possible to reprogram the chips system.

    If(answering){ tanks; } else{ pleas answer; }
     
  2. nerdegutta

    Moderator

    Dec 15, 2009
    2,517
    785
    Reprogram so you get different time end date - AFAIK the only option. You need to manipulate that in your software.

    What type of date do you have in mind?

    Oh, and welcome to AAC :)
     
    EM. likes this.
  3. EM.

    Thread Starter New Member

    Nov 13, 2015
    9
    0
    i meant to say if it is possible to make it give out the Muslim date or the Hebrew date witch is different than the normal RTC is programmed.
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    Since this is an I2C device don't you have a micro reading it? The micro can read the time in one format and convert to another.
     
  5. Papabravo

    Expert

    Feb 24, 2006
    10,154
    1,795
    If it were possible then the datasheet for the DS3231 would say so. In as much as I trust you to have read the datasheet carefully I'm going to say no, it is not possible. What you need to do is implement a conversion in the software that reads the date from the DS3231. AFAIK, that is your only option.

    Unless there is such a thing as an Islamic Semiconductor Company which could design such a chip, and then have it fabricated by TSMC or a fab in Penang. If there isn't such a company maybe you could start one.

    I am curious about one thing. Does the Islamic calendar have adjustments like Leap Years and Leap Seconds to keep the calendar in sync with the movement of the planet?

    https://en.wikipedia.org/wiki/TSMC
     
    absf likes this.
  6. EM.

    Thread Starter New Member

    Nov 13, 2015
    9
    0
    Thanks papabravo you rely helped me.
    I actually found a way to convert the date format,
    1# first we need to return the amount of days passed from 1/1/1970 using the function now() (from the arduino IDE )
    2# once we now the amount of days passed, and we also now that 1/1/1970 is = to 23/4/5730 in the different date format
    than we can calculate from 23/4/5730 + the amount of days we have, and then we would get to the date we are up to.
     
Loading...