STRINGS

iam working with cygnal microcontrollers c8051f124,we are generating our own protocol using pwm .
i have actually implemented my project in 2 phases,1in c and another in assembly.
in the c file iam doing uart communication .
once the programe runs the displays menu on pc in that menu 2 nd option iam writing to code memory.ie i have to enter 10 byte information on the menu and this 10 byte information i have to write it code memory.
now iam able to write to code memory
only when iam defining the string as
unsigned char code test_string[]="1111111";
but i need in this form
scanf("%s",test_string);
i tried this but test_string shows value 00
when i putted in watch kindly plz help
how to use scanf()in this type case
waiting for ur valuable information.

regards
ramesh

Parents
  • The 8051 cannot write to code memory!
    Having done this in assembler, you should know that MOVC is a read-only instruction!

    If you really need to modify these strings in code memory, you will have to do it by reprogramming the Flash - you will have to read-up on Cygnal's in-application programming support for that!

Reply
  • The 8051 cannot write to code memory!
    Having done this in assembler, you should know that MOVC is a read-only instruction!

    If you really need to modify these strings in code memory, you will have to do it by reprogramming the Flash - you will have to read-up on Cygnal's in-application programming support for that!

Children
More questions in this forum