Texas Instruments MSC1210 User Manual

Page 44

Advertising
background image

SFR Definitions

3-8

MPAGE (Memory Page, Address 92

H

): This SFR contains the high byte of

the address to access when using the MOVX @Ri instructions. A normal 8052
requires the high byte of the address be written to P2; the MSC1210, however,
requires that the byte be written to the MPAGE SFR.

CADDR (Configuration Address Register, Address 93

H

): This SFR is used

to read the 128 bytes of Flash hardware configuration data. The contents of
the Flash configuration data at the address pointed to by this SFR will be
loaded into CDATA (see the following SFR definition).

CDATA (Configuration Data Register, Address 94

H

): The contents of the

Flash hardware configuration data pointed to by CADDR will be readable in
this SFR. This SFR is read-only. Also note that attempting to read the Flash
configuration data while executing the program from flash memory will return
invalid data. Internal Boot ROM routines or external program memory user
routines may access this memory correctly.

MCON (Memory Configuration, Address 95

H

): This SFR is used to control

the memory configuration. It determines breakpoints, as well as where the in-
ternal static RAM will be mapped to in memory.

SCON0 (Serial Control 0, Address 98

H

, Bit-Addressable): This SFR is

used to configure the behavior of the MSC1210 primary onboard serial port.
This SFR controls the baud rate of the serial port, whether the serial port is acti-
vated to receive data, and also contains flags that are set when a byte is suc-
cessfully sent or received.

Note:

To use the MSC1210 onboard serial port, it is generally necessary to initialize
the following SFRs: SCON0, TCON, and TMOD. This is because SCON0
controls the serial port, but in most cases the program must use one of the
timers to establish the serial port baud rate. In this case, it is necessary to
configure timer 1 or timer 2 by initializing TCON and TMOD, or T2CON.

SBUF0 (Serial Buffer 0, Address 99

H

): This SFR is used to send and receive

data via the primary serial port. Any value written to SBUF0 will be sent out the
serial port TXD pin. Likewise, any value which the MSC1210 receives via the
serial port RXD pin will be delivered to your program via SBUF0. In other
words, SBUF0 serves as the output port when written to and as an input port
when read from.

SPICON (SPI Control, Address 9A

H

): This SFR controls the basic configura-

tion of the SPI interface, including clocking rate, master/slave, and polarity.
Note that writing to or updating this SFR will reset the SPI interface.

SPIDATA (SPI Data, Address 9B

H

): This SFR acts in a fashion similar to

SBUF0 in that data written to this SFR will be sent out the SPI port and incom-
ing data received by the SPI port will be readable at this SFR address.

Advertising