DSPIC33FJ12MC202 Microchip Technology Inc., DSPIC33FJ12MC202 Datasheet - Page 176

no-image

DSPIC33FJ12MC202

Manufacturer Part Number
DSPIC33FJ12MC202
Description
High-performance, 16-bit Digital Signal Controllers
Manufacturer
Microchip Technology Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
DSPIC33FJ12MC202-E/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
DSPIC33FJ12MC202-I/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
DSPIC33FJ12MC202-I/SO
0
Part Number:
DSPIC33FJ12MC202-I/SP
0
Part Number:
DSPIC33FJ12MC202-I/SS
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
dsPIC33FJ12MC201/202
16.5
To set up the SPI module for the Slave mode of operation:
1.
2.
FIGURE 16-1:
DS70265B-page 174
Clear the SPIxBUF register.
If using interrupts:
a)
b)
c)
SDOx
SCKx
SDIx
SSx
SPI Setup: Slave Mode
Clear the SPIxIF bit in the respective IFSn
register.
Set the SPIxIE bit in the respective IECn
register.
Write the SPIxIP bits in the respective IPCn
register to set the interrupt priority.
Read SPIxBUF
Control
Sync
Transfer
SPI MODULE BLOCK DIAGRAM
SPIxRXB
bit 0
SPIxBUF
SPIxSR
Control
Clock
Shift Control
SPIxTXB
Transfer
Write SPIxBUF
Preliminary
Select
Edge
3.
4.
5.
6.
7.
The SPI module generates an interrupt indicating
completion of a byte or word transfer, as well as a
separate interrupt for all SPI error conditions.
16
Write the desired settings to the SPIxCON1 and
SPIxCON2
(SPIxCON1<5>) = 0.
Clear the SMP bit.
If the CKE bit is set, then set the SSEN bit
(SPIxCON1<7>) to enable the SSx pin.
Clear the SPIROV bit (SPIxSTAT<6>).
Enable SPI operation by setting the SPIEN bit
(SPIxSTAT<15>).
Secondary
1:1 to 1:8
Prescaler
Internal Data Bus
registers
1:1/4/16/64
Prescaler
Primary
© 2007 Microchip Technology Inc.
F
SPIxCON1<1:0>
SPIxCON1<4:2>
Enable
Master Clock
with
CY
MSTEN

Related parts for DSPIC33FJ12MC202