Intel mcs-48 manual Single Component System, Location

Models: mcs-48

1 478
Download 478 pages 26.88 Kb
Page 30
Image 30

SINGLE COMPONENT SYSTEM

There are three locations in Program Memory of special importance:

LOCATION 0

Activating the Reset line of the processor causes the first instruction to be fetched from location O.

LOCATION 3

Activating the Interrupt input line of the processor (if interrupt is enabled) causes a jump to subroutine at location 3.

LOCATION 7

A timer/counter interrupt resulting from timer/counter overflow (if enabled) causes a jump to subroutine at location 7.

Therefore, the first instruction to be executed after initialization is stored in location 0, the first word of an external interrupt service subroutine is stored in location 3, and the first word of a timer/counter service routine is stored in location 7. Program memory can be used to store constants as well as program instructions. Instructions such as MOVP and MOVP3 allow easy access to data "lookup" tables.

- 0

2048~ , SELMai 2047~TSELMBO

1024 --""""""

1023

..r--LDCATION 7 - TIMER INTERRUPT VECTORS PROGRAM HERE

..r---LOCATION 3 - EXTERNAL INTERRUPT VECTORS

PROGRAM HERE

RESET VECTORS o 716151413121110 I--PROGRAM HERE

ADDRESS

MCS-48™PROGRAM MEMORY MAP

Data Memory

Resident data memory is organized as 64 or

128words 8-bits wide. All locations are indirectly addressable through either of two RAM Pointer Registers which reside at address 0 and 1 of the register array. In addition, the first 8 locations (0-7)of the array are designated as working registers and are directly addressable by several instructions. Since these registers are more easily addressed, they are usually used to store frequently accessed intermediate results. The DJNZ instruction makes very efficient use of the working registers as pro- gram loop counters by allowing the programmer to decrement and test the register in a single instruction.

By executing a Register Bank Switch instruc- tion (SEL RB) RAM locations 24-31 are designated as the working registers in place of locations 0-7and are then directly address- able. This second bank of working registers may be used as an extension of the first bank or reserved for use during interrupt service

63

(128 )

USER RAM

3h8

(96.8)

32

 

 

I

31

BANK I

 

 

 

 

WORKING

 

 

REGISTERS

DIRECTLY

 

ADDRESSABLE

 

 

 

 

ax8

 

WHEN BANK 1

 

- - - -RT'- - - -

IS SELECTED

2.

-.J

- - - -ROo -

- - -

23

 

 

 

 

B LEVEL STACK

ADDRESSED

 

OR

 

INDIRECTLY

 

USER RAM

THROUGH

 

16 x 8

 

Rl OR RO

 

 

(RO'OR Rl')

 

BANKO

 

I

 

WORKING

 

 

REGISTERS

DIRECTLY

 

ADDRESSABLE

 

 

 

 

ax8

 

WHEN BANK 0

 

 

 

 

r----------

IS SELECTED

 

----~-

----

 

IN ADDITION RO OR Rl (RO'OR Rl')MAY

BE USED TO ADDRESS 268 WORDS OF

EXTERNAL RAM.

( )8049 only

DATA MEMORY MAP

2-3

Page 30
Image 30
Intel mcs-48 manual Single Component System, Location