program of Melanie


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2006
    Location
    france
    Posts
    47

    Default program of Melanie

    Hello

    I took the conversion program of Melanie, but I
    A problem with the backup in the external eeprom.
    Should we save time and minute on 2 bytes?

    Thank you
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2006
    Location
    france
    Posts
    47


    Did you find this post helpful? Yes | No

    Default eeprom

    Hello


    The data are stored in external EEPROM.
    But when I reread the eeprom hour, minute and second
    Are written in hexadecimal, while others are in decimal.
    Should he make the conversion before saving?

    Thank you
    Attached Images Attached Images  

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


    Did you find this post helpful? Yes | No

    Default

    Hi Jonas

    I've not looked at your program yet through lack of time...

    If you want to store in EEPROM, then the best and easiest is to save in the same (BCD) format as you are reading from the RTC. That way, you will remember that all operations, be they EEPROM or RTC are always in the same format.

    Only convert to a human readable format when you want interaction by a human (ie Display or Setting).

    Now, if you are saving to EEPROM, this raises another question - how often are you saving? Always remember that some EEPROMs only have a 100,000 WRITE lifetime... if you are saving every second, it won't be that long before you reach that limit.

  4. #4
    Join Date
    Feb 2006
    Location
    france
    Posts
    47


    Did you find this post helpful? Yes | No

    Default rtc

    Good evening

    It is a program to test how backups are the data in the eeprom.
    And as can see the data is written partly in Hexa and others in Decimal
    I need your help

    Thank you
    Last edited by jonas2; - 28th October 2009 at 15:45.

  5. #5
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    The data are stored in external EEPROM.
    But when I reread the eeprom hour, minute and second
    Are written in hexadecimal, while others are in decimal.
    Should he make the conversion before saving?
    Whatever format you will use data in eeprom will be saved in binary format!

    17 = $11 will be saved as %00010001
    26 = $1A will be saved as %00011010
    9 = $9 will be saved as %00001001
    0 = $0 will be saved as %00000000

    number from 0 to 9 are the same in both format decimal and hex.

    Al.
    Last edited by aratti; - 28th October 2009 at 18:08.
    All progress began with an idea

  6. #6
    Join Date
    Feb 2006
    Location
    france
    Posts
    47


    Did you find this post helpful? Yes | No

    Default

    Hello


    I agree with you, but if I use a terminal to receive
    Data stored in the eeprom.
    I wanted to do it this way:

    29 October 09, ten hours unit time, unit ten months .

    d_heure = hour / 16
    u_heure = hour - (d_heure * 16)
    d_heure = d_heure + 48
    u_heure = u_heure + 48

    d_minute = minute / 16
    u_minute = minute - (d_minute * 16)
    d_minute = d_minute + 48
    u_minute = u_minute + 48

    thank you for your help

Similar Threads

  1. Presetting Configuration Fuses (PIC Defines) into your Program
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 82
    Last Post: - 15th December 2013, 09:54
  2. Replies: 1
    Last Post: - 23rd May 2009, 09:22
  3. Compile and Program help using PICKit2
    By ozarkshermit in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 10th March 2009, 14:51
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. PIC16F684 Program question
    By Nicholas in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th December 2006, 14:30

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