Microcontroller 8051 Family
In our day to day life the role of micro-controllers has been immense. They are
used in a variety of applications ranging from home appliances, FAX machines,
Video games, Camera, Exercise equipment, Cellular phones musical Instruments
to Computers, engine control, aeronautics, security systems and the list goes on.
Microcontroller versus Microprocessors
What is the difference between a microprocessor and microcontroller? The
microprocessors (such as 8086, 80286, 68000 etc.) contain no RAM, no ROM and
no I/O ports on the chip itself. For this reason they are referred as general- purpose
microprocessors. A system designer using general- purpose microprocessor must
add external RAM, ROM, I/O ports and timers to make them functional. Although
the addition of external RAM, ROM, and I/O ports make the system bulkier and
much more expensive, they have the advantage of versatility such that the designer
can decide on the amount of RAM, ROM and I/o ports needed to fit the task at
hand. This is the not the case with microcontrollers. A microcontroller has a CPU
(a microprocessor) in addition to the fixed amount of RAM, ROM, I/O ports, and
timers are all embedded together on the chip: therefore, the designer cannot add
any external memory, I/O, or timer to it. The fixed amount of on chip RAM, ROM,
and number of I/O ports in microcontrollers make them ideal for many applications
in which cost and space are critical. In many applications, for example a TV
remote control, there is no need for the computing power of a 486 or even a 8086
microprocessor. In many applications, the space it takes, the power it consumes,
and the price per unit are much more critical considerations than the computing
power. These applications most often require some I/O operations to read signals
and turn on and off certain bits. It is interesting to know that some
microcontroller’s manufactures have gone as far as integrating an ADC and other
peripherals into the microcontrollers.
Microcontrollers for Embedded Systems
In the literature discussing microprocessors, we often see a term embedded system.
Microprocessors and microcontrollers are widely used in embedded system
products. An embedded product uses a microprocessor (or microcontroller) to do
one task and one task only. A printer is an example of embedded system since the
processor inside it performs one task only: namely, get data and print it.
Contrasting this with a IBM PC which can be used for a number of applications
such as word processor, print server, network server, video game player, or internet
terminal. Software for a variety of applications can be loaded and run. Of course
the reason a PC can perform myriad tasks is that it has RAM memory and an
operating system that loads the application software into RAM and lets the CPU
run it. In an embedded system, there is only one application software that is burned
into ROM. A PC contains or is connected to various embedded products such as
the keyboard, printer, modem, disk controller, sound card, CD-ROM drive, mouse
and so on. Each one of these peripherals has a microcontroller inside it that
performs only one task. For example, inside every mouse there is a microcontroller
to perform the task of finding the mouse position and sending it to the PC.
Although microcontrollers are the preferred choice for many embedded systems,
there are times that a microcontroller is inadequate for the task. For this reason, in
many years the manufacturers for general-purpose microprocessors have targeted
their microprocessor for the high end of the embedded market.
A brief history of 8051 Family
In 1981, Intel Corporation introduced an 8-bit microcontroller called the 8051.
This microcontroller had 128 bytes of RAM, 4K bytes of on-chip ROM, two
timers, one serial port, and four ports (8-bit) all on a single chip. The 8051 is an 8-
bit processor, meaning the CPU can work on only 8- bit pieces to be processed by
the CPU. The 8051 has a total of four I/O ports, each 8- bit wide. Although 8051
can have a maximum of 64K bytes of on-chip ROM, many manufacturers put only
4K bytes on the chip.
The 8051 became widely popular after Intel allowed other manufacturers to make
any flavor of the 8051 they please with the condition that they remain code
compatible with the 8051. This has led to many versions of the 8051 with different
speeds and amount of on-chip ROM marketed by more than half a dozen
manufacturers. It is important to know that although there are different flavors of
the 8051, they are all compatible with the original 8051 as far as the instructions
are concerned. This means that if you write your program for one, it will run on
any one of them regardless of the manufacturer. The major 8051 manufacturers are
Intel, Atmel, Dallas Semiconductors, Philips Corporation, Infineon.
8051 microcontroller
The 8051 is the original member of the 8051 family. Intel refers to it as MCS-51.
Other members of the 8051 family
There are two other members in the 8051 family of microcontrollers. They are the
8052 and the 8031.
Comparison of 8051 Family Members
Feature 8051 8052 8031
ROM (On Chip) 4K 8K 0K
RAM (Bytes) 128 256 128
Timers 2 3 2
I/O Pins 32 32 32
Serial Port 1 1 1
Interrupt Sources 6 8 6
Versions of 8051 from Atmel
Part Number ROM RAM I/O Pins Timers Interrupts Vcc
AT89C51 4K 128 32 2 6 5V
AT89LV51 4K 128 32 2 6 3V
AT89C1051 1K 64 15 1 3 3V
AT89C2051 2K 128 15 2 6 3V
AT89C52 8K 128 32 3 8 5V
AT89LV52 8K 128 32 3 8 3V
AT89C51 from ATMEL Corporation:
This popular 8051 chip has on-chip ROM in the form of flash memory. This is
ideal for fast development since flash memory can be erased in seconds compared
to twenty minutes or more needed for the earlier versions of the 8051. To use the
AT89C51 to develop a microcontroller-based system requires a ROM burner that
supports flash memory: However, a ROM eraser is not needed. Notice that in flash
memory you must erase the entire contents of ROM in order to program it again.
The PROM burner does this erasing of flash itself and this is why a separate burner
is not needed. To eliminate the need for a PROM burner Atmel is working on a
version of the AT89C51 that can be programmed by the serial COM port of the
PC.
Atmel Microcontroller AT89C51
Hardware features
40 pin IC
4 Kbytes of Flash
128 Bytes of RAM
32 I/O lines
Two16-Bit Timer/Counters
Two-Level Interrupt Architecture
Full Duplex Serial Port
On Chip Oscillator and Clock Circuitry
Software features
Bit Manipulations
Single Instruction Manipulation
Separate Program And Data Memory
4 Bank Of Temporary Registers
Direct, Indirect, Register and Relative Addressing.
In addition, the AT89C51 is designed with static logic for operation down to zero
frequency and supports two software selectable power saving modes. The Idle
Mode stops the CPU while allowing the RAM, timer/counters, serial port and
interrupt system to continue functioning. The Power down Mode saves the RAM
contents but freezes the oscillator disabling all other chip functions until the next
hardware reset.
The Atmel Flash devices are ideal for developing, since they can be reprogrammed
easy and fast. If we need more code space for our application, particularly for
developing 89Cxx projects with C language. Atmel offers a broad range of
microcontrollers based on the 8051 architecture, with on-chip Flash program
memory.
Internal Architecture of AT89C51
Pin description
The 89C51 have a total of 40 pins that are dedicated for various functions such as
I/O, RD, WR, address and interrupts. Out of 40 pins, a total of 32 pins are set aside
for the four ports P0, P1, P2, and P3, where each port takes 8 pins. The rest of the
pins are designated as Vcc, GND, XTAL1, XTAL, RST, EA, and PSEN. All these
pins except PSEN and ALE are used by all members of the 8051 and 8031
families. In other words, they must be connected in order for the system to work,
regardless of whether the microcontroller is of the 8051 or the 8031 family. The
other two pins, PSEN and ALE are used mainly in 8031 based systems.
Vcc
Pin 40 provides supply voltage to the chip. The voltage source is +5V.
GND
Pin 20 is the ground.
Oscillator Characteristics
XTAL1 and XTAL2 are the input and output, respectively, of an inverting
amplifier which can be configured for use as an on-chip oscillator, as shown in
Figure. Either a quartz crystal or ceramic resonator may be used. To drive the
device from an external clock source, XTAL2 should be left unconnected while
XTAL1 is driven as shown in Figure.
Oscillator Connections
It must be noted that there are various speeds of the 8051 family. Speed refers to
the maximum oscillator frequency connected to the XTAL. For example, a 12
MHz chip must be connected to a crystal with 12 MHz frequency or less.
Likewise, a 20 MHz microcontroller requires a crystal frequency of no more than
20 MHZ. When the 8051 is connected to a crystal oscillator and is powered up, we
can observe the frequency on the XTAL2 pin using oscilloscope.
RST
Pin 9 is the reset pin. It is an input and is active high (normally low). Upon
applying a high pulse to this pin, the microcontroller will reset and terminate all
activities. This is often referred to as a power –on reset. Activating a power-on
reset will cause all values in the registers to be lost. Notice that the value of
Program Counter is 0000 upon reset, forcing the CPU to fetch the first code from
ROM memory location 0000. This means that we must place the first line of source
code in ROM location 0000 that is where the CPU wakes up and expects to find
the first instruction. In order to RESET input to be effective, it must have a
minimum duration of 2 machine cycles. In other words, the high pulse must be
high for a minimum of 2 machine cycles before it is allowed to go low.
EA
All the 8051 family members come with on-chip ROM to store programs. In such
cases, the EA pin is connected to the Vcc. For family members such as 8031 and
8032 in which there is no on-chip ROM, code is stored on an external ROM and is
fetched by the 8031/32. Therefore for the 8031 the EA pin must be connected to
ground to indicate that the code is stored externally. EA, which stands for “external
access,” is pin number 31 in the DIP packages. It is input pin and must be
connected to either Vcc or GND. In other words, it cannot be left unconnected.
PSEN
This is an output pin. PSEN stands for “program store enable.” It is the read strobe
to external program memory. When the microcontroller is executing from external
memory, PSEN is activated twice each machine cycle.
ALE
ALE (Address latch enable) is an output pin and is active high. When connecting a
microcontroller to external memory, port 0 provides both address and data. In other
words the microcontroller multiplexes address and data through port 0 to save pins.
The ALE pin is used for de-multiplexing the address and data by connecting to the
G pin of the 74LS373 chip.
I/O port pins and their functions
The four ports P0, P1, P2, and P3 each use 8 pins, making them 8-bit ports. All the
ports upon RESET are configured as output, ready to be used as output ports. To
use any of these as input port, it must be programmed.
Port 0
Port 0 occupies a total of 8 pins (pins 32 to 39). It can be used for input or output.
To use the pins of port 0 as both input and output ports, each pin must be
connected externally to a 10K-ohm pull-up resistor. This is due to fact that port 0 is
an open drain, unlike P1, P2 and P3. With external pull-up resistors connected
upon reset, port 0 is configured as output port. In order to make port 0 an input
port, the port must be programmed by writing 1 to all the bits of it. Port 0 is also
designated as AD0-AD7, allowing it to be used for both data and address. When
connecting a microcontroller to an external memory, port 0 provides both address
and data. The microcontroller multiplexes address and data through port 0 to save
pins. ALE indicates if P0 has address or data. When ALE=0, it provides data D0-
D7, but when ALE=1 it has address A0-A7. Therefore, ALE is used for de-
multiplexing address and data with the help of latch 74LS373.
Port 1
Port 1 occupies a total of 8 pins (pins 1 to 8). It can be used as input or output. In
contrast to port 0, this port does not require pull-up resistors since it has already
pull-up resistors internally. Upon reset, port 1 is configures as an output port.
Similar to port 0, port 1 can be used as an input port by writing 1 to all its bits.
Port 2
Port 2 occupies a total of 8 pins (pins 21 to 28). It can be used as input or output.
Just like P1, port 2 does not need any pull-up resistors since it has pull-up resistors
internally. Upon reset port 2 is configured as output port. To make port 2 as input
port, it must be programmed as such by writing 1s to it.
Port 3
Port 3 occupies a total of 8 pins (pins 10 to 17). It can be used as input or output.
P3 does not need any pull-up resistors, the same as P1 and P2 did not. Although
port 3 is configured as output port upon reset, this is not the way it is most
commonly used. Port 3 has an additional function of providing some extremely
important signals such as interrupts. Some of the alternate functions of P3 are
listed below:
P3.0 RXD (Serial input)
P3.1 TXD (Serial output)
P3.2 INT0 (External interrupt 0)
P3.3 INT1 (External interrupt 1)
P3.4 T0 (Timer 0 external input)
P3.5 T1 (Timer 1 external input)
P3.6 WR (External memory write strobe)
P3.7 RD (External memory read strobe)
Memory Space Allocation
Internal ROM
The 89C51 has 4K bytes of on-chip ROM. This 4K bytes ROM memory has
memory addresses of 0000 to 0FFFh. Program addresses higher than 0FFFh, which
exceed the internal ROM capacity, will cause the microcontroller to automatically
fetch code bytes from external memory. Code bytes can also be fetched exclusively
from an external memory, addresses 0000h to FFFFh, by connecting the external
access pin to ground. The program counter doesn’t care where the code is: the
circuit designer decides whether the code is found totally in internal ROM, totally
in external ROM or in a combination of internal and external ROM.
Internal RAM
The 128 bytes of RAM inside the 8051 are assigned addresses 00 to 7Fh. These
128 bytes can be divided into three different groups as follows:
1. A total of 32 bytes from locations 00 to 1Fh are set aside for register
banks and the stack.
2. A total of 16 bytes from locations 20h to 2Fh are set aside for bit
addressable read/write memory and instructions.
A total of 80 bytes from locations 30h to 7Fh are used for read and write storage,
or what is normally called a scratch pad. These 80 locations of RAM are widely
used for the purpose of storing data and parameters by 8051 programmers.
Serial Communication
Data Communication Concepts
Within a microcomputer data is transferred in parallel, because that is the fastest
way to do it. For transferring data over long distances, however, parallel data
transmission requires too many wires. Therefore, data to be sent long distances is
usually converted from parallel form to serial form so that it can be sent on a single
wire or pair of wires. Serial data received from a distant source is converted to
parallel form so that it can be easily transferred on the microcomputer buses.
Serial Interface
Basic concepts concerning the serial communication can be classified into
categories below:
Interfacing requirements
Transmission format
Error check in data communication
Standards in serial I/O
Interfacing Requirements:
The serial interface requirement is very much similar to parallel interface
requirement. Computer identifies the peripheral through port address and enable if
using the read and write signals. The primary difference between the parallel I/O
and serial I/O is the number of lines used for data transfer. Parallel I/O requires the
entire bus while the serial I/O requires only one or pair of data lines for
communication.
Transmission Format:
Transmission format for communication is concerned with the issues such as
synchronization, direction of data flow, speed, errors and medium of transmission.
Serial data can be sent synchronously or asynchronously.
Serial Transmission Methods
Serial Communication, like any data transfer, requires coordination between the
sender and receiver. For example, when to start the transmission and when to end
it, when one particular bit or byte ends and another begins, when the receiver's
capacity has been exceeded, and so on. A protocol defines the specific methods of
coordinating transmission between a sender and receiver.
Two serial transmission methods are used that correct serial bit errors. The first
one is synchronous communication, the sending and receiving ends of the
communication are synchronized using a clock that precisely times the period
separating each bit. By checking the clock the receiving end can determine if a bit
is missing or if an extra bit (usually electrically induced) has been introduced in the
stream. Here is an example of this method of communication, lets say that on a
conveyor belt a product is passing through a sensing device every 5 seconds, if the
sensing device senses something in between the 5 second lap it assumes that
whatever is passing is a foreign object of some sorts and sounds an alarm, if on the
5 second lap nothing goes by it assumes that the product is missing and sounds an
alarm. One important aspect of this method is that if either end of the
communication loses its clock signal, the communication is terminated.
The alternative method (used in PCs) is to add markers within the bit stream to
help track each data bit. By introducing a start bit which indicates the start of a
short data stream, the position of each bit can be determined by timing the bits at
regular intervals, by sending start bits in front of each 8 bit streams, the two
systems don't have to be synchronized by a clock signal, the only important issue is
that both systems must be set at the same port speed. When the receiving end of the
communication receives the start bit it starts a short term timer. By keeping
streams short, there's not enough time for the timer to get out of sync. This method
is known as asynchronous communication because the sending and receiving end
of the communication are not precisely synchronized by the means of a signal line.
Each stream of bits are broke up in 5 to 8 bits called words. Usually in the PC
environment you will find 7 or 8 bit words, the first is to accommodate all upper
and lower case text characters in ASCII codes (the 127characters) the latter one is
used to exactly correspond to one byte. By convention, the least significant bit of
the word is sent first and the most significant bit is sent last. When communicating
the sender encodes the each word by adding a start bit in front and 1 or 2 stop bits
at the end. Sometimes it will add a parity bit between the last bit of the word and
the first stop bit, this used as a data integrity check.
This is often referred to as a data frame. Five different parity bits can be used, the
mark parity bit is always set at a logical 1, the space parity bit is always set at a
logical 0, the even parity bit is set to logical 1 by counting the number of bits in the
word and determining if the result is even, in the odd parity bit, the parity bit is set
to logical 1 if the result is odd. The later two methods offer a means of detecting
bit level transmission errors. Note that you don't have to use parity bits, thus
eliminating 1 bit in each frame, this is often referred to as non parity bit frame.
Asynchronous Serial Data Frame (8E1)
In the example above you can see how the data frame is composed of and
synchronized with the clock signal. This example uses an 8 bit word with even
parity and 1 stop bit also referred to as an 8E1 setting.
Bit Rates
Another important part of every asynchronous serial signal is the bit rate at which
the data is transmitted. The rates at which the data is sent is based on the minimum
speed of 300 bps (bits per second), you may find some slower speeds of 50, 100
and 150 bps, but these are not used in today’s technologies. Faster speeds are all
based on the 300 bps rate, you merely double the preceding rate, so the rates are as
follows, 600, 1200, 2400, 4800, 9600, 19200 and 38400 which is the fastest speed
supported by today’s BIOS’s.
Asynchronous Serial Communication:
This section provides an overview of the protocol that governs the lowest level of
data transmission--how serialized bits are sent over a single electrical line. This
standard rests on more than a century of evolution in teleprinter technology.
When a sender is connected to a receiver over an electrical connecting line, there is
an initial state in which communication has not yet begun, called the idle or mark
state. Because older electromechanical devices operate more reliably with current
continually passing through them, the mark state employs a positive voltage level.
Changing the state of the line by shifting the voltage to a negative value is called a
space. Once this change has occurred, the receiver interprets a negative voltage
level as a 0 bit, and a positive voltage level as a 1 bit. These transitions are shown
in figure. The change from mark to space is known as the start bit, and this triggers
the synchronization necessary for asynchronous serial transmission. The start bit
delineates the beginning of the transmission unit defined as a character frame. The
receiver then samples the voltage level at periodic intervals known as the bit time,
to determine whether a 0-bit or a 1-bit is present on the line.
The Format of Serialized Bits [Missing Image]
The bit time is expressed in samples per second, known as baud (in honor of
telecommunication pioneer Emile Baudot). This sampling rate must be agreed
upon by sender and receiver prior to start of transmission in order for a successful
transfer to occur. Common values for the sampling rate are 1200 baud and 2400
baud. In the case where one sampling interval can signal a single bit, a baud rate of
1200 results in a transfer rate of 1200 bits per second (bps). Note that because
modern protocols can express more than one bit value within the sampling interval,
the baud rate and the data rate (bps) are not always identical.
Prior to transmission, the sender and receiver agree on a serial data format; that is,
how many bits of data constitute a character frame, and what happens after those
bits are sent. The Serial Driver supports frames of 5, 6, 7, or 8 bits in length.
Character frames of 7 or 8 data bits are commonly used for transmitting ASCII
characters.
After the data bits in the frame are sent, the sender can optionally transmit a parity
bit for error-checking. There are various parity schemes, which the sender and
receiver must agree upon prior to transmission. In odd parity, a bit is sent so that
the entire frame always contains an odd number of 1 bit. Conversely, in even
parity, the parity bit results in an even number of 1 bit. No parity means that no
additional bit is sent. Other less-used parity schemes include mark parity, in which
the extra bit is always 1, and space parity, in which its value is always 0. Using
parity bits for error checking, regardless of the scheme, is now considered a
rudimentary approach to error detection. Most communication systems employ
more reliable techniques for error detection and correction.
To signify the end of the character frame, the sender places the line back to the
mark state (positive voltage) for a minimum specified time interval. This interval
has one of several possible values: 1 bit time, 2 bit times, or 1-1/2 bit times. This
signal is known as the stop bit, and returns the transmission line back to idle status.
Electrical lines are always subject to environmental perturbations known as noise.
This noise can cause errors in transmission, by altering voltage levels so that a bit
is reversed (flipped), shortened (dropped), or lengthened (added). When this
occurs, the ability of the receiver to distinguish a character frame may be affected,
resulting in a framing error.
The break signal is a special signal that falls outside the character frame. The
break signal occurs when the line is switched from mark (positive voltage) to space
(negative voltage) and held there for longer than a character frame. The break
signal resembles an ASCII NUL character (a string of 0-bits), but exists at a lower
level than the ASCII encoding scheme (which governs the encoding of information
within the character frame
Error Check In Data Communication
During transmission, various types of errors can occur. These errors need to be
checked, therefore, additional information for error checking is sent during
transmission the receiver can check the received data against the error check
information, and if the error is detected, the receiver can request there
retransmission of that data segment. Three methods generally used for this purpose
are parity check, checksum and redundancy check
Standard in Serial I/O
The serial I/O technique is commonly used to interface terminals, printers etc. a
standard is normally defined by a professional organization (such as IEEE). A
standard may include such items as assignment of pin positions for signals, voltage
levels, speed of data transfer, length of cable and mechanical specifications. When
data are transmitted as voltage, the commonly used standard is known as RS232C.
It is defined as reference to data terminal equipment (DTE) and data
communication equipment (DCE). The rate of transmission is RS232C is restricted
to a maximum of 20k baud and a distance of 50 feet.
8051 Serial Communication Programming
Baud Rate in The 8051
The 8051 transfers and receives data serially at many different baud rates. The
baud rate in the 8051 is programmable. This is done with the help of timer 1
Frequency of XTAL = 11.0592 MHZ
Machine cycle frequency = 11.0592/12= 921.6 KHZ.
The 8051’s serial communication UART circuitry divides the machine cycle
frequency of 921.6 kHz by 32 once more before it is used by timer1 to set the baud
rate .result is 28,800 HZ. This value is used to find the timer 1 value to set the bad
rate. When timer 1 is used to set the baud rate it must be programmed in mode 2,
that is 8 bit, auto-reload.
Counter/Timer Programming
The 8051 has two timers/counters. They can be used either as timers to generate a
time delay or as counters to count events happening outside the microcontroller.
These timers are, timer 0 and timer 1.both are 16 bits wide, and each 16 bit timer is
accessed as two separate registers of low byte and high byte.
Timer 0 Register
The low byte register is called TL0 and the high byte register is referred to as TH0.
For e.g.: the instruction “MOV TL0, # 4FH”moves the value 4FH in to TL0, the
low byte of timer 0.
D1 D1 D1 D1 D1 D1 D D D D D D D D D D
5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
Timer 1 Register
Timer 1 is also 16 bits, and it is split in to TL1 & TH1.
D1 D1 D1 D1 D1 D1 D D D D D D D D D D
5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
TH1 TL1
TMOD (Timer Mode) Register (20h)
Both timers 0 & 1 use the same register, called TMOD,to set the various timer
operation modes.TMOD is an 8-bit register in which the lower 4 bits are set aside
for timer 0 and the upper 4 bits are set aside for timer 1. In each case, the lower 2
bits are used to set the timer mode and upper 2 bits to specify the operation.
(MSB) (LSB)
GATE C/T M1 M0 GATE C/T M1 M0
.Timer 1 Timer 0
M1 M0 Mode Operating Mode
0 0 M0 13-Bit Timer Mode
0 1 M1 16-Bit Timer Mode
1 0 M2 8-Bit auto reload
1 1 M3 Split timer mode
C/T = 0 for Timer
= 1 for Counter
GATE = 0 When on/off is done by software
= 1 when additional hardware is needed for on/off.
SBUF Register
SBUF is an 8 bit register used solely for special communication in the 8051.for a
byte of data to be transferred via the TxD line; it must be placed in the SBUF
register. Similarly, SBUF holds the byte of data when it is received by the 8051’s
RxD line.SBUF can be accessed like any other register in the 8051.
SCON (Serial Control) Register (50 H)
The SCON register is an 8 bit register used to program the start bit, stop bit, and
data bits of data framing, among other things. The following describes various bits
of the SCON register.
SM0 SM1 SM2 REN TB8 RB8 T1 R1
SM0 Serial port mode spécifier
SM1 Serial port mode spécifier
SM2 Used for multiprocessor communication
REN Set/cleared by software to enable/disable reception
TB8 Not widely used
RB8 Not widely used
T1 Transmit interrupt flag
R1 Receive interrupt flag
SM1 SM0 Mode Operating Mode
0 0 Serial Mode 0 8-bit fixed Baud rate mode
0 1 Serial Mode 1, 8 bit data, 1 stop bit, 1 8-bit variable Baud rate
start bit mode
1 0 Serial Mode 2 9-bit fixed Baud rate mode
1 1 Serial Mode 3 9-bit variable Baud rate
mode