Datasheet
MEMORY TYPE SPECIFIERS
The mikroC PRO for AVR supports usage of all memory areas. Each variable may be explicitly
assigned to a specific memory space by including a memory type specifier in the declaration, or
implicitly assigned.
The following memory type specifiers can be used:
- code
- data
- rx
- io
- sfr
Memory type specifiers can be included in variable declaration.
For example:
char data data_buffer; // puts data_buffer in data ram
const char code txt[] = "ENTER PARAMETER:"; // puts text in program memory
code
data
117
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
AVR Specifics
mikroC PRO for AVR
CHAPTER 4
Description The code memory type may be used for allocating constants in program memory.
Example
// puts txt in program memory
const char code txt[] = "ENTER PARAMETER:";
Description This memory specifier is used when storing variable to the internal data SRAM.
Example
// puts PORTG in data ram
sfr data unsigned short PORTG absolute 0x65;