8051serialpport Interrupt
8051serialpport Interrupt
• The start bit is always one bit, but the stop bit
can be one or two bits
transmitter and receiver are not transmitter and receiver are synchronized
synchronized by clock. by clock.
Start and stop bits are required to Start and stop bits are not required to
establish communication of each establish communication of each
character. character, however ,synchronization bits
are required to transfer the data block.
• RI (Receive interrupt)
When the 8051 receives data
serially ,via RxD, it gets rid of the start and stop bits
and places the byte in the SBUF register.Then it raises
the RI flag bit to indicate that a byte has been
received and should be picked up before it is lost.RI is
raised halfway through the stop bit.
Doubling Baud Rate
• There are two ways to increase the baud rate
of data transfer
1. By using a higher frequency crystal
2. By changing a bit in the PCON register
Power Mode Control (PCON) Register
• PCON register is an 8-bit SFR.
• it is byte addressable register.
SMOD: double baud rate bit. When 8051 is powered up, SMOD bit is
at zero value. To double the baud rate SMOD to be set to 1.
• PD: power down bit . Setting this bit high
activates power down mode known also sleep
mode. In this mode, the CPU puts the whole
chip to sleep by turning off the oscillator.
under this mode power consumption
becomes minimum.
• IDL : idle mode, setting this mode bit high
activates idle mode. In this mode, the
oscillator continues to provide clock to the
peripherals, but no clock is provided to the
CPU, as the CPU is under sleep state.
Note: if PD and IDL are set to high at the same
time, PD takes precedence.