chap10 - Chapter 10 8051 Serial Communication 1 Objective...

This preview shows page 1 - 14 out of 93 pages.

The preview shows page 12 - 14 out of 93 pages.
1Chapter 108051 Serial Communication
2Objective8051 can provide a serial communication function andallow the programmer to transmit or receive the externalinformation bit by bit for each timeDue to IBM PC communicates frequently with 8051,therefore we stress on the communications between 8051and the COM port of PC by using RS232.To understand the characteristics of serial communication,the specifications of RS232C and MAX232 IC (levelconversion) 。To understand the functions of specific registers of 8051and learn how to write 8051serial communicationprogram.
3Sections10.1Basics of serial communication10.28051 connection to RS23210.38051 serial communication programming
4Section 10.1Basics of Serial Communication
58051 and PCThe 8051 module connects to PC by using RS232.RS232 is a protocol which supports half-duplex,synchronous/asynchronous, serial communication.We discuss these terms in following sections.PC8051COM 1 portRS232MAX232UART
6Simplex vs. Duplex TransmissionSimplex transmission: the data can sent in onedirection.Example: the computer only sends data to the printer.Duplex transmission: the data can be transmittedand receiveTransmitterReceiverTransmitterReceiverReceiverTransmitter
7Half vs. Full DuplexHalf duplex: if the data is transmitted one way at atime.Full duplex: if the data can go both ways at thesame time.Two wire conductors for the data lines.TransmitterReceiverReceiverTransmitterTransmitterReceiverReceiverTransmitter
8Figure 10-2. Simplex, Half-, and Full-Duplex TransfersHalf DuplexFull DuplexTransmitterReceiverTransmitterReceiverReceiverTransmitterReceiverTransmitter
9Parallel vs. SerialComputers transfer data in two ways:Paralleldata is sent a byte or more a time (fast)Only short distance between two systemsThe 8-bit data path is expensiveExample: printer, hard disksSerialThe data is sent one bit at a time (slow)Long distance (rarely distortion)cheapThe data can be transferred on the telephone line (by usingmodem.)
10Figure 10-1. Serial versus Parallel DataTransfer (1/2)SenderReceiverSenderReceiverSerial TransferParallel TransferD0D7
11Figure 10-1. Serial versus Parallel DataTransfer (2/2)SenderReceiverSenderReceiverSerial TransferParallel TransferD0-D7D0Other control linesOther control lines
12Serial CommunicationHow to transfer data?Sender:The byte of data must be converted to serial bits using aparallel-in-serial-out shift register.The bit is transmitted over a single data line.ReceiverThe receiver must be a serial-in-parallel-out shift register toreceive the serial data and pack them into a byte.11101000001011‘A’register8-bitcharacterregister81parallel-inserial-outserial-inparallel-out
13Asynchronous vs. SynchronousSerial communication uses two methods:In synchronous communication, data is sent in blocksofbytes.

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 93 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
cheung
Tags
Serial communication, Serial port, baud rate, RS 232

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture