Loading EEPROM


Results 1 to 7 of 7

Thread: Loading EEPROM

Threaded View

  1. #2


    Did you find this post helpful? Yes | No

    Default

    To load 365 in an eeprom location at programming time it would be:

    Code:
    data 109, 1
    or

    Code:
    data %1101101,%1
    This comes from breaking down the bits in the bytes of the word variable

    decimal 365 = 0000 0001 0110 1101 binary

    Since there are 8 bits to a byte, we now know that byte0 is 0110 1101b and byte1 is 0000 0001b. Convert these to decimal and you get 109 and 1 respectively. Both commands will accomplish the same thing.

    You can also use:

    Code:
    write address, variable.Byte1
    write address, variable.Byte0
    and
    Code:
    read address, variable.Byte1
    read address, variable.Byte0
    This way can be done anywhere in the program. The DATA command is used to pre-load the eeprom location at time of programming.
    Last edited by CocaColaKid; - 23rd August 2005 at 04:07.

Similar Threads

  1. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 14:46
  2. How to define constants that specify eeprom addresses
    By DwayneR in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 8th December 2009, 04:07
  3. Problem with I2C EEPROM addressing
    By Atom058 in forum General
    Replies: 14
    Last Post: - 3rd November 2009, 03:17
  4. How to write/read strings EEPROM/LCD
    By g-hoot in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 11th February 2007, 06:26
  5. word variable to 25lc640
    By TONIGALEA in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th July 2004, 19:59

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