PSoC microcontrollers have three address spaces:
· ROM
· RAM
· registers
As in all Harvard architecture processors access to ROM memory is done with special lines, so microcontroller is able to acquire instructions and access data at the same time.
Program memory
Program memory is the part of ROM, which is used for storing program code, which is written in this part of memory written by programming hardware. Program memory is implemented in FLASH technology, which
allows simple development time change of the program inside of microcontroller. Program memory size depends on the family of PSoC microcontrollers and is 2, 4, 8, 16 and 32 kB.
Supervisory ROM
Supervisory ROM is part of ROM which is used during start of PSoC microcontroller, as well as for calibration of components. With special instruction SSC, it is possible access this part of memory.
RAM
RAM enables storing of variables and stack which are used during work of microcontroller. Size of RAM, in most PSoC microcontrollers, is 256 bytes. When microcontrollers have more than 256 bytes of RAM (series CY8C29xx and CY8C21x34), memory is organized in 256 byte pages, with stack residing on the last page. To access some variable, user apart from 8-bit address must state appropriate page.
Register
Register address space contains registers used for peripheral's global parameters and programmable blocks of a PSoC microcontroller. PSoC microcontrollers have 512 registers, which are grouped in two 256 bytes
banks. To access some register, beside stating its name, what is needed is to also state the name of the bank in which resides wanted register. Access to certain bank is done by using macros M8C_SetBank0 and
M8C_SetBank1, which delete or set bit XIO in CPU_F register.
No comments:
Post a Comment