Top Banner
Universal Serial Communication Interface (USCI) entation By: Mohit Panchal Guided by: Prof. S.V. CHARATE DR. S.K. JAIN
43

Universal Serial Communication Interface

Aug 19, 2014

Download

Engineering

Sandesh Agrawal

this presentation contains all sort of information regarding USCI(Universal Serial Communication Interface)
UART, SPI, I2C etc.
this will be very helpful to the people those who are planning or starting projects or want to get idea how devices interfaced.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Universal Serial Communication Interface

Universal Serial Communication Interface

(USCI)

Presentation By: Mohit Panchal

Guided by:Prof. S.V. CHARATEDR. S.K. JAIN

Page 2: Universal Serial Communication Interface

DATA COMMUNICATION TYPES SYNCHRONOUS AND ASYNCHRONOUS

TRANSMISSION SERIAL COMMUNICATION IMPLEMENTATION TERMS USED IN SERIAL COMMUNICATION UART USART USB BIBLIOGRAPHY

CONTENTS

Page 3: Universal Serial Communication Interface

1. Parallel2. Serial (i) Synchronous

(ii) Asynchronous

DATA COMMUNICATION TYPES

Page 4: Universal Serial Communication Interface

Serial versus Parallel Data Transfer

Serial and parallel

FIG.1

Page 5: Universal Serial Communication Interface

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

Page 6: Universal Serial Communication Interface

Many lines of communication, synchronized bursts of data

Parallel Communication

Time

Transmitter Receiver

FIG.2

Page 7: Universal Serial Communication Interface

Definition of Serial Communication

Bit by bit transmission of information in seriesA B

Travels in series

FIG.3

Page 8: Universal Serial Communication Interface

One line of communication, long string of data

Serial Communication

Time

Signal

Page 9: Universal Serial Communication Interface

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

Page 10: Universal Serial Communication Interface

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

Page 11: Universal Serial Communication Interface

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

Page 12: Universal Serial Communication Interface

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

Page 13: Universal Serial Communication Interface

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

Page 14: Universal Serial Communication Interface

Purpose of the Serial Ports

Seria

l Int

erfa

ceParallel DigitalData

Serial Digital DataOutIn

Expansion Bus

FIG.4

Page 15: Universal Serial Communication Interface

Standard Serial Ports on a Computer

FIG.5

Page 16: Universal Serial Communication Interface

Serial Port Identification

Source: Black BoxFIG.6

Page 17: Universal Serial Communication Interface

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

Page 18: Universal Serial Communication Interface

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

Page 19: Universal Serial Communication Interface

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

Page 20: Universal Serial Communication Interface

Number of actual data bits per second Different from Bit Rate because of required

setup bits per word transmitted.

Baud Rate

Page 21: Universal Serial Communication Interface

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

Page 22: Universal Serial Communication Interface

◦ 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

Page 23: Universal Serial Communication Interface

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

Page 24: Universal Serial Communication Interface

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

Page 25: Universal Serial Communication Interface

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

Page 26: Universal Serial Communication Interface

Universal Asynchronous Receiver/Transmitter (UART)

Page 27: Universal Serial Communication Interface

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.

Page 28: Universal Serial Communication Interface

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

Page 29: Universal Serial Communication Interface

7-29

Asynchronous serial transmission

1

0

Serial transmission is little endian (least significant bit first)

Page 30: Universal Serial Communication Interface

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

Page 31: Universal Serial Communication Interface

7-31

Asynchronous serial reception

Idle

waiting for start bit

Start bit

1First data bit

etc.

0Start detected

Page 32: Universal Serial Communication Interface

UART Registers Control registers Transmit Receive FIFO control Status Interrupt Interrupt enable Format control Baud rate control

7-32

Page 33: Universal Serial Communication Interface

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

Page 34: Universal Serial Communication Interface

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)

Page 35: Universal Serial Communication Interface

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

Page 36: Universal Serial Communication Interface

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

Page 37: Universal Serial Communication Interface

Receiving data poll status register for data ready or wait for

interrupt read data (save it) repeat

Page 38: Universal Serial Communication Interface

Universal Serial Bus

Page 39: Universal Serial Communication Interface

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.

Page 40: Universal Serial Communication Interface

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.

Page 41: Universal Serial Communication Interface

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.

Page 42: Universal Serial Communication Interface

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

Page 43: Universal Serial Communication Interface

THANK YOU.