SPI

In this form it is possible to plan the peripheral MSSP for the communication with other devices SPI. The commands that interest this peripheral are:

Configuration SPI Master

1. Operational formality of the peripheral MSSP.
2. Enable/Disable of the peripheral.
3. Modes of SPI:


CKP and CKE combine
CKP will determine if the clock idles high or low
CKE is the Clock Edge Select bit

4. Formulation of the instructions used in PUT and GET.
Example memory 25AA020A:

Name Instruction Format Description
READ 0000 x011 Read data from memory array beginning at selected address
WRITE 0000 x010 Write data to memory array beginning at selected address
WRDI 0000 x100 Reset the write enable latch (disable write operations)
WREN 0000 x110 Set the write enable latch (enable write operations)
RDSR 0000 x101 Read STATUS register
WRSR 0000 x001 Write STATUS register

5. Connection to the pin CS (SS) del dispositivo slave.
6. Addition of another slave on the BUS.

Configuration SPI Slave

The management of the peripheral I2C Slave happens through interrupt

1. Operational formality of the peripheral MSSP.
2. Enable/Disable of the peripheral.
3. Modes of SPI:


CKP and CKE combine
CKP will determine if the clock idles high or low
CKE is the Clock Edge Select bit.


4. Dimension of the buffers (1-128)byte.