beautypg.com

3 – memory types, 1 – flash memory, 2 – sram memory – Maxim Integrated DS4830 Optical Microcontroller User Manual

Page 13: 3 – utility rom, 4 – stack memory, Memory types, Flash memory, Sram memory, Utility rom, Stack memory

background image

DS4830 User’s Guide

13

Table 2-1. Register-to-Register Transfer Operations

SOURCE REGISTER

SIZE (BITS)

DESTINATION REGISTER

SIZE (BITS)

PREFIX

SET?

DESTINATION SET TO VALUE

HIGH 8 BITS

LOW 8 BITS

8

8

X

Source [7:0]

8

16

No

00h

Source [7:0]

8

16

Yes

PFX [7:0]

Source [7:0]

16

8

X

Source [7:0]

16

16

X

Source [15:8]

Source [7:0]

2.3

– Memory Types

In addition to the internal register space, the DS4830 incorporates the following memory types:

32KWords of flash memory

4KWords of utility ROM contain a debugger and program loader

1KWords of SRAM

16-level stack memory for storage of program return addresses


The memory on the DS4830 is organized according to a Harvard architecture. This means that there are separate busses
for both program and data memory. Stack memory is also separate and is accessed through a dedicated register set.

2.3.1

– Flash Memory

The DS4830 contains 32KWords (32K x 16) of flash memory. The flash memory begins at address 0000h and is
contiguous through word address 7FFFh. The flash memory can also be used for storing lookup tables and other non-
volatile data.

The incorporation of flash memory allows the contents of the flash memory to be upgraded in the field, either by the
application or by one of the bootloaders (JTAG or I

2

C). Writing to flash memory must be done indirectly by using routines

that are provided by the utility ROM. See the Utility ROM and In-System Programming sections for more details.

2.3.2

– SRAM Memory

The DS4830 contains 1KWords (1K x 16) of SRAM memory. The SRAM memory address begins at address 0000h and
is contiguous through word address 03FFh. The contents of the SRAM are indeterminate after power-on reset, but are
maintained during non-POR resets.

When using the in-circuit debugging features, the highest 19 bytes of the SRAM must be reserved for saved state storage
and working space for the debugging routines. If in-circuit debug is not used, the entire 1KWords of SRAM is available for
application use.

2.3.3

– Utility ROM

The utility ROM is a 4kWord segment of memory. The utility ROM memory address begins at word address 8000h and is
contiguous through word address 8FFFh. The utility ROM is programmed at the factory and cannot be modified. The
utility ROM provides the following system utility functions:

Reset vector (not user code reset vector)

In-system programming (bootstrap loader) over JTAG or I

2

C-compatible interfaces

In-circuit debug routines

Routines for in-application flash programming


Following any reset, the DS4830 automatically starts execution at the Reset Vector which is address 8000h in the utility
ROM. The ROM code determines whether the program execution should immediately jump to the start of application code
(flash address 0000h), or to one of the special routines mentioned. Routines within the utility ROM are firmware-
accessible and can be called as subroutines by the application software. See the Utility ROM, In-System Programming,
and In-Circuit Debug sections for more information on the routines provided by the utility ROM.

2.3.4

– Stack Memory

A 16-bit, 16-level on-chip stack provides storage for program return addresses and temporary storage of system registers.
The stack is used automatically by the processor when the CALL, RET, and RETI instructions are executed, and when an
interrupt is serviced. The stack can also be used explicitly to store and retrieve data by using the @SP- - source, @++SP
destination, or the PUSH, POP, and POPI instructions. The POPI instruction acts identically to the POP instruction except
that it additionally clears the INS bit.