pic32mx320f064h Microchip Technology Inc., pic32mx320f064h Datasheet - Page 330

no-image

pic32mx320f064h

Manufacturer Part Number
pic32mx320f064h
Description
64/100-pin General Purpose, 32-bit Flash Microcontrollers
Manufacturer
Microchip Technology Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
pic32mx320f064h-40I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-40I/PT
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
pic32mx320f064h-40V/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-80I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-80V/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064hT-40I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
PIC32MX FAMILY
17.2.3
In Slave mode, data from the SPIxBUF register is
transmitted synchronously on the SDO (output) pin
while synchronous data is received from the Master
device on the SDI (input) pin. In this mode, the Master
device controls the synchronous data transfer with the
SCK clock pin by generating 8, 16 or 32 clock pulses,
depending on the selected data size.
17.2.3.1
The SDO pin is an output and the SPI pin is an input.
Setting the control bit, DISSDO (SPIxCON<12>),
disables transmission at the SDO pin if Receive Only
mode of operation is desired.
Refer to Table 17-7.
The SDI (input) must be configured to properly sample
the data received from the slave device by configuring
the sample bit, SMP (SPIxCON<9>).
Refer to timing diagram shown in Figure 17-4 to deter-
mine the appropriate settings.
Data transfers can be 8, 16, or 32-bits and are
configured
(SPIxCON<11:10>).
Refer to Section 17.2.1 “8, 16, 32-Bit Operation” for
details.
Slave Select Synchronization: The SSx pin allows a
Synchronous Slave mode. If the SSEN (SPIxCON<7>)
bit is set, transmission and reception is enabled in
Slave mode only if the SSx pin is driven to a low state.
If the SSEN bit is not set, the SSx pin does not affect
the module operation in Slave mode.
17.2.3.2
The following bits must be configured as shown for the
Slave mode of operation when configuring the
SPIxCON register:
• Enable Slave Mode –
• Disable Framed SPI support – FRMEN
The remaining bits are shown with example configura-
tions and may be configured as desired:
• Enable module control of SDO pin –
• Configure SCK clock polarity to Idle high –
• Configure SCK clock edge transition from Idle to
• Disable Slave Select Pin –
• Select 16-bit data width –
• Sample data input at middle –
DS61143A-page 328
(SPIxCON<31>) = 0
active – CKE (SPIxCON<8>) = 0
MSTEN (SPIxCON<5>) = 0.
DISSDO (SPIxCON<12>) = 0
CKP (SPIxCON<6>) = 1
SSEN (SPIxCON<7>) = 0
MODE<32,16> (SPIxCON<11:10>) = 01
SMP (SPIxCON<9>) = 0
SLAVE MODE
Slave Mode Operations
using
Slave SPIxCON Configuration
control
bits.
MODE<32,16>
Advance Information
• Enable SPI module when CPU Idle –
17.2.3.3
The following steps are used to set up the SPI module
for the Slave mode of operation:
1.
2.
3.
1.
2.
3.
4.
5.
SIDL (SPIxCON<13>) = 0
Note 1: The user must turn off the SPI device
If interrupts are used, disable the SPI interrupts
in the respective IEC0/1 register.
Stop and reset the SPI module by clearing the
ON bit.
Clear the receive buffer.
If using interrupts, the following additional steps
are performed:
• Clear the SPIx interrupt flags/events in the
• Set the SPIx interrupt enable bits in the
• Write the SPIx interrupt priority and subprior-
Clear the SPIROV bit (SPIxSTAT<6>).
Write the selected configuration settings to the
SPIxCON
(<SPIxCON<5>) = 0.
Enable SPI operation by setting the ON bit
(SPIxCON<15>).
Transmission (and reception) will start as soon
as the master provides the serial clock.
respective IFS0/1 register.
respective IEC0/1 register.
ity bits in the respective IPC5/7 register.
2: The SPI device must be turned off prior to
3: The SPIxSR register cannot be written
prior to changing the CKE or CKP bits.
Otherwise, the behavior of the device is
not ensured.
changing the mode from Master to Slave.
into directly by the user. All writes to the
SPIxSR register are performed through
the SPIxBUF register.
Slave Mode Initialization
register
© 2007 Microchip Technology Inc.
with
MSTEN

Related parts for pic32mx320f064h