This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

reading a memory address

Hi,

I am trying to write a constant value into a particular memory address, say for instance I am trying to write decimal value 8235 into a memory location by converting it into an appropriate hex file.

But when I read the data, at the same address where the value was written, back onto my LCD,I get some another value.

Is there a problem with the data format (little endian, big endian)? How would i verify the data format? Are there any tools available for the same?

Parents
  • "I get some another value."

    What other value?

    Have you checked to see if it is just byte-reversed, or printing as a numeric value instead of ASCII-coded characters, or wrong signed/unsigned, or at the wrong addres, or any other possibilities...??

    If you don't supply any information to allow others to help with this, you will have to do it all yourself!

Reply
  • "I get some another value."

    What other value?

    Have you checked to see if it is just byte-reversed, or printing as a numeric value instead of ASCII-coded characters, or wrong signed/unsigned, or at the wrong addres, or any other possibilities...??

    If you don't supply any information to allow others to help with this, you will have to do it all yourself!

Children
  • "Have you checked to see if it is just byte-reversed, or printing as a numeric value instead of ASCII-coded characters, or wrong"

    Yes, it is printing some numeric value.

    Let me give values.

    Input Number: 8236
    Hex file's output:
    address values
    00400 00 2c 00 00 00 20 00 00 00
    Read on LCD: 0215

  • "Input Number: 8236
    Hex file's output:
    address values
    00400 00 2c 00 00 00 20 00 00 00
    Read on LCD: 0215"


    Well, 8236 = 0x202C, doesn't it? So there's a clue!

    Since internal data representations, and the way the compiler handles reading data from code space, are entirely implementation-defined you really need to go to the appropriate forum!