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

XDATA variables

I have the following variable declaration:

float xdata voltage _at_ 0x08E2;

When I assign a value and try to print if I always get 0.0:

voltage = 25.5;
printf( "Volatage: %#5.2f", voltage );

Ouptut

Voltage: 0.0

Is there a reason for this?

Thanks.

Parents
  • Per,

    Sorry, I'm using TI's MSC1210Y5. I miss understood the documentation. It states on-chip SRAM is from 0x0000~0x03FF, which makes sense why the variable was in accessible.

    Have you spent time reading up on the C51 architecture?

    I have very limited resources when it comes to the C51 architecture. I know the net is a great one but I haven't had a chance to filter through the hundreds of pages on the subject. Can you suggest any good ones?

    Thanks,
    Paul

Reply
  • Per,

    Sorry, I'm using TI's MSC1210Y5. I miss understood the documentation. It states on-chip SRAM is from 0x0000~0x03FF, which makes sense why the variable was in accessible.

    Have you spent time reading up on the C51 architecture?

    I have very limited resources when it comes to the C51 architecture. I know the net is a great one but I haven't had a chance to filter through the hundreds of pages on the subject. Can you suggest any good ones?

    Thanks,
    Paul

Children