Module 5
Module 5
1
Computers transfer data in two ways:
Serial
To transfer to a device located many meters away,
the serial method is used
The data is sent one bit at a time
The start bit is always a 0 (low) & the stop bit(s) is 1 (high)
The baud rate and bps are the same, and we use the terms
inter changeably
The standard was set long before the advent of the TTL
logic family, its input and output voltage levels are not TTL
compatible
RI (ring indicator)
An output from the modem and an input to a PC indicates that the
telephone is ringing
It goes on and off in synchronous with the ringing sound
On transmit, the 9th data bit is actually the TB8 bit of the SCON
register. This bit usually has a function of parity bit. On receive,
the 9th data bit goes into the RB8 bit of the same register
(SCON).
Mode 3 is the same as Mode 2 in all respects except the baud rate.
The baud rate in Mode 3 is variable.
MODULE - 5 ECE3003–Microcontroller and Applications 27
MODULE - 5 ECE3003–Microcontroller and Applications 28
REN (receive enable):
When it is high, it allows 8051 to receive data on RxD pin, If
low, the receiver is disable
TI (transmit interrupt):
When 8051 finishes the transfer of 8-bit character It raises
TI flag to indicate that it is ready to transfer another byte
RI (receive interrupt):
When 8051 receives data serially via RxD, it raises the RI flag
bit to indicate that a byte has been received and should be
picked up before it is lost
MODULE - 5 ECE3003–Microcontroller and Applications 29
MODULE - 5 ECE3003–Microcontroller and Applications 30
MODULE - 5 ECE3003–Microcontroller and Applications 31
MODULE - 5 ECE3003–Microcontroller and Applications 32
MODULE - 5 ECE3003–Microcontroller and Applications 33
MODULE - 5 ECE3003–Microcontroller and Applications 34
MODULE - 5 ECE3003–Microcontroller and Applications 35
MODULE - 5 ECE3003–Microcontroller and Applications 36
MODULE - 5 ECE3003–Microcontroller and Applications 37
MODULE - 5 ECE3003–Microcontroller and Applications 38
MODULE - 5 ECE3003–Microcontroller and Applications 39
MODULE - 5 ECE3003–Microcontroller and Applications 40
MODULE - 5 ECE3003–Microcontroller and Applications 41
MODULE - 5 ECE3003–Microcontroller and Applications 42
Computers transfer data in two ways:
Parallel
Often 8 or more lines (wire conductors) are used to
transfer data to a device that is only a few feet
away
Serial
To transfer to a device located many meters away,
the serial method is used
2. It also saves the current status of all the interrupts internally (i.e: not
on the stack)
Solution:
If these three interrupts are activated at the same time, they
are latched and kept internally.
Then the 8051 checks all five interrupts according to the
sequence listed above Table.
If any is activated, it services it in sequence.
Therefore, when the above three interrupts are activated, IE0
(external interrupt 0) is serviced first, then timer 0 (TF0), and
finally IE1 (external interrupt 1)
MODULE - 5 ECE3003–Microcontroller and Applications 71
We can alter the sequence of interrupt priority by assigning
a higher priority to any one of the interrupts by
programming a register called IP (interrupt priority)