Scott Baker Will Cross Belinda Frieri March 9 th, 2005 Serial Communication Overview ME4447/6405.

Slides:



Advertisements
Similar presentations
Serial Interface Dr. Esam Al_Qaralleh CE Department
Advertisements

INPUT-OUTPUT ORGANIZATION
Serial Communications Interface (SCI) Michael LennardZachary PetersBao Nguyen.
SCI: Serial Communications Interface Presented by: Sean Kline Chad Smith Jamie Cruce.
Serial I/O - Programmable Communication Interface
1 Fall 2005 Local Serial Asynchronous Communication Qutaibah Malluhi Computer Science and Engineering Qatar University.
Hierarchy of I/O Control Devices
Serial Communication Interface
COMP3221: Microprocessors and Embedded Systems Lecture 22: Serial Input/Output (II) Lecturer: Hui Wu Session 1, 2005.
Asynchronous Communication Hardware  Data within a DTE is usually stored and moved in a parallel fashion.  Data sent across the channel is generally.
CSCI 4550/8556 Computer Networks Comer, Chapter 5: Local Asynchronous Communication (RS-232)
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
Input/Output and Communication
Harrison Jones Alexis Noel William Allen SERIAL COMMUNICATION INTERFACE (SCI)
ECE 371- Unit 11 Introduction to Serial I/O. TWO MAJOR CLASSES OF SERIAL DATA INTERFACES ASYNCHRONOUS SERIAL I/O - USES “FRAMING BITS” (START BIT AND.
Local Asynchronous Communication
1 SCI Serial Communication Interface Gerrit Becker James McClearen Charlie Hagadorn October 21, 2004.
INPUT-OUTPUT ORGANIZATION
Serial Communication Interface (SCI) Kevin Stuart Matt Betts March 27, 2007 ME 6405, Sp 07.
Technology Training that Works Hands of Data Communications, Networking & TCP/IP Troubleshooting.
Serial Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
The 8051 Microcontroller and Embedded Systems
Serial Port I/O Serial port sends and receives data one bit at a time. Serial communication devices are divided into: Data Communications Equipment (DCE),
Input/Output mechanisms
Chapter-4/5-1CS331- Fakhry Khellah Term 081 Chapter 4 (Only 4.2 – 4.3) Digital Transmission.
Lecture Set 9 MCS-51 Serial Port.
Universal Synchronous/Asynchronous Receiver/Transmitter (USART)
Unit 4 Design and Synthesis of Datapath Controllers
Lecture 14 DMA Controller & Serial Communications Interface (UART)
Universal Asynchronous Receiver/Transmitter (UART)
Chapter 5: Local Asynchronous Communication 1. Bit-wise data transmission 2. Asynchronous communication 3. Sending bits with electric current 4. Standard.
Advanced Microprocessor1 I/O Interface Programmable Interval Timer: 8254 Three independent 16-bit programmable counters (timers). Each capable in counting.
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
Universal Asynchronous Receiver/Transmitter (UART)
Serial Communication Interface Ta Kim Nicholas Earnhart Razid Ahmad ME 6405 – Fall 2008 November 6, 2008.
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
The Principle of Electronic Data Serial and Parallel Data Communication Transmission Rate Bandwidth Bit Rate Parity bits.
1 October 26, 2006ME 6405 MechatronicsSerial Communication Interface Brian Guerriero Jon Rogers Robert Thiets.
1 Transmission of Digital Data : Interface and Modems.
Serial Communications Interface Module Slide #1 of 19 MC68HC908GP20 Training PURPOSE -To explain how to configure and use the Serial Communications Interface.
AS Computing Data transmission. Basic data transmission Baud The rate that the voltage changes is called the Baud. If the voltage changes 10 times every.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose:  This course provides an overview of the serial communication.
FUNDAMENTALS OF NETWORKING
Unit 1 Lecture 4.
Communicating. The ATmega16 communicates through one of the following ways: Serial Peripheral Interface (SPI) Universal Synchronous and Asynchronous serial.
CE-2810 Dr. Mark L. Hornick 1 Serial Communications Sending and receiving data between devices.
8251 USART.
SCI Communication Proudly Presented By: Adam Cardi & Aaron Enes.
Serial Communications
The HCS12 SCI Subsystem A HCS12 device may have one or two serial communication interface. These two SCI interfaces are referred to as SCI0 and SCI1. The.
Serial mode of data transfer
Serial I/O and Data Communication.
SERIAL PORT PROGRAMMING
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
E3165 DIGITAL ELECTRONIC SYSTEM
Local Asynchronous Communication (RS-232)
DIGITAL DATA COMMUNICATION TECHNIQUES
Computer Organization and Design
UART Serial Port Programming
Serial Communication Interface
Asynchronous Serial Communications
Serial Communication Interface: Using 8251
Serial Communication Interface
UART Protocol Chapter 11 Sepehr Naimi
COMP3221: Microprocessors and Embedded Systems
CHAPTER SERIAL PORT PROGRAMMING. Basics of Serial Communication Computers transfer data in two ways: ◦ Parallel  Often 8 or more lines (wire.
EUSART Serial Communication.
Serial Communication 19th Han Seung Uk.
Serial Communications
Introduction Communication Modes Transmission Modes
Presentation transcript:

Scott Baker Will Cross Belinda Frieri March 9 th, 2005 Serial Communication Overview ME4447/6405

Types of Data Transmission Types of Serial Data Communication Asynchronous Data Transmission Data Transmission Rates Examples of Data Transmission Overview

Transmission Illustration Serial Receiver Transmitter Parallel Receiver Transmitter 1 bit 1 word

Data Transmission ParallelSerial Cost Speed Transmission Amount Transmission Lines Transmission Distance Example Cheap Slow Single bit One line to transmit one to receive Long distance Modem Expensive Fast 8 bits (8 data lines) Transmitter & Receiver 8 lines for simultaneous transmission Short distance (synchronization) Printer Connection

Synchronous –Synchronous Peripheral Interface (SPI) Asynchronous –Serial Communication Interface (SCI) Serial Communications

Constant transmission of data Clocks of Transmitter and Receiver must be synchronized No safeguard against error or noise Data rates depend on clock rates Flexible to communication with peripheral devices –LCD drivers, A/D converter, other microprocessors Simultaneously transmits and receives data –Transmission line, Receiving line, and Ground Synchrononous - SPI

Transmission of data through “words” Continuous transmission unnecessary Built-in safeguards against noise and error Transmitter and Receiver operate independently Requires start and stop bit for each byte of data –Sends constant ‘1’ for idle –Sends a ‘0’ for start and “1” for stop bits Very reliable data reception Asynchronous - SCI

Set the Baud Rate of the Transmitter and Receiver (same value) Set the ‘M’ bit of SCCR1 for 8 or 9 bit data for Transmitter/Receiver Set ‘TE’ bit of SCCR2 to high to enable Transmitter (‘RE’ for Receiver) Load data into SCDR, RDRF bit set when data has been entered into SCSR TDRE bit of SCSR goes high to allow another data character into SCDR Sending & Receiving

Data is read from the RDR and stored Error check is performed TC bit of SCSR goes high and clears the transmit buffer Transmitter resumes idle Sending & Receiving

Start Bit Data Bit Stop Bit Parity Bit Noise SCI Registers Asynchronous Serial Transmission

Start Bit – Signals the transmission of a word. Transition from “1” to “0”. (“Mark-to-space”) First bit to be transmitted. Figure 1. Role of stop, start and parity bits. Bit Types

Stop Bits – Bit at the end of a data word. Bit set to high “1”. Indicates the end of a word. Data bits – Data bits to be transmitted. Sender and receiver have to agree in the number of data bits. (Usually 8 or 9) Least significant bit is sent first. Can be low or high. Bit Types (Cont)

Parity bit – Works as an error check. There are two types: odd and even –Even: if number of 1’s in the data word is even. –Odd: if number of 1’s in the data word is odd. Bit after the data bits and before the stop bit. Can prevent single noise signal, but does not recognize when two bits are altered by noise. Used to prevent noise. Bit Types (Cont)

Noise is an interference in the line, which causes a word to be misinterpreted. Noise Detection by HC11: Noise detected if three samples taken near the middle of the bit time do not agree. When start bit is detected, 4 additional samples are taken during the first half of the bit time for start bit verification. If noise is detected noise flag (NF) is set. Noise

BAUD Register: Sets the bit rate for the SCI system SCP bits: Pre-scale select bits. SCR bits: Baud rate selects. Other bits set for factory tests. SCI Registers

SCCR1 Register: Sets control bits for the 9-bit character format and the receiver wake up feature R8- Receive Data bit 8 T8: Transmit Data Bit 8 WAKE:Wake up Method Select Bit –“0” for idle. Detection of at least a fill character time of idle time gets the receiver to wake up –“1”for address mark. “1” in the MSB gets the receiver to wake up. M: SCI Character Length Bit –“0” for 8 data bits, “1” for 9 data bits. SCI Registers

SCCR2 Register: Main control register for the SCI system. TIE: Transmit Interrupt Enable Bit –“0” TDRE interrupts disabled, “1” SCI interrupt requested when TDRE is “1”. TCIE: Transmit Complete Interrupt Enable Bit –“0” TC interrupts disabled, “1” SCI interrupt requested when TC is “1”. RIE: Receive Interrupt Enable Bit –“0” RDRF and OR interrupts disabled, “1” SCI interrupt requested when either RDRF or OR is “1”. SCI Registers

SCCR2 Register (Cont.) ILIE: Idle-Line Interrupt Enable Bit. –“0” IDLE interrupts disabled, “1” SCI interrupt requested when IDLE is “1”. TE: Transmit Enable –“0” SCI transmitter disabled, “1” SCI transmitter enabled. RE: Receive Enable Bit –“0” SCI receiver disabled, “1” SCI receiver enabled. RWU: Receiver Wakeup Bit –“0” Normal SCI receiver operation (Wake up feature not enabled), “1” Places SCI in standby mode (receiver related interrupts are inhibited). SBK: Send break Bit –“0” Normal SCI Transmitter operation, “1” Enable transmitter to send synchronous break characters. SCI Registers

SCSR Register: Generated hardware interrupts and indicate errors. TDRE: Transmit Data Register Empty Bit –“0” Not empty, “1” New character can be written to the SCDR. TC: Transmit Complete Bit –“0” Transmitter busy sending character, “1”Transmitter completed sending character and is in idle state. RDRF: Receive Data Register Full Bit –“0” Not full (Nothing received since last reading of SCDR, “1” Character received and transferred from receive shift register to parallel SCDR. SCI Registers

SCSR Register (Cont.) IDLE: Idle-Line Detect Bit –“0”RxD line is active or never used, “1” RxD line is idle. OR: Overrun Error Bit –“0” No error, “1”Another character was serially received and ready to be transferred to SCDR, but the previously received character was not yet read. NF: Noise Flag –“0” No noise detected. FE: Framing Error bit –“0” No Framing error, “1” Framing error detected for the character in the SCDR. SCI Registers

SCDR Register: It contains the data to and from the MCU. SCDR is two separate registers: When SCDR is read, read only RDR is accessed When SCDR is written, the write only TDR is accessed. SCI Registers

PORTD- $1008 –Input/Output Port D DDRD- $1009 –Data Direction Register for Port D SPCR- $1028 –SPI Control Register Ancillary Registers

Noise Receiving clock is sampling at 12x the transmitting clock, so each bit can be tested 12 times Start bit is detected properly Since RT8 and RT10 are ‘1’, the noise flag is set Since the majority of the start bit was detected as ‘0’, the bit will be accepted as the start bit

Noise Noise on RxD pin causes the start bit to be detected too soon Since the majority of the samples are zero, start bit is accepted the noise flag is also set since ones were detected if a ‘1’ is not detected where the stop bit should be, a framing error will be detected

Baud Rate vs. Bit Rate Baud rate: number of total information bits transmitted per second (includes start, data, parity and stop bits) Bit rate: number of data bits only transmitted per second So for us, Baud rate > Bit rate Note: in modems, multiple transmission voltage levels are used, so multiple bits are encoded with each signal, meaning bit rates can be greater than baud rates

Baud Rate vs. Bit Rate For the HC11, there is always either 10 or 11 total information bits per word If the M bit is 0, there are 10 (8 data bits, 1 start, 1 stop) If the M bit is 1, there are 11 (8 data bits, 1 start, 1 stop, and one additional ‘data’ bit) The additional bit can be an extra stop bit or a parity bit (from the T8 bit of SCCR1) Using a parity bit takes more computation time

Baud Rate Example What is the bit rate for a 2400 baud rate using a parity bit and two stop bits per data word? 8 data bits/word bit rate = baud rate 10 total bits/word bit rate = 2400(2/3) = 1600 bps For HC11 with one start, 8 data, and one stop: 8 data bits/word bit rate = baud rate 12 total bits/word bit rate = 2400(4/5) = 1920 bps

Data Bit 4Data Bit 5 Start BitData Bit 0 Example 1: Send 8B 16 with one start bit, 8 data bits, even parity, and two stop bits. 8B 16 = Data Bit 1 Data Bit 2Data Bit 3Data Bit 6Data Bit 7 Parity BitStop Bit Asynchronous Transmission First bit sent

Data Bit 4Data Bit 5 Start BitData Bit 0 Asynchronous Transmission Data Bit 1 Data Bit 2Data Bit 3Data Bit 6Data Bit 7 Parity BitStop Bit Example 2: Send 8C 16 with one start bit, 8 data bits, even parity, and two stop bits. 8C 16 = First bit sent

Data Bit 4Data Bit 5 Start BitData Bit 0Data Bit 1 Data Bit 2Data Bit 3Data Bit 6Data Bit 7 Parity BitStop Bit Example 3: Send 8C 16 with one start bit, 8 data bits, odd parity, and two stop bits. 8C 16 = Asynchronous Transmission First bit sent

Serial Communication Overview ME4447/6405 Questions