beautypg.com

Zilog Z8F0130 User Manual

Page 129

background image

UM013037-1212

Project Menu

Zilog Developer Studio II – Z8 Encore!

User Manual

105

The Z8 Encore! XP 4K and 16K devices contain a Nonvolatile Data Storage (NVDS)
element with a size of up to 128 bytes. This memory features an endurance of 100,000
write cycles. For more information about NVDS, see the Nonvolatile Data Storage
chapter of the

Z8 Encore! XP F082A Series Product Specification (PS0228)

.

PRAM (Program RAM)

The Z8 Encore! XP F1680 Series devices feature an area of Program RAM that can be
used for storing some code in RAM. This area can be used to help keep device operat-
ing power low by, for example, storing interrupt service routines here that would acti-
vate the code in Flash memory when some external event has occurred. PRAM, when
available, is an optional feature. If you want to use this memory as Program RAM,
select the

Use PRAM

checkbox and then adjust the address range in the

PRAM

field.

PRAM begins at data address

E000

and can have a maximum size of 512 or 1024

bytes, depending on your device. If you deselect the

Use PRAM

checkbox, this mem-

ory is not available as PRAM but instead can be mapped as additional EData memory
(see the EData memory discussion).

It is your responsibility to set the Flash option bytes to reflect whether you are using this
memory as PRAM or as EData. This task must be performed inside your program so that
the part will still get configured correctly even when the hex file is downloaded outside of
ZDS II. The PRAM_M bit is bit 1 of Flash option byte 1 (see the product specification).
Writing to the Flash option bytes must be done only once and takes effect when your hex
file is downloaded to Flash. Therefore, if you wanted to set all of the other bits of Flash
option byte 1 to their default value of 1, but set the PRAM_M bit to 0 to indicate that you
will not be using this memory as Program RAM, use the following code in your program:

#include

FLASH_OPTION1 = 0xFD;

This example is only for illustration, of course; it is your responsibility to make sure that
all bits of the Flash option bytes are set as you need them for your application.

Data addresses

F00

through

FFF

are reserved for special function registers (SFRs).

Address ranges are set in the

Address Spaces

fields. The syntax of a memory range is:

<low address> – <high address> [,<low address> – <high

address>] ...

In the above syntax example, <low address> is the hexadecimal lower boundary of a range
and <high address> is the hexadecimal higher boundary of the range. The following are
legal memory ranges:

Note:

Note: