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

using 2 DPTRs with C51 v3.20

I'm using quite old version of C51, v3.20.

Is there a way to tell the compiler to use the second DPTR of Atmel 89C55WD also?

  • I doubt it!
    I seem to remember that multiple-DPTR support was noted as a "New Feature" in v6?
    And it took several increments before the debugger supported it properly!

    Even then, C51 v6.x only uses the extra DPTR(s) in a very few library functions.

    Usually, use of the extra DPTR(s) is controlled via a register somewhere - so you might be able to do it "manually?"
    See the datasheet.

  • Actually, dual data pointer support was added in C51 Version 4 or maybe late in Version 3. The only 2 devices that supported dual data pointers at that time were the AMD and Infineon devices. AMD no longer makes 8051 derivatives.

    Subsequently, Dallas semiconductor, Philips, Atmel WM, and several other companies added dual data pointer support over the years. We added support for these as they became available.

    Most of these new devices were introduced during the Version 5 compiler and MOD... directives were added to support each of them.

    Note that only a few of these devices are compatible. Most are NOT!!! The reason is that the register used to switch data pointers is not always in the same location or isn't always the same bit!



    Jon

  • Thanks for the replies.

    In fact this was a desperate question to decrease the code size.

    :)

  • According to the Keil marketing speak, the latest version should give you much better optimisation.

    You could download the trial version, try it out on a representative sample, and see if they're right!

  • Using dual data pointers won't decrease code size very much. The reason is that you have to switch which data pointer is used for a mov operation.

    Jon