1 / 14

ECE 447: Lecture 12

ECE 447: Lecture 12. Serial Communication. ECE447: Serial I/O Pins. PD0 - RxD (SCI) PD1 - TxD (SCI) PD2 - MISO (SPI) PD3 - MOSI(SPI) PD4 - SCK (SPI) PD5 - SS (SPI). ECE 447: SCI – Asynchronous Communication. Each device uses its own clock

louisa
Download Presentation

ECE 447: Lecture 12

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 447: Lecture 12 Serial Communication

  2. ECE447: Serial I/O Pins PD0 - RxD (SCI) PD1 - TxD (SCI) PD2 - MISO (SPI) PD3 - MOSI(SPI) PD4 - SCK (SPI) PD5 - SS (SPI)

  3. ECE 447: SCI – Asynchronous Communication • Each device uses its own clock • Clocks run at the same rate, but are not synchronized. • For communications between remote devices • Devices may be transmitters, receivers, or both.

  4. ECE 447: SCI – Asynchronous Communication • Data is sent “framed” to indicate the start and stop of a transmit unit (byte) • Start bit is a ‘0’, and stop bit is a ‘1’ • Hardware typically adds and removes the framing bits from the data • Systems typically use one start and one stop bit, however 2 or 1½ stop bits may be used.

  5. ECE 447: SCI – Asynchronous Communication • Parity is used to detect single-bit errors. • It refers to the number of ‘1’ bits in a data unit. • The quantity of ‘1’ bits cab be either “Even” of “Odd” • Not all errors can be detected. If two bits change, the parity may still be correct.

  6. ECE 447: SCI – Asynchronous Communication • Parity is used to detect single-bit errors. • It refers to the number of ‘1’ bits in a data unit. • The quantity of ‘1’ bits cab be either “Even” of “Odd” • Not all errors can be detected. If two bits change, the parity may still be correct.

  7. ECE 447: SCI – Asynchronous Communication • Serial data is measured in bits per second (BPS), Baud refers to the rate at which the signal changes. • 9600 Baud does not nessarily mean 9600 BPS. ie: 9600 baud, 8 data, no parity, 1 stop bit for a total of 10 bits per 8 bits of data. 8/10 x 9600 Baud = 7680 BPS (data)

  8. ECE 447: SCI – Asynchronous Communication

  9. ECE 447: SCI – Asynchronous Communication

  10. ECE 447: SPI – Synchronous Communication • Devices share the clock signal. • Clocks can be run at higher rates using SPI • Devices can be chained in a bus or cascade topology. (device must support cascading) • Devices act as either a master or a slave, with only one master allowed at any given time.

  11. ECE 447: SPI – Synchronous Communication • Master initiates transfer by writing data to its register. • Data is shifted out the MOSI pin and data is shifted in at the same time from MISO. • The clock is automatically driven for 8 cycles. • When complete the shift register data is transferred to the receive data register.

  12. ECE 447: SPI – Synchronous Communication • Slave initiates transfer by writing data to its register. • Data is moved to the shift register, but is not moved out unit a clock signal is received from the mater. • For each clock pulse one bit is transferred out MISO (automatically driven for 8 cycles). • When complete the shift register data is transferred to the receive data register.

  13. ECE 447: SPI – Synchronous Communication

  14. ECE 447: SPI – Synchronous Communication

More Related