
Preliminary W79E217A Data Sheet
Publication Release Date: December 14, 2007
- 142 -
Revision A3.0
16.4 Mode 3
This mode is the same as Mode 2, except that the baud rate is programmable. The program must
select the mode and baud rate in SCON before any communication can take place. Timer 1 should be
initialized if Mode 1 or Mode 3 will be used.
Figure 16-4: Serial Port Mode 3
SM0
SM1
MODE
TYPE
BAUD
CLOCK
FRAME
SIZE
START
BIT
STOP
BIT
9TH BIT
FUNCTION
0
0
0
Synch.
4 or 12 OSC
8 bits
No
No
None
0
1
1
Asynch.
Timer 1 or 2
10 bits
1
1
None
1
0
2
Asynch.
32 or 64 OSC
11 bits
1
1
0, 1
1
1
3
Asynch.
Timer 1 or 2
11 bits
1
1
0, 1
Table 16-1: Serial Ports Modes
16.5 Framing Error Detection
A frame error occurs when a valid stop bit is not detected. This could indicate incorrect serial data
communication. Typically, a frame error is due to noise or contention on the serial communication line.
The W79E217 has the ability to detect framing errors and set a flag that can be checked by software.
The frame error FE (FE_1) bit is located in SCON.7. This bit is SM0 in the standard 8051/52 family,
but, in the W79E217, it serves a dual function and is called SM0/FE. There are actually two separate
flags, SM0 and FE. The flag that is actually accessed as SCON.7 is determined by SMOD0 (PCON.6).
When SMOD0 is set to 1, the FE flag is accessed. When SMOD0 is set to 0, the SM0 flag is
accessed.