Demo code description, 80515 data types and compiler-specific information, Data types – Maxim Integrated 71M6513H Power Meter IC Family Software User Manual
Page 43

71M651x Software User’s Guide
5. DEMO CODE DESCRIPTION
5.1.80515 DATA TYPES AND COMPILER-SPECIFIC INFORMATION
5.1.1. Data Types
The 80515 MPU core is an 8-bit micro controller; thus operations that use 8-bit data types such as “char” or “unsigned
char” work more efficiently than operations that use multi-byte types, such as “int” or “long”. The Keil C51 compiler
supports ANSI C data types as well as data types that are unique to the generic 8051 controller family. Table 5-1 lists
available data types. Please refer to the Keil Cx51 Compiler User’s Guide for more details.
Various types of address spaces are available for the 80515 MPU core of the 71M651x, and in order to utilize the
various memory space types, the Demo Code uses following variable type definitions (typedefs.):
•
typedef unsigned char
data U08d;
/* 128 Bytes of direct access RAM,fast, best speed and smallest
amount of code for access.
•
typedef unsigned char
idata U08i;
/* 128 Bytes of indirect access RAM, second best for speed and
amount of code for access.
•
typedef unsigned char
xdata U08x;
/* 2K Bytes of indirect access XRAM, slowest speed and largest
amount of code for access.
•
typedef unsigned char
code U08r;
/* 64K of indirect access FLASH (a good place to put constants).
•
typedef unsigned char
U08;
/* Default space selected by 'C' compiler. (User selectable). A similar
set has been defined for signed/unsigned char, short and long variables.
Throughout the Demo Code, an attempt has been made to put the most frequently used variables in
the fastest memory space.
Revision 2.4
TERIDIAN Proprietary
43 of 137
© Copyright 2005-2006 TERIDIAN Semiconductor Corporation
5