








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









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
docsity.com
docsity.com
z
Serial Peripheral Interface (SPI)
z
Inter-integrated Circuit (I²C)
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
docsity.com
docsity.com
docsity.com
docsity.com
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
docsity.com