RTC with date and EEPROM


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default RTC with date and EEPROM

    I'm making a datalogger and need date and time. The data (20 bytes) will be stored at 1 second intervals and I need to keep 7 days worth of information. The system will only be on approximately 1/3 of the day.

    First question, would a 256KB EEPROM be sufficient for this? I may be misunderstanding it but you can write 256KB a million times? Is that pretty much how it works?

    The other question is regarding a RTC. Would DT's INT program work as a RTC with calendar? Seems to me that the hardest part would be keeping track of the date, not the time. Just looking for the easiest (not necessarily the one that costs the least) method to do this.

  2. #2
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default Re: RTC with date and EEPROM

    You ask about a "256KB EEPROM", but do you mean 256Kb? (Like the 24LC256?) If so, there is no way that would be big enough to hold all of the data. It only holds 32,767 Bytes. For your task, you will need...

    7days * 8hrs * 60min * 60sec * 20Bytes = 4,032,000Bytes (about 32Mbit)

    There are some serial (I2C and SPI) flash devices that I think are that big. (Microchip SST25VF032B)
    Last edited by SteveB; - 4th March 2013 at 23:07. Reason: clarification

  3. #3
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: RTC with date and EEPROM

    Thanks for the information. I have to look at the data more closely. Maybe I can get away with using some bits but I may end up needing word sized variables too. It's not NASA critical information, maybe I can just use bytes and round off since none of the data is over 2000.

    There is this one chip that has 2G of EEPROM and it's not terribly expensive:

    http://www.toshiba.com/taec/componen...VG1S3ETA00.pdf

    What is the best thing to do if I wanted to store sentences? Meaning:

    "Today is the very best day to program PIC's"

    "I have questions but I can't think of any answers"

    "ummmmmmmmmmmmmmmmmmmmmmmm"

  4. #4
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default Re: RTC with date and EEPROM

    That EEPROM is certianly big enough. I'm sure there are a number of options, just depends on cost vs. what mets you needs for size/package/interface/etc.

    What is the 'Best' thing for storing strings? Depends

    You could just store them in the commands used, ie:
    Code:
    LCDOUT "Today is the very best day to program PIC's"
    LCDOUT "I have questions but I can't think of any answers"
    LCDOUT "u", REP "m"\24
    Or, use ARRAYWRITE:
    Code:
    ARRAYWRITE MyArray, ["Today is the very best day to program PIC's"]
    ARRAYWRITE MyArray, ["I have questions but I can't think of any answers"]
    ARRAYWRITE MyArray, ["u", REP "m"\24]
    Although simple, these methods use up code space.

    If code space is limited or your not talking about predetermined strings, and since you have to get a large storage device for the data anyway, storing the strings there would work well. If you want to preserve all of the space for data, and the chip has an internal EEPROM, use that.

Similar Threads

  1. RTC run too fast
    By pedja089 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th December 2012, 19:17
  2. Setting project RTC without switches
    By ardhuru in forum Bluetooth
    Replies: 6
    Last Post: - 17th October 2012, 14:20
  3. My date this weekend.
    By Christopher4187 in forum Off Topic
    Replies: 16
    Last Post: - 29th January 2008, 16:45
  4. RTC date problem
    By Peder in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 19th January 2006, 12:33
  5. calculate with date
    By Pedro Pinto in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 14th October 2005, 16:49

Members who have read this thread : 1

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