Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
50
Добавлен:
14.04.2015
Размер:
1.37 Mб
Скачать

Keil Software — Cx51 Compiler User’s Guide

139

 

 

Chapter 5. 8051 Derivatives

A number of 8051 devices provide enhanced performance while remaining compatible with the 8051 core. These derivatives provide additional data pointers, very fast math operations, extended or reduced instruction sets.

The Cx51 compiler directly supports the enhanced features of the following 8051-based microcontrollers:

Analog Devices ADuC MicroConverter B2 series (2 data pointers and

extended stack space).

 

Atmel 89x8252 and variants (2 data pointers).

 

Dallas 80C320, 80C420, 80C520, 80C530, 80C550 an variants (2 data

 

pointers).

 

Dallas 80C390, 5240 and variants (contigious address mode, extended stack

 

space, and arithmetic accelerator).

 

Infineon C517, C517A, C509, and variants (high-speed 32-bit and 16-bit

 

binary arithmetic operations, 8 data pointers).

 

Philips 8xC750, 8xC751, and 8xC752 (maximum code space of 2 KBytes, no

5

LCALL or LJMP instructions, 64 bytes internal, no external data memory).

Philips 80C51MX architecture with extended instructions and memory space.

Philips and AtmelWM support on several device variants 2 data pointers.

The Cx51 compiler provides you with support for these CPUs through the use of special libraries, library routines, or additional directives that enable the Cx51 compiler to generate object code that takes advantage of the device enhancements mentioned above. Refer to “Chapter 2. Compiling with the Cx51” on page 17 for more information about these additional directives.

140

Chapter 5. 8051 Derivatives

 

 

Analog Devices MicroConverter B2 Series

The Analog Devices B2 series of MicroConverters provide 2 data pointers which can be used for memory access. Using multiple data pointers can improve the speed of library functions like memcpy, memmove, memcmp, strcpy, and strcmp.

The MODAB2 directive instructs the the Cx51 compiler 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 MODAB2 directive, both data pointers are saved on the stack. This happens even if the interrupt function uses only one data pointer.

To conserve stack space, you may compile interrupt functions with the NOMODAB2 directive. The Cx51compiler does not use the second data pointer when this directive is used.

These devices offer also an extended stack space that is configured in startup file

START_AD.A51.

5

Keil Software — Cx51 Compiler User’s Guide

141

 

 

Atmel 89x8252 and Variants

The Atmel 89x8252 and variants provide 2 data pointers which can be used for memory access. Using multiple data pointers can improve the speed of library functions like memcpy, memmove, memcmp, strcpy, and strcmp.

The MODA2 directive instructs the the Cx51 compiler 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 MODA2 directive, both data pointers are saved on the stack. This happens even if the interrupt function uses only one data pointer.

To conserve stack space, you may compile interrupt functions with the NOMODA2 directive. The Cx51compiler does not use the second data pointer when this directive is used.

5

142 Chapter 5. 8051 Derivatives

 

Dallas 80C320, 420, 520, and 530

 

The Dallas Semiconductor 80C320, 80C420, 80C520, and 80C530 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 Cx51compiler to generate code that uses

 

both data pointers in your program.

 

The Cx51compiler 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 Cx51compiler does not use the second data

 

pointer when this directive is specified.

 

The DS80C420 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

 

5

functions that use these features. Add this library to your project when you use

the dual DPTR feature on this device.

 

 

The DS80C550, DS80C390, 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.

Keil Software — Cx51 Compiler User’s Guide

143

 

 

Dallas 80C390, 80C400, 5240, and

Variants

The Dallas Semiconductor 80C390, 80C400, 5240, and variants provide additional CPU modes that are fully supported by the Keil compiler.

Contiguous mode allows you to create large programs that exceed the classic 8051’s 64K limit. The ROM(D512K) and ROM(D16M) directives instruct the Cx51 compiler to generate code for the contiguous mode. The far memory type is used to access variables and constants using 24-bit DPTR addressing mode (in contiguous mode).

NOTE

The contiguous mode requires the extended LX51 linker/locater and the extended AX51 macro assembler that are available only in the PK51 Professional Developers Kit.

In addition to the extended address space, the DS80C390, DS80C400, and DS5240 provide auto toggle and decrement features for the dual data pointers. The \KEIL\C51\LIB\C51DS2T.LIB library contains accelerated versions of the memcpy, memmove, memcmp, strcpy, and strcmp functions that use these

features. For non-contiguous mode (classic 8051 mode) applications, you must 5 add this library to your project to use the dual DPTR of these devices. The

contiguous mode C library already contains the library routines for the auto toggle and decrement features.

The DS80C390, DS80C400, and DS5240 offer an extended stack space that is configured in the START390.A51 startup file.

Соседние файлы в папке HLP