Date post: | 19-Aug-2014 |
Category: |
Engineering |
Upload: | sandesh-agrawal |
View: | 235 times |
Download: | 2 times |
Universal Serial Communication Interface
(USCI)
Presentation By: Mohit Panchal
Guided by:Prof. S.V. CHARATEDR. S.K. JAIN
DATA COMMUNICATION TYPES SYNCHRONOUS AND ASYNCHRONOUS
TRANSMISSION SERIAL COMMUNICATION IMPLEMENTATION TERMS USED IN SERIAL COMMUNICATION UART USART USB BIBLIOGRAPHY
CONTENTS
1. Parallel2. Serial (i) Synchronous
(ii) Asynchronous
DATA COMMUNICATION TYPES
Serial versus Parallel Data Transfer
Serial and parallel
FIG.1
In parallel transmission, all the bits of data are transmitted simultaneously on separate communication lines.
Parallel transmission is used for short distance communication.
In order to transmit n bit , n wires or lines are used.
More costly. Faster than serial transmission. Data can be transmitted in less time.
PARALLEL COMMUNICATION
Many lines of communication, synchronized bursts of data
Parallel Communication
Time
Transmitter Receiver
FIG.2
Definition of Serial Communication
Bit by bit transmission of information in seriesA B
Travels in series
FIG.3
One line of communication, long string of data
Serial Communication
Time
Signal
In serial transmission , the various bits of data are transmitted serially one after the other.
It requires only one communication line rather than n lines to transmit data from sender to receiver.
Thus all the bits of data are transmitted on single lines in serial fashion. Less costly. Long distance transmission.
SERIAL TRANSMISSION
Data sent at one time multiple bytes. Start and stop bit not used. Gap between data units not present. Data transmission speed fast. Cost high. Transfer of data between two computer. Synchronization between sender and
receiver required.
SYNCHRONOUS TRANSMISSION
Sends only one character at a time (one byte of data at a time)
Synchronize two devices using Start Bit and Stop Bit.
Start bit refers to the start of the data. Usually 0 is used for start bit.
Stop bit indicates the end of data.more than one bit can be used for end.
ASYNCHORONOUS TRANSMISSION
Popular implementation is known as the RS-232 serial connection found in microcomputers
Newer type of serial connections◦ Universal Serial Bus (USB)◦ IEEE 1394 serial connection that is also dubbed as
the Fire Wire connection
Serial Communication Implementation
The most popular standard Conforming serial ports
◦ Micro◦ Minis and mainframes
Sometimes these ports are also known as the asynchronous ports
It is also possible to conduct synchronous transmission through these ports as well
RS-232C Serial Standard
Purpose of the Serial Ports
Seria
l Int
erfa
ceParallel DigitalData
Serial Digital DataOutIn
Expansion Bus
FIG.4
Standard Serial Ports on a Computer
FIG.5
Serial Port Identification
Source: Black BoxFIG.6
Big Endian- MSB first, less significant bytes in descending order
Little Endian- MSB last, data in ascending order
Endian type determines how the data is interpreted, and how it should be sent in both serial and parallel communication.
Endianness, how it relates to communication
As cable lengths increase, signal quality degrades
As data transfer speed increases, signal quality degrades much faster for increasing length
Cable Length / Data Transfer Rate Relation
TABLE-1
Number of possible on/off switches per second, based on the clock.
Faster clock, faster bit rate Standard bit rates
Bit Rate
Some typical bit rates
FIG.7
Number of actual data bits per second Different from Bit Rate because of required
setup bits per word transmitted.
Baud Rate
BAUD register, sets speed◦ TCLR : Clear baud rate timing chain bit◦ SCP : Baud rate pre-scale select bits◦ RCKB : Baud rate clock test bit◦ SCR : SCI baud rate select bits
BAUD
01234567
Read: 0 0Write: TCLR RCKB SCR1 SCR0SCP00 SCP1 SCR2
◦ SCCR1 : Serial Communication Interface Control Register 1
◦ R8 : Receive data bit 8◦ T8 : Transmit data bit 8◦ M : SCI character length bit◦ WAKE : Wakeup method select bit◦ Bits 0 - 2 & 5 are not used (always 0)
SCCR1
01234567
Read:Write:
R8T8 M Wake
0 0 0 0
SCCR2 : Serial Communication Control Register 2 TIE : Transmit interrupt enable bitTCIE : Transmit complete interrupt enable bitRIE : Receive interrupt enable bitILIE : Idle-line interrupt enable bitTE : Transmit enable bitRE : Receive enable bitRWU : Receiver wakeup bitSBK : Send break bit
SCCR2
01234567
Read:Write:
RWU SBKTIE TETCIE RIE ILIE RE
SCI status register◦ TDRE : Transmit data register empty bit◦ TC : Transmit complete bit◦ RDRF : Receive data register full bit◦ IDLE : Idle-line detect bit◦ OR : Overrun error bit◦ NF : Noise flag◦ FE : Framing Error bit◦ Bit 0 is not used (always 0)
SCSR
01234567
Read:Write:
TDRE TC RDRF IDLE OR NF FE 0
SCI data register◦ Two separate registers, same address◦ Used to Read the Received data◦ Used to Write the Transmit data◦ R7 - R0 – Read bits◦ T7 - T0 – Write bits
SCDR
01234567
Read:Write:
R7 R6 R5 R4 R3 R2 R1 R0T7 T6 T5 T4 T3 T2 T1 T0
Universal Asynchronous Receiver/Transmitter (UART)
UARTs
UART (pronounced “You Art”) is an industry acronym that stands for Universal Asynchronous Receiver Transmitter. It is the interface circuitry between the microprocessor and the serial port. This circuitry is built in to the 8051 microcontroller.
The UART is responsible for breaking apart bytes of data and transmitting it one bit at a time (i.e. serially). Likewise, the UART receives serialized bits and converts them back into bytes. In practice, it’s a little more complicated, but that’s the basic idea.
7-28
UART - Transmitter Transmitter (Tx) - converts data from
parallel to serial format◦ inserts start and stop bits ◦ calculates and inserts parity bit if required◦ output bit rate is determined by the UART clock
Serial output
Parallel data
UART Clock from baud rate generator
Status information
7-29
Asynchronous serial transmission
1
0
Serial transmission is little endian (least significant bit first)
7-30
UART - The Receiver◦ synchronises with transmitter using the falling edge of the start
bit.◦ samples the input data line at a clock rate that is normally a
multiple of baud rate, typically 16 times the baud rate.◦ reads each bit in middle of bit period (many modern UARTs use
a majority decision of the several samples to determine the bit value)
◦ removes the start and stop bits, optional calculates and checks the parity bit. Presents the received data value in parallel form.
Serial input
Status information
Parallel data
UART Clock from baud rate generator
7-31
Asynchronous serial reception
Idle
waiting for start bit
Start bit
1First data bit
etc.
0Start detected
UART Registers Control registers Transmit Receive FIFO control Status Interrupt Interrupt enable Format control Baud rate control
7-32
USART Universal Synchronous Asynchronous
Receiver Transmitter used to send and receive small packets
(characters) over a serial line◦ full or half duplex
typically asynchronously 5 – 9 bits of data 2 or 3 framing bits
start bit 1 or 2 stop bits
0 or 1 parity bits
Data Format Must be agreed on by sender and receiver
before any exchanges can be made stop bit (1 to 0 transition) 5 – 9 data bits 0 or 1 parity bits (odd or even parity) 1 or 2 stop bits (logic 0)
Programming Model Data input register Data output register Control register
◦ speed, data bits, parity, stop bits, start, stop Status register
◦ data ready, transmitting interrupts
◦ overflow, underflow, data ready, data sent
Sending data Remember synchronization is on a
character by character basis check status load data register start transmit wait for transmission complete status or for
interrupt repeat
Receiving data poll status register for data ready or wait for
interrupt read data (save it) repeat
Universal Serial Bus
The History of USBIn 1994 a collaborative effort to design a standard for peripheral devices was made between Compaq, DEC, IBM, Intel, Microsoft, NEC, and Nortel.
USB 1.0USB 1.0 was released January 1996. It has a data transfer rate of 12 Mbit/s. However USB did not become popular until its first revision, in 1998. This revision featured the ability to use either 12 Mbit/s(FS) or 1.5 Mbit/s(LS) depending on the device being used.
USB 2.0April 2000, the specifications for USB 2.0 are released. With a data transfer rate of 480 Mbit/s(HS) this revision was much more superior than its predecessors. However, just because this speed is manageable does not mean that it is often met.
http://en.wikipedia.org/wiki/usci www.technogyaan.com/serial_parallel_com
m www.engineersworld.com/usci_facts www.engpaper.com/parallel_serial_interface
BIBLIOGRAPHY
THANK YOU.