Serial Communication 19th Han Seung Uk.

Slides:



Advertisements
Similar presentations
EUSART Serial Communication.
Advertisements

INPUT-OUTPUT ORGANIZATION
Serial Communications Interface (SCI) Michael LennardZachary PetersBao Nguyen.
11-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL I/O System Design.
ECT 357 Ch 18 UART. Today’s Quote: Be careful that your marriage doesn’t become a duel instead of a duet. Be careful that your marriage doesn’t become.
The 8051 Microcontroller Chapter 5 SERIAL PORT OPERATION.
Lecture 8: Serial Interfaces
COMP3221: Microprocessors and Embedded Systems Lecture 22: Serial Input/Output (II) Lecturer: Hui Wu Session 1, 2005.
Starting with serial Chapter Ten 10.1, 10.2,
USARTS CS423 Dick Steflik. USART ● Universal Synchronous Asynchronous Receiver Transmitter ● used to send and receive small packets over a serial line.
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 13.
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.
Serial Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
4.0 rtos implementation part II
S4525A Peripherals & Enhanced FLASH 1 © 1999 Microchip Technology Incorporated. All Rights Reserved. S4525A Peripherals & Enhanced FLASH 1 Peripherals.
Universal Synchronous/Asynchronous Receiver/Transmitter (USART)
Lecture 20: Communications Lecturers: Professor John Devlin Mr Robert Ross.
Universal Asynchronous Receiver/Transmitter (UART)
ECE 353 Introduction to Microprocessor Systems Michael Schulte Week 13.
Scott Baker Will Cross Belinda Frieri March 9 th, 2005 Serial Communication Overview ME4447/6405.
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
CE-2810 Dr. Mark L. Hornick 1 Using the USART Configuration and Programming.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
1 October 26, 2006ME 6405 MechatronicsSerial Communication Interface Brian Guerriero Jon Rogers Robert Thiets.
Microprocessor based Design for Biomedical Applications MBE 3 – MDBA XI : Project Outlooks.
RX Serial Peripheral Interface (RSPI)
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose:  This course provides an overview of the serial communication.
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.
Embedded Communication Protocols Don Heer 10/18/10 1.
Tiva C TM4C123GH6PM UART Embedded Systems ECE 4437 Fall 2015 Team 2:
I/O techniques - Interfacing
Digital Logic Design Alex Bronstein
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 Communication Originally created by Anurag Dwidedi and Rudra Pratap Suman.
Chapter 6 Input/Output Organization
EE 107 Fall 2017 Lecture 5 Serial Buses – UART & SPI
Input/Output and Communication
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.
Two Wire Interface (TWI)
Atmega32 Serial Programming Basics
I2C PROTOCOL SPECIFICATION
Communication Lines Fundamentals.
Programming Microcontroller
Computer Organization and Design
UART Serial Port Programming
Asynchronous Serial Communications
Serial Communication Interface: Using 8251
Serial Communication Interface
UART Protocol Chapter 11 Sepehr Naimi
I2C and RTC Chapter 18 Sepehr Naimi
COMP3221: Microprocessors and Embedded Systems
Преглед Начин функционисања Имплементације
Configuration and Programming
Programmable Data Communication Blocks
AVR – ATmega103(ATMEL) Architecture & Summary
Another Physical Layer – I2C
CHAPTER SERIAL PORT PROGRAMMING. Basics of Serial Communication Computers transfer data in two ways: ◦ Parallel  Often 8 or more lines (wire.
EUSART Serial Communication.
Source: Serial Port Source:
Serial Communications
AVR UART The UART, or Universal Asynchronous Receiver Transmitter, provides hardware support for a serial port on AVR processors Signaling is compatible.
Presentation transcript:

Serial Communication 19th Han Seung Uk

Parallel Communication Transmit Multiple Bit at a time Low rate Electronic-Magnetic Interfarence Not equal Destination Time Printer Port, IDE, PCI

Serial Communication Transmit One Bit at a time High rate Synchronization RS-232, SPI, I²C, Universal Serial Bus, Ethernet, Serial ATA, PCI Express High rate >> Multiple Bit

Serial Communication SPI USART I2C UART High speed, Complex H/W Cheap, Simple H/W

USART, UART The Universal Synchronous and Asynchronous serial Receiver and Transmitter (USART) is a highly flexible serial communication device. The main features are: • Full Duplex Operation (Independent Serial Receive and Transmit Registers) • Asynchronous or Synchronous Operation • Master or Slave Clocked Synchronous Operation • High Resolution Baud Rate Generator • Supports Serial Frames with 5, 6, 7, 8, or 9 Data Bits and 1 or 2 Stop Bits • Odd or Even Parity Generation and Parity Check Supported by Hardware • Data OverRun Detection • Framing Error Detection • Noise Filtering Includes False Start Bit Detection and Digital Low Pass Filter • Three Separate Interrupts on TX Complete, TX Data Register Empty, and RX Complete • Multi-processor Communication Mode • Double Speed Asynchronous Communication Mode

USART, UART

RS-232 USART, UART : 0V ~ 5V RS-232 : -12V ~ 12V Long Range, More safe to Noise

Serial Peripheral Interface The Serial Peripheral Interface (SPI) allows high-speed synchronous data transfer between the ATmega128 and peripheral devices or between several AVR devices. The ATmega128 SPI includes the following features: • Full-duplex, Three-wire Synchronous Data Transfer • Master or Slave Operation • LSB First or MSB First Data Transfer • Seven Programmable Bit Rates • End of Transmission Interrupt Flag • Write Collision Flag Protection • Wake-up from Idle Mode • Double Speed (CK/2) Master SPI Mode

By MASTER’s Command FREE MASTER SLAVE

I2C (Two-wire Serial Interface) Features • Simple yet Powerful and Flexible Communication Interface, only Two Bus Lines Needed • Both Master and Slave Operation Supported • Device can Operate as Transmitter or Receiver • 7-bit Address Space allows up to 128 Different Slave Addresses • Multi-master Arbitration Support • Up to 400 kHz Data Transfer Speed • Slew-rate Limited Output Drivers • Noise Suppression Circuitry Rejects Spikes on Bus Lines • Fully Programmable Slave Address with General Call Support • Address Recognition Causes Wake-up when AVR is in Sleep Mode

I2C (Two-wire Serial Interface) __interrupt void TWI_ISR(void) { case TWI_MRX_DATA_ACK: // Data byte has been received and ACK tramsmitted TWI_buf[TWI_bufPtr++] = TWDR; case TWI_MRX_ADR_ACK: // SLA+R has been tramsmitted and ACK received if (TWI_bufPtr < (TWI_msgSize-1) ) // Detect the last byte to NACK it. TWCR = (1<<TWEN)| // TWI Interface enabled (1<<TWIE)|(1<<TWINT)| // Enable TWI Interupt and clear the flag to read next byte (1<<TWEA)|(0<<TWSTA)|(0<<TWSTO)| // Send ACK after reception (0<<TWWC); // }else // Send NACK after next reception (0<<TWEA)|(0<<TWSTA)|(0<<TWSTO)| // Send NACK after reception } break; __interrupt void UART_Recived(void) { Buf = UDR; }

Summary UART is Simple for Programer and H/W man But High Price, Target for Long Range Communication SPI, I2C is Cheap and Simple H/W But Match for One Direction Communiaction(ADC, Senser...)