Texas Instruments MSC1210 User Manual

Page 36

Advertising
background image

Internal RAM

2-10

2.4.4

Special Function Register (SFR) Memory

SFRs are areas of memory that control specific functionality of the MSC1210.
For example, four SFRs permit access to the 32 input/output lines (eight lines
per SFR) of the MSC1210. Another SFR allows a program to read or write to
the MSC1210 serial port. Other SFRs allow the user to set the serial baud rate,
control and access timers, and configure the MSC1210 interrupt system.

When programming, SFRs have the illusion of being internal memory. For ex-
ample, if writing the value 1 to internal RAM location 50

H

, execute the instruc-

tion:

MOV 50h,#01h

Similarly, if writing the value 1 to the MSC1210 serial port, write this value to
the SBUF SFR, which has an SFR address of 99

H

. Thus, to write the value 1

to the serial port, execute the instruction:

MOV 99h,#01h

As shown, it appears as if the SFR is part of internal memory. This is not the
case
. When using this method of memory access (it is called direct address-
ing—more on that soon), any instruction that has an address of 00

H

through

7F

H

refers to an internal RAM memory address; any instruction with an ad-

dress of 80

H

through FF

H

refers to an SFR control register.

Note:

SFRs are used to control the way the MSC1210 functions. Each SFR has a
specific purpose and format that will be discussed later. Not all addresses
above 80

H

are assigned to SFRs. However, this area may not be used as

additional RAM memory, even if a given address has not been assigned to
an SFR.

Note:

Direct access addressing cannot be used to access internal RAM addresses
80

H

through FF

H

because direct access to addresses 80

H

through FF

H

re-

fers to SFRs. The upper 128 bytes of internal RAM must be accessed using
indirect addressing, which is explained in Chapter 5, Addressing Modes.

Advertising