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

How to access 80h-0ffh inchip ram of 89c52 in c code ?

In my developinp system there has no external ram. So if i want to define a data array more than 128 bytes, how should i do? How can i access 80h-0ffh inchip ram of 89c52 in c code?

Parents

  • The 8051 architecture can only access internal RAM from 80H - FFH indirectly. (Direct access to those addresses goes to the SFR space instead.) So, you must put those variables into "idata".

    The C compiler will let you declare "idata" variables larger than 128 bytes. They'll just take up some of your "data" space as well.

Reply

  • The 8051 architecture can only access internal RAM from 80H - FFH indirectly. (Direct access to those addresses goes to the SFR space instead.) So, you must put those variables into "idata".

    The C compiler will let you declare "idata" variables larger than 128 bytes. They'll just take up some of your "data" space as well.

Children
No data