
SFR Definitions
MPAGE (Memory Page, Address 92H): 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 93H): 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 94H): The contents of the Flash hardware configuration data pointed to by CADDR will be readable in this SFR. This SFR is
MCON (Memory Configuration, Address 95H): 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 98H,
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 99H): 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 9AH): 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 9BH): 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.