Docsity

USART Synchronous Mode-Embedded System Control-Lecture Slides, Slides of Embedded Control Systems

Partial preview of the text

Download USART Synchronous Mode-Embedded System Control-Lecture Slides and more Slides Embedded Control Systems in PDF only on Docsity!

USART Synchronous Mode z

Synchronous Master Mode (Internal Clock)

z

Synchronous Slave Mode (External Clock)

z

Transmit or Receive at one time

TXSTA RegisterRXSTA Register 7

CSRC

TX

TXEN

SYNC


BRGH

TRMT

TX9D

SPEN

RX

SREN

CREN

ADDEN

FERR

OERR

RX9D docsity.com

USART Synchronous Transmission

docsity.com

Synchronous Slave Mode z

Clock pin (pin No. 25, RC6) is clock inputrather than output.

docsity.com

Master Synchronous Serial Port(MSSP) z

Transmitter and Receiver share the commonclock

z

No need to set any baud rate z

Serial Peripheral Interface (SPI)

z

Inter-integrated Circuit (I²C)

z

Both SPI and I²C share the same Signal lines z

Serial Data Out (SDO) --- RC5/SDO

z

Serial Data In (SDI) --- RC4/SDI

z

Serial Clock (SCK) --- RC3/SCK

z

Slave Select (SS) --- RA5/SS

docsity.com

Serial Peripheral Interface (SPI) z

Produced by Motorola

docsity.com

SPI Block Diagram

docsity.com

docsity.com

SPI Slave Mode with CKE = 0

docsity.com

Example z

Configure the MSSP in the SPI master mode to shift data on therising edge. The SCK signal must be idle low. The data rateshould be set to 2.5Mbps, assuming that Fosc is 10MHz. z

SSPCON

z

Bits 7 and 6 are status bits and set to 0

z

Bit 5 should be set to 1 to enable SPI port pins

z

Bit 4 should be set to 0 to select idle low

z

Bits 3 to 0 should be set to 0000 to set data rate to 2.5Mbps alsoselect SPI master mode.

z

SSPSTAT

z

Bit 7 should be set to 0 to sample input in the middle of dataoutput time

z

Bit 6 should be set to 1 to select the rising edge of the SCK

z

Bits 5 to 1 are don’t care and should be set to 0.

z

Bit 0 is status bit for completion of data transmission

docsity.com

SUMMARY

docsity.com