Keil Logo

Dallas 320, 420, 520, and 530

The Dallas Semiconductor 8xC320, 8xC420, 8xC520, and 8xC530 provide 2 data pointers which may be used for memory access. Using multiple data pointers can improve the speed of library functions like memcpy, memmove, memcmp, strcpy, and strcmp.

The MODDP2 directive instructs the Cx51 Compiler to generate code that uses both data pointers in your program.

The Cx51 Compiler uses at least one data pointer in an interrupt function. If an interrupt function is compiled using the MODDP2 directive, both data pointers are saved on the stack—even if the interrupt function uses only one data pointer.

To conserve stack space, you may compile interrupt functions with the NOMODDP2 directive. The Cx51 Compiler does not use the second data pointer when this directive is specified.

The DS8xC420 provides auto toggle, decrement, and auto increment features for the dual data pointers. The library \KEIL\C51\LIB\C51DS2A.LIB contains accelerated versions of the memcpy, memmove, memcmp, strcpy, and strcmp functions that use these features. Add this library to your project when you use the dual DPTR feature on this device.

The DS8xC550, DS8xC390, and DS5240 provide auto toggle and decrement features for the dual data pointers. The library \KEIL\C51\LIB\C51DS2T.LIB contains accelerated versions of the memcpy, memmove, memcmp, strcpy, and strcmp functions that use these features. Add this library to your project when you use the dual DPTR feature on these devices.

Related Knowledgebase Articles

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.