09.07.2015 Views

mitsubishi - Al Kossow's Bitsavers

mitsubishi - Al Kossow's Bitsavers

mitsubishi - Al Kossow's Bitsavers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

MITSUBISHI MICROCOMPUTERSMELPS'8·41 SLAVE MICROCOMPUTERSFUNCTIONS OF MELPS' 8 .. 41 SLAVE MICROCOMPUtERSBASIC FUNCTION BLOCKSProgram Memory (ROM)TheM5L8041A-XXXP contains a 1042-byte ROM while theM5L8042-XXXP has a built-in 2048-byte ROM. The programfor the user application is stored in this ROM. Addresses 0,3 and 7 of the ROM are reserved for special functions.Table 1 shows the meaning and functions of these specialaddresses.Table 1 Reserved, defined addressesand their meanings and functionsAddressMeaning and function0 The first instruction executed after a system reset.37The first instruction executed after an external Interrupt isaccepted,The first Instruction executed after a timer Interrupt,based on the timer/event counter,. is accepted.Data Memory (RAM)The M5L8041 A-XXXP has a built-in 64-byte (128 bytes forM5L8042-XXXP) RAM, The RAM is used for data storageand manipulation and it is divided into sections for moreefficient processing. Addresses 0 - 7 and 24 - 31 form twobanks of general-purpose registers that can be directlyaddressed, Addresses 0-7 compose bank 0 and are numberedRo- R 7 • Addresses 24-31 compose bank 1 and arealso numbered Ro- R 7 . Only one bank is active at a time.The instructions SEL RBO and SEL RB1 are used to selectthe working bank. Fig. 1 shows the division of the RAM andits mapping. The remaining sections, addresses 32 andabove, must be accessed indirectly using the generalpurposeregisters Ro or R 1 • Of course, all addresses can beindirectly accessed using the general-purpose registers Roand R 1 •A good practice to simplify programming is to reservegeneral-purpose register bank 0 for use of the main programand register bank 1 for interrupt programs. For example,.if register bank 0 (ad

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!