1 / 23

ECE 371- Unit 10-Part 1

ECE 371- Unit 10-Part 1. Introduction to Serial I/O. TWO MAJOR CLASSES OF SERIAL DATA INTERFACES • ASYNCHRONOUS SERIAL I/O - USES “FRAMING BITS” (START BIT AND STOP BIT(S)) WITH EACH CHARACTER. Asynchronous Serial Data Format. idle. Start bit. msb. lsb. Stop bit(s). Parity bit.

gari
Télécharger la présentation

ECE 371- Unit 10-Part 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECE 371- Unit 10-Part 1 Introduction to Serial I/O

  2. TWO MAJOR CLASSES OF SERIAL DATA INTERFACES • ASYNCHRONOUS SERIAL I/O - USES “FRAMING BITS” (START BIT AND STOP BIT(S)) WITH EACH CHARACTER

  3. Asynchronous Serial Data Format idle Start bit msb lsb Stop bit(s) Parity bit Data value transmitted is 0 0 1 1 1 0 1 1 Parity bit shown represents even parity option

  4. • SYNCHRONOUS SERIAL I/O - USES SINGLE “SYNCH” CHARACTER AT BEGINNNG OF DATA STREAM OR - USES SPECIAL CLOCK SIGNAL TO DEFINE BEGINNING OF EACH NEW CHARACTER

  5. Synchronous Serial Data Transmission Format Header information Synch char Data char Data char Data char Data char etc OR Data char Data char Data char Data char Data char Data char

  6. CLASSES OF SERIAL DATA APPLICATION • COMPUTER TO PERIPHERAL DEVICE • COMPUTER TO COMPUTER

  7. Half-duplex Serial Data Interface Between Computer and Peripheral Device Peripheral Device Computer System Serial data Handshaking Signals Ground

  8. Full-duplex Serial Data Interface Between Computer and Peripheral Device Peripheral Device Computer System Serial data Handshaking Signals Ground

  9. Serial Data CommunicationBetween Computers, Using Modems Computer (DTE) Modem Telephone System Modem Computer (DTE) RS-232 Standard Interface RS-232 Standard Interface DCE Data Communication Equipment DTE = Data Terminal Equipment RS-232 is a Standard Interface between DTE and DCE

  10. Laptop COM1 Port CPU Asynchronous Serial Interface Modem Telephone Line Inside PC

  11. RS-232 Standard Interface • Defines a 25-bit Connector • Defines the function of each pin • Defines EIA RS-232 Logic Levels • Serial Data Physical Representation • Logic “1”: -25 volts ≤ V1 ≤ -5 volts • Logic “0”: +5 volts ≤ V0 ≤ +25 volts

  12. EIA RS-232 Signals of Interest DTE TXD RXD GND RTS CTS DCD DSR DTR RI DCE

  13. Primary RS-232 Signals • RxD -- Received Data • TxD --Transmitted Data • RTS – Request to Send • CTS – Clear to Send • DTR – Data Terminal Ready - DTE Ready • DSR – Data Set Ready – DCE Ready • RI – Ring Indicator • DCD – Data Carrier Detect • GND -- Ground

  14. EIA RS-232 Interface

  15. COM Connector on PC

  16. SERIAL COMMUNICATION INTERFACE (SCI) ON THE MC9S12DP256B MICROCONTROLLER • ASYNCHRONOUS SERIAL I/O • COMPATIBLE WITH RS232 STANDARD

  17. SCI Data Formats See p. 211, text, for def.

  18. Serial Data Format • Idle (no data being transmitted) = “1” • Start = “0” • Stop =“1” • Each data bit is T seconds in length • Baud = 1/T • Least Significant Bit Sent First • Most Significant Bit Sent Last

  19. ASCII Code for Letter A = 0b01000001 = 0x41ASCII Code for Letter B = 0b01000010 = 0x42 ASCII Code for Digit 1 = 0b00110001 = 0x31 Idle Start LSB MSB Stop A =1 1 1 0 1 0 0 0 0 0 1 0 1 1 B = 1 1 1 0 0 1 0 0 0 0 1 0 1 1 1 = 1 1 1 0 1 0 0 0 1 1 0 0 1 1

  20. ASCII Character Set 7-bit Characters d6 d5 d4 d3 d2 d1 d0 0 0 x x x x x Control Characters 0 1 x x x x x Numbers and Punctuation 1 0 x x x x x Upper Case Characters 1 1 x x x x x Lower Case Characters Ctrl J = Line Feed Ctrl M = Carriage Return Ctrl Q = XON Ctrl S = XOFF Ctrl Z = End of File

  21. 2 Asynchronous Serial PortsSCI0 and SCI1 SCI0 – Uses Port S[1:0] SCI1 – Uses Port S[3:2]

  22. RS-232 TTL Level Converters

  23. TTL – RS-232 Conversion Channel 0 RTS = CTS DCD = DTR = DSR RI – No Connection Channel 1 Data Lines Only TTL – RS-232 Conversion DC to DC Power Supply

More Related