DOC PREVIEW
U of U CS 5780 - Serial I/O Devices

This preview shows page 1-2-16-17-18-34-35 out of 35 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ECE/CS 5780/6780: Embedded System DesignScott R. LittleLecture 15: Serial I/O DevicesScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 1 / 69Introduction to Serial CommunicationSerial communication transmits of one bit of information at atime.One bit is sent, a time delay occurs, next bit is sent.Used to interface to printers, keyboards, scanners, etc.Universal asynchronous receiver/transmitter (UART) is theinterface chip that implements the transmission.A serial channel is collection of signals (or wires) that implementthe communication.Data terminal equipment (DTE) is the computer.Data communication equipment (DCE) is the modem.Scott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 2 / 69A Serial ChannelCMOS Level RS232 Level RS422 LevelTrue/Mark +5 V TxD = -12 V (TxD+- TxD−) = -3 VFalse/Space +0.1 V TxD = +12 V (TxD+- TxD−) = +3 VScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 3 / 69DefinitionsA frame is a complete and nondivisble packet of bits.Includes both in formation (e.g. data, characters) and overh ead(start bit, error checking, and stop bits).Parity is generated at the transmitter and checked at thereceiver to help detect errors in transmission.Even parity makes number of 1s even (data+parity).Odd parity makes number of 1s odd (data+parity).Bit time is the time between each bit.Scott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 4 / 69BandwidthBaud rate is total number bits transmitted per time.Informati on is data user wishes to transmit:Characte rs to be printed.Overhead is bits added to achieve transmission:Start bit(s), stop bit(s), parity, etc.Bandwidth =information bits/frametotal bits/frame× baud rateScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 5 / 69SCI versus SPIScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 6 / 69Various Serial ChannelsScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 7 / 69A Desktop NetworkScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 8 / 69RS232 CablesScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 9 / 69RS232 DB9 Pin AssignmentsPin Signal Description True DTE DCE1 DCD Data Carrier Detect +12 In Out2 RxD Receive Data −12 In Out3 TxD Transmit Data −12 Out In4 DTR Data Terminal Rdy +12 Out In5 SG Signal Ground6 DSR Data Set Ready +12 In Out7 RTS Request to Send +12 Out In8 CTS Clear to Send +12 In Out9 RI Ring Indicator +12 In OutScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 10 / 69RS232 InterfaceScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 11 / 69More RS232 Interface ChipsScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 12 / 69RS232 SpecificationsScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 13 / 69RS422/RS423/RS485 SpecificationsSpecification RS232D RS423A RS422 RS485Mode of operation Single-ended Single-ended Diff. Diff.Drivers on one line 1 1 1 32Receivers on one line 1 10 10 32Max distance (ft) 50 4,000 4,000 4,000Max data rate 20kb/s 100kb/s 10Mb/s 10Mb/sMax driver output ±25V ±6V -0.25/+6V -7/+12VReceiver input ±15V ±12V ±7V -7/+12VScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 14 / 69Universal Serial Bus (USB)Single host computer controls the USB.Host controls all transactions using a token-based protocol.Uses a tiered star topology with host at the center.Up to 127 devices can be connected to one USB bus.Plug’n’play implemented with dynamically loadable drivers.Host detects new devices and loads appropriate drive r.Can operate at high (480Mb/s), full (12Mb/s), or low(1.5Mb/s) speeds.Pin Color Function1 Red VBUS (5V)2 White D-3 Green D+4 Black GroundScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 15 / 69Current Loop Serial ChannelScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 16 / 69Modem Serial InterfaceLogic Originate AnswerTrue 1270 Hz 2225 HzFalse 1070 Hz 2025 HzScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 17 / 69Optical ChannelScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 18 / 69Digital Logic ChannelScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 19 / 69Serial Communication InterfaceMost embedded microc omp uters s upport SCI.Common features include:A baud rate control register used to select transmission rate.A mode bit M used to select 8-bit (M=0) or 9-bit (M=1) dataframes.Each device can create its own serial port clock with period thatis integer multiple of the E clock period.Scott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 20 / 69Transmitting in Asynchronous ModeCommon features in the transmitter:TxD data output pin, with TTL voltage levels.10- or 11-bit shift register, not directly accessible.Serial communications data register (SCDR), write only,separate from receive reg. though same address.T8 data bit for 9-bit dat a mode.Scott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 21 / 69Control Bits for the TransmitterTransmit Enable (TE), set to 1 to enable transmitter.Send Break (SBK), set to 1 to send blks of 10 or 11 0s.Transmit Interrupt Enable (TIE), set to arm TDRE flag.Transmit Complete Enable (TCIE), set to arm TC flag.Scott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 22 / 69Status Bits Generated by the TransmitterTransmit Data Register Empty flag (TDRE), set when SCDRempty, clear by reading TDRE and writing SCDR.Transmit Complete flag (TC), set when transmit shift registerdone shifting, cleared by reading TC flag then writing SCDR.Scott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 23 / 69Figures for TransmissionScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 24 / 69Pseudo Code for Transmission ProcessTRANSMIT Set TxD=0 Output start bitWait 16 clock times Wait 1 bit timeSet n=0 Bit counterTLOOP Set TxD=bn Output data bitWait 16 clock times Wait 1 bit timeSet n=n+1Goto TLOOP if n<=7Set TxD=T8 Output T8 bitWait 16 clock times Wait 1 bit timeSet TxD=1 Output a stop bitWait 16 clock times Wait 1 bit timeScott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 25 / 69Receiving in Asynchronous ModeCommon features in the receiver:RxD data input pin, with TTL voltage levels.10- or 11-bit shift register, not directly accessible.Serial communications data register (SCDR), read only,separate from transmit reg. though same address.R8 data bit for 9- bit data mode.Scott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 26 / 69Control Bits for the ReceiverReceiver Enable (RE), set to 1 to enable receiver.Receiver Wakeup (RWU), set to 1 to allow a receiver input towakeup the


View Full Document

U of U CS 5780 - Serial I/O Devices

Documents in this Course
Lab 1

Lab 1

5 pages

FIFOs

FIFOs

10 pages

FIFOs

FIFOs

5 pages

FIFO’s

FIFO’s

12 pages

MCU Ports

MCU Ports

12 pages

Serial IO

Serial IO

26 pages

Load more
Download Serial I/O Devices
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Serial I/O Devices and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Serial I/O Devices 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?