SPI Master / SPI Slave via PIC

Schematic Overview
           The SPI Master / SPI Slave via PIC circuit is not terribly difficult however it will take some double checking to make sure you have everything hooked up properly before working the first time. The main devices used in the circuit are the 7805, 18F452 and 5mm LEDs.


View Full Schematic

Schematic Specifics

Power Regulator Circuit
           The power regulator circuit used here is a standard 7805 +5v regulator with bypass capacitor off of the output to help keep current flow steady. Both PICs will use the same power supply to make our lives a little easier.

SPI Terminology
SPI_SCLK - SPI Clock
This is the connection that the master uses to send the clock data to the slave. The pin is set as an output on the master and as an input on the slave.
SPI_MOSI - SPI Master Output Slave Input
The SPI master uses this connection to send any slave address information or data information (often both). Only the master can use this connection.
SPI_MISO - SPI Master Input Slave Output
The SPI slave devices use this connection to the master to resond to queries for data. In this tutorial the slave will only be accepting data, not returning any.
SPI_SS - SPI Slave Select
This connection tells a slave when to get ready for incoming data. It is optional on some devices, but if you have many slaves on the SPI bus it is necessary to avoid conflicting responses from two slave devices, since they all use the same MISO bus connection.

LED Output Port 7 LEDs will be used to display the data transferred to the SPI slave PIC from the SPI master PIC. I'm not sure why I used 7 and not 8 but I guess it doesn't really matter. LEDs counting down = success!



;