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

Problem with DTPR

Hello!

I'm using a CYGNAL C8051F020 with the CYGNAL C8051F uVISION2 DEBUG DRIVER v1.29, Keil C51 V7.05 with µVision2 V2.37.

I've got a problem which I've isolated like this:
The command

MOVX @DTPR,A
writes the value of A both to the address specified by DTPR and to a address DTPR-0x1000, which in worst case contains any variable.
E.g. if DTPR = 0x12B9 the value in A is written to x:0x12B9 AND to x:0x02B9.
Can anyone help me? Thanks!

Astrid

Parents
  • Taking a glance at the data sheet, it looks like the part has a 4K RAM built in. That's 12 bits of address space, so the high-order 4 bits would be ignored. Thus, 0x12b6 would alias to 0x02b6.

    There are some mode registers you have to set if you want to access off-chip xdata memory. Perhaps those registers aren't configured correctly.

Reply
  • Taking a glance at the data sheet, it looks like the part has a 4K RAM built in. That's 12 bits of address space, so the high-order 4 bits would be ignored. Thus, 0x12b6 would alias to 0x02b6.

    There are some mode registers you have to set if you want to access off-chip xdata memory. Perhaps those registers aren't configured correctly.

Children
No data