Chapter 14 Communications Introduction

Slides:



Advertisements
Similar presentations
Chapter 6 General Purpose Input/Output
Advertisements

Chapter 9 Data Acquisition Comparator_A
Chapter 9 Data Acquisition Comparator-Based Slope ADC
Serial Interface Dr. Esam Al_Qaralleh CE Department
9-1 Chapter 9 - Communication Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles of Computer.
FIGURE 11.1 Circuit for Example 11.1.
Bus arbitration Processor and DMA controllers both need to initiate data transfers on the bus and access main memory. The device that is allowed to initiate.
I2C bus Inter Integrated Circuits bus by Philips Semiconductors
1 Chapter Overview Network Cables Network Interface Adapters Network Hubs.
Chapter 4 Gates and Circuits.
INPUT-OUTPUT ORGANIZATION
Data Communication Topics to be discussed:  Data Communication Terminology.  Data Transmission Signals.  Data Transmission Circuits.  Serial & Parallel.
Serial Buses. Serial Bus Features Allows several devices to be connected to a set of common signal wires Reduces inter-connections and complexity Asynchronous.
Serial I/O - Programmable Communication Interface
Lecture 8: Serial Interfaces
PH4705 ET4305 Interface Standards A number of standard digital data interfaces are used in measurement systems to connect instruments and computers for.
Hierarchy of I/O Control Devices
Starting with serial Chapter Ten 10.1, 10.2,
COE 342: Data & Computer Communications (T042) Dr. Marwan Abu-Amara Chapter 6: Digital Data Communications Techniques.
Transmission Characteristics 1. Introduction (Information Interchange codes) 2. Asynchronous and Synchronous Transmissions 3. Error detection (bit errors)
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
Data Communications Chapter 6 The Data Communications Interface.
Input/Output and Communication
UBI >> Contents Chapter 9 Data Acquisition Introduction MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior (PT) Pedro.
Chapter 8 COMMUNICATION AND COMPUTER NETWORK
UBI >> Contents Chapter 15 Advanced Laboratories RF link using the eZ430-RF2500 MSP430 Teaching Materials Texas Instruments Incorporated University of.
ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 13.
Lecture 27: LM3S9B96 Microcontroller – Inter- Integrated Circuit (I 2 C) Interface.
INPUT-OUTPUT ORGANIZATION
SERIAL BUS COMMUNICATION PROTOCOLS
Technology Training that Works Hands of Data Communications, Networking & TCP/IP Troubleshooting.
Transmission Modes Serial Transmission  One bit is transmitted on a circuit at a time  Usually there is one transmit circuit and one receive circuit.
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
4.0 rtos implementation part II
Teachers Name : Suman Sarker Telecommunication Technology Subject Name : Microcontroller & Embedded System Subject Code : 6871 Semester : 7th Department.
Lecture 20: Communications Lecturers: Professor John Devlin Mr Robert Ross.
1 Microprocessor-based Systems Course 9 Design of the input/output interfaces (continue)
Universal Asynchronous Receiver/Transmitter (UART)
ECE 353 Introduction to Microprocessor Systems Michael Schulte Week 13.
Microprocessors 2 lesson Subjects lesson 7 Planning Interrupts Serial communication /USART Questions.
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK
ECS 152A 4. Communications Techniques. Asynchronous and Synchronous Transmission Timing problems require a mechanism to synchronize the transmitter and.
The Principle of Electronic Data Serial and Parallel Data Communication Transmission Rate Bandwidth Bit Rate Parity bits.
1 Transmission of Digital Data : Interface and Modems.
©2008 R. Gupta, UCSD COSMOS Summer 2008 Peripheral Interfaces Rajesh K. Gupta Computer Science and Engineering University of California, San Diego.
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
Essentials of Communication This simple model requires many guarantees. Sender Receiver Communication Link Data.
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.
Ch. 6 Digital Data Communication Techniques. 6.1Asynchronous & Synchronous Transmission Asynchronous Transmission: transmission in which each information.
UBI >> Contents Lecture 11 Communications Introduction & USI Module MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior.
Lab 9 Multiprocessor, Buses, SPI, I2C. Multiprocessors Why multiprocessors? The structure of multiprocessors. Elements of multiprocessors: – Processing.
Serial Communications
Serial mode of data transfer
6.1 Communication Methods
SERIAL PORT PROGRAMMING
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
Communication Lines Fundamentals.
DIGITAL DATA COMMUNICATION TECHNIQUES
Asynchronous Serial Communications
DIGITAL DATA COMMUNICATION TECHNIQUES
Chapter Nine: Data Transmission
Data Communication.
Serial Communication 19th Han Seung Uk.
Serial Communications
Chapter 15 Advanced Laboratories RF link using the eZ430-RF2500
Introduction Communication Modes Transmission Modes
Presentation transcript:

Chapter 14 Communications Introduction MSP430 Teaching Materials Chapter 14 Communications Introduction Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar, António Espírito Santo, Bruno Ribeiro, Humberto Santos University of Beira Interior, Electromechanical Engineering Department www.msp430.ubi.pt Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Contents Introduction Communications system model Transmission mode Serial communications Synchronous and asynchronous serial communications Peripheral Interface Serial (SPI) protocol I2C (Inter-Integrated Circuit) protocol MSP430 communications interfaces Quiz Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Introduction An important feature of modern microprocessor based systems is their communication capability, that is, their ability to exchange information with other systems in the surrounding environment; At the low level, communications interfaces are used to download a firmware update or to set up local configurations (e.g. turn features on or off), amongst other tasks; At a higher level, communication interfaces are used to exchange information in distributed applications. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Communications system model (1/2) Digital communication devices: Transmitter: Has the task of putting the information into the appropriate format for subsequent transmission; Receiver: Is responsible for collecting the message that has been sent and extracting the original information; Communication medium: The physical medium through which the information flows and is commonly implemented as: Twisted pair wire; Fibre optic cable; Radio frequency transmission. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Communications system model (2/2) Devices participating in a digital communication system: DTE: Data Terminal Equipment; DCE: Data Communications Equipment. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Transmission mode (1/5) Communications between digital devices can be divided into two types : Parallel communications; Serial communications. Parallel communications: The physical transmission medium has independent signal lines in numbers equal to the transmitted digital word bits; The information transmitted at any given instant is the data word formed by the logical levels on the various signal lines. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Transmission mode (2/5) Parallel communications: Example: Character ASCII “W” parallel transmission. Information flow Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Transmission mode (3/5) Serial communications: Physical transmission medium needs only one signal line; The information transmitted is provided by the transmitter as a sequence of bits, sent at the rate established between the transmitter and the receiver; Additional information is needed to enable the synchronization between the receiver and transmitter: Start bit: Added to the beginning of the information transmitted, so that the receiver can identify the beginning of a new transmission; Stop bit(s): Added to the end of the information transmitted to indicate that the data value is complete. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Transmission mode (4/5) Serial communications: Example: Character ASCII “W” serial transmission: Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Transmission mode (5/5) Advantages and disadvantages of parallel and serial communication: Characteristic Parallel Serial Bus line One line per bit One line Sequence All bits of one word simultaneously Sequence of bits Transmission rate High Low Bus length Short distances Short and long distances Cost Critical characteristics Synchronisation between the different bits is demanding Asynchronous transmission needs start and stop bits Synchronous transmission needs some other synchronisation Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Serial communications (1/3) The start bit identifies the beginning of a data transfer and is generated by a high-to-low transition on the bus; Following the start bit are the data bits. In this example, the ASCII code for the text transfer uses seven data bits; The error-checking bit (parity bit) is sent after the data bits; To terminate the transmission, one or two stop bits are issued; Using seven data bits, the complete message can use one or two stop bits. Using eight data bits, only one stop bit is available for transmission. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Serial communications (2/3) Parity bit: Used to verify the integrity of information transmitted; The bit is added by the transmitter and indicates whether the total sum of the numbers "1" in the message data is odd or even; The transmissions can be configured for odd or even parity. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Serial communications (3/3) Baud rate example: The transmission of “W”: Character uses seven data bits; Four bits are used for control, making a total of 11 bits. This corresponds to 11 baud; If the characters are transmitted at a rate of 10 characters per second, the baud rate will be: 10x11 = 1100 baud/s. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Synchronous and asynchronous serial communications (1/2) Serial communications may be: Asynchronous: where the transmission rate (baud rate) is fixed by the transmitter and the receiver works at the same baud rate, using the transmitted start bit to synchronize the start of a new message; Synchronous: where there is a separate synchronization clock signal connected between the receiver and the transmitter. Synchronous communications: Normally one unit assumes the role of master and one or more of the other units take the role of slaves; The clock signal generated by the master is used by the slave units to transfer data in/out of the TX and RX registers; It is possible for a device to transmit and receive simultaneously. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Synchronous and asynchronous serial communications (2/2) Asynchronous communications: Characterised by the absence of any synchronization clock signal between the units; The transmission in this mode does not allow simultaneous transmission and reception, that is, when one device transmits the other devices just listen. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Serial Peripheral Interface (SPI) protocol (1/2) The Serial Peripheral Interface ( SPI) bus is a standard form of synchronous serial communication; Developed by Motorola; Operates in full duplex mode; Master/Slave relationship; Communications are always initiated by the master. Low cost. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Peripheral Interface Serial (SPI) protocol (2/2) Supports only one master; Can support more than a slave; Short distance between devices, e.g. on a printed circuit boards (PCBs); Special attention needs to be observed to the polarity and phase of the clock signal; The master sends data on one edge of clock and reads data on the other edge. Therefore, it can send/receive at the same time. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

I2C (Inter-Integrated Circuit) protocol (1/3) Multi-master synchronous serial computer bus; Invented by Philips Semiconductors; Developed with the main objective of establishing links between integrated circuits and to connect low-speed peripherals; Based on a two bi-directional open-drain lines pulled up with resistors: SDA: Serial Data; SCL: Serial clock. Typical voltages used are +5.0 V or +3.3 V, although systems with other voltages are possible. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

I2C (Inter-Integrated Circuit) protocol (2/3) Communications is always initiated and completed by the master, which is responsible for generating the clock signal; In more complex applications, I2C can operate in multi-master mode; The slave selection by the master is made using the seven-bit address of the target slave; The master (in transmit mode) sends: Start bit; 7-bit address of the slave it wishes to communicate with; A single bit representing whether it wishes to write (0) to or read (1) from the slave; The target slave will acknowledge its address. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

I2C (Inter-Integrated Circuit) protocol (3/3) Example of an I2C communication system: Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

MSP430 communications interfaces (1/2) Equipped with three serial communication interfaces: USART (Universal Synchronous/Asynchronous Receiver/Transmitter): UART mode; SPI mode; I2C (on ‘F15x/’F16x only). USCI (Universal Serial Communication Interface): UART with Lin/IrDA support; SPI (Master/Slave, 3 and 4 wire modes); I2C (Master/Slave, up to 400 kHz). USI (Universal Serial Interface): SPI (Master/Slave, 3 & 4 wire mode); Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

MSP430 communications interfaces (2/2) Comparison between the communication modules: USART USCI USI UART: - Only one modulator - n/a - Two modulators support n/16 timings - Auto baud rate detection - IrDA encoder & decoder - Simultaneous USCI_A and USCI_B (2 channels) SPI: - Only one SPI available - Master and Slave Modes - 3 and 4 Wire Modes - Two SPI (one on each USCI_A and USCI_B) I2C: (on ‘15x/’16x only) - up to 400kbps I2C: - Simplified interrupt usage - SW state machine needed Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Quiz (1/6) 1. In the parallel communication transmission mode: (a) The data is transferred more slowly; (b) Each bit of the data has its own line; (c) All of above; (d) None of above. 2. In the serial communication transmission mode: (a) The data bits arrive sequentially; (b) The digital data is transferred faster; Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Quiz (2/6) 3. The serial transmission mode is the most popular digital data communications method because: (a) Higher bit transfer rates are achieved; (b) It is cheaper to implement than parallel transmission mode; (c) All of above; (d) None of above. 4. In asynchronous serial transmission communications, the frame must include: (a) Start and stop bits. (b) Parity bit. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Quiz (3/6) 5. Even parity means that an additional bit is: (a) Added to the data to make the sum of the “1” bits even; (b) Subtracted from the data to make the sum of the “1” bits even; (c) All of above; (d) None of above. 6. A USART is used: (a) Only for asynchronous transmissions; (b) Only for synchronous transmissions; (c) In parallel transmission communications; (d) In serial transmission communications. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Quiz (4/6) 7. Synchronous communication performed between two USART requires: (a) A common clock either in the transmitter or the receiver; (b) No common clock; (c) An independent clock in the transmitter; (d) An independent clock in the receiver. 8. Asynchronous communication between two USARTs requires: (a) A common clock in the transmitter and the receiver; (b) An independent clock in the transmitter and the receiver; (c) A common clock in the transmitter or the receiver; (d) An independent clock in the transmitter or the receiver. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Quiz (5/6) 9. I2C is a bus: (a) Synchronous with a master and a slave where both can be the transmitter or receiver; (b) Where the master generates the clock; (c) All of above; (d) None of above. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Quiz (6/6) Answers: 1. (b) Each bit of the data has its own line. 2. (a) The data bits arrive sequentially. 3. (c) All of above. 4. (c) All of above. 5. (a) Added to the data to make the sum of the “1” bits even. 6. (d) In serial transmission communications. 7. (a) A common clock either in the transmitter or the receiver. 8. (b) An independent clock in the transmitter and the receiver. 9. (d) None of above. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt