EEPROM query: easy for you, a mystery to me!


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2014
    Location
    England
    Posts
    16

    Default EEPROM query: easy for you, a mystery to me!

    Hi,

    I do not understand how I can *apparently* write to 8-bit EEPROM addresses *above 1k* on an 18F46K22.

    Unbelievably to me, the following code works just fine, writing and reading back at address 7500.

    My ignorance is clearly deeper than I thought! Can anyone shed light on this mystery?

    Thank you!


    promtest:
    y var word
    z var word
    y = 7500
    write y, 100
    read y, z
    lcdout 254,1
    pause 200
    lcdout 254,128, #z
    END
    return

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Default Re: EEPROM query: easy for you, a mystery to me!

    also just try to read @ ...

    332
    1356
    2380
    3404
    4428
    5452

    ...

    just my two cents ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,588


    Did you find this post helpful? Yes | No

    Default Re: EEPROM query: easy for you, a mystery to me!

    Check the manual for the difference between bytes and words.

    Robert

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,516


    Did you find this post helpful? Yes | No

    Default Re: EEPROM query: easy for you, a mystery to me!

    Hi,
    What Alain is trying to make you figure out is this:
    The EEPROM adress "bus" is 10 bits for adressing locations between 0 and 1023. Only the two least significant bits of the high byte are actually used, look:

    1356: 0000010101001100
    2380: 0000100101001100
    4428: 0010000101001100
    7500: 0001110101001100

    See the lower ten bits marked in green? Which adress are you really accessing? Yes, 332.

    /Henrik.

  5. #5
    Join Date
    Mar 2014
    Location
    England
    Posts
    16


    Did you find this post helpful? Yes | No

    Default Re: EEPROM query: easy for you, a mystery to me!

    Thank you everyone for showing me this patience.
    I have spent days delving successfully in code memory and my confidence was building: suddenly I was confused, in mystery-land again and not happy to be there!

    /Experimenter

Similar Threads

  1. Sound command query.
    By billys7 in forum General
    Replies: 0
    Last Post: - 9th June 2014, 11:27
  2. Query - 16F628A direct to USB
    By Ray_VT in forum USB
    Replies: 7
    Last Post: - 4th August 2009, 21:30
  3. ADCIN query
    By muddy0409 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th June 2009, 13:48
  4. Easy "Unloading" of EEPROM ?
    By Glenn in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th January 2009, 04:20
  5. Led Timer Query
    By sphinxifm in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 13th January 2008, 16:17

Members who have read this thread : 2

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