Working with memory


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: Working with memory

    Hi,
    I'm assuming it's trying to write two 16 bit values to the variable B6. Will one overwrite the other or will they combine to make one 32 bit word?
    No, it will write W1 (a word), then W2 (a word), then B6 (a byte) to the EEPROM (a total of 5 bytes) starting at location 0. To be honest I don't know if it writes the least or the most significant byte first but that's easy to find out. It doesn't really matter if you use READ with the WORD modifier since I'm sure it's been designed to match.

    If memory_output4 is a WORD and you want to store it in EEPROM starting at location 3 then
    Code:
    WRITE 3, WORD memory_output4
    Then, to read it back
    Code:
    READ 3, WORD memory_output6
    [/code]

    /Henrik.

  2. #2
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Working with memory

    Thanks. Actually, that clears up a few other questions I had about storing and reading memory. I appreciate it.

Similar Threads

  1. SERIN Not Working, SEROUT Working
    By cc1984 in forum Serial
    Replies: 11
    Last Post: - 26th October 2010, 20:16
  2. working with external memory
    By malc-c in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 25th September 2010, 00:35
  3. Replies: 11
    Last Post: - 17th August 2010, 17:45
  4. Replies: 4
    Last Post: - 2nd March 2007, 07:12
  5. Use internal program memory like DATA memory
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th December 2006, 19:38

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