
Description
9.1 Description
The MSC1210 family has three serial port interfaces: two UARTs and one SPI. This chapter will cover the UARTs, while the SPI will be covered Chapter 13, Seri- al Peripheral Interface (SPI).
One of the many powerful features of the MSC1210 is its integrated UARTs, otherwise known as universal synchronous/asynchronous receiver/transmit- ters. Just as the name implies, the UART can be configured for either synchro- nous,
The fact that the MSC1210 has integrated UARTs means that values may be very easily read from and written to the serial port. If it were not for the inte- grated UARTs, writing a byte to a serial line would be a rather tedious process requiring turning on and off one of the I/O lines in rapid succession to properly shift out each individual bit, including start bits, stop bits, and parity bits.
However, this does not have to be done. Instead, simply configure the serial ports operating modes and baud rates. Once configured, write to an SFR to write a value to the serial port or read the same SFR to read a value from the serial port. The MSC1210 automatically lets you know when it has finished sending the written character and also lets you know whenever it has received a byte, so that it can be processed. There is no need to worry about transmis- sion at the bit level, which saves quite a bit of coding and processing time.
The UART serial port is asynchronous full−duplex (transmit and receive simul- taneously) or synchronous
Note:
Although a standard 8052 has only one UART, the MSC1210 has two. This provides additional flexibility when integrating the part in a device that must communicate with more than one external serial devices. This chapter ex- plains how to use the primary UART (Serial Port 0); using the secondary UART (Serial Port 1) is identical. Just use the SFRs that refer to port 1 instead of port 0 (i.e., SCON1 instead of SCON0, etc.). Also note that the secondary UART cannot use Timer 2 as a baud rate clock, while the primary UART can.