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 location into a C varaible

Hi,

I need to read a memory location (SRAM)and load the value into a variable of type integer in my 'C' code.

How do I achieve the above mentioned problem in C?

Do I need to do some kind of translations to be done when I read the value so that it would be read as proper integer?

Regards,
Jinen Dedhia

Parents
  • What I want to do is, I need to assign this register's value to one of the variables in 'C'.

    C does not "know" anything about registers, everything is just variables.

    If your post is a convoluted way to ask about assmbler interface to C, state so.

    If by 'register' you mean a SFR, state so

    If by 'register' you mean a variable, state so

    Erik

Reply
  • What I want to do is, I need to assign this register's value to one of the variables in 'C'.

    C does not "know" anything about registers, everything is just variables.

    If your post is a convoluted way to ask about assmbler interface to C, state so.

    If by 'register' you mean a SFR, state so

    If by 'register' you mean a variable, state so

    Erik

Children
No data