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

WRITING TO EXTERNAL MEMORY

Iam working cygnal microcontrollers,
i have declared the following statement
before the main , iwant to write data to
external memory. i have declared as follows before the main

char xdata test_string[100] _at_ 0x5555;
my requirements includes as follows.

assume if iwant to write 0xf6 into test string at location 0x5555 how i have
to write it.when i tried like this
test_string[100]=0xf6; but its not writing
kindly suggest me

Parents
  • 1) for that you declared the valid values are from [0] upto [99]. So next line: test_string[100]=0xf6; should report an error about boundary limit.
    2) read about usage of volatile keyword. There is special note about usage this word together with _at_ and XDATA in chapter Absolute Variable Location. It fixes your problems.

    Regards,
    Oleg

Reply
  • 1) for that you declared the valid values are from [0] upto [99]. So next line: test_string[100]=0xf6; should report an error about boundary limit.
    2) read about usage of volatile keyword. There is special note about usage this word together with _at_ and XDATA in chapter Absolute Variable Location. It fixes your problems.

    Regards,
    Oleg

Children