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

Example code to read/write 0851 internal flash

Hello,

I can't find any example C code to read and/or write an 8051 internal flash memory.
I'm using a C8051F353 and the micro datasheet doesn't explain very well how to do it.
When the manual speaks about using the MOVX and MOVC instruction to respectively write and read is not clear.
My requests are:
1) how to put the assembler code inside the C code
2) how to read and write a specific byte memory, ex: 0x0800
3) is it possible to do it only with C code?

Regards,

Parents
  • I can't find any example C code to read and/or write an 8051 internal flash memory.
    no such thing for "8051" it is derivative specific
    I'm using a C8051F353 and the micro datasheet doesn't explain very well how to do it.
    When the manual speaks about using the MOVX and MOVC instruction to respectively write and read is not clear.

    the manual "explains it very well"
    If you are serious about using this chip, you better make using the MOVX and MOVC clear.

    My requests are:
    1) how to put the assembler code inside the C code

    DO NOT!!!, if you need asm do it in a separate module
    2) how to read and write a specific byte memory, ex: 0x0800
    ralph = (char *) 0x8000;
    3) is it possible to do it only with C code?
    yes

    Erik

Reply
  • I can't find any example C code to read and/or write an 8051 internal flash memory.
    no such thing for "8051" it is derivative specific
    I'm using a C8051F353 and the micro datasheet doesn't explain very well how to do it.
    When the manual speaks about using the MOVX and MOVC instruction to respectively write and read is not clear.

    the manual "explains it very well"
    If you are serious about using this chip, you better make using the MOVX and MOVC clear.

    My requests are:
    1) how to put the assembler code inside the C code

    DO NOT!!!, if you need asm do it in a separate module
    2) how to read and write a specific byte memory, ex: 0x0800
    ralph = (char *) 0x8000;
    3) is it possible to do it only with C code?
    yes

    Erik

Children