Hi Richard,
I've never used the (M)SSP module in SPI Slave mode but here's the way I understand it:
The SS\ pin, when enabled is an active low input. When high (inactive) the (M)SSP module is held in reset meaning no data will be clocked in.
Only when the SS\ pin is low (active) will data actually be clocked in. This is of course so you can have multiple slaves on the bus and individually selecting which one to talk to by pulling the specific slaves SS\ line low - as you would with any SPI device pretty much.
In slave mode, the SSPIF (PIR1.3) gets set when 8 bits have been shifted in, look at figures 9.3 and 9.4, if SSPIE is set and interrupts enabled an interrupt will be tripped. The SSPIF flag needs to be cleared by your interrupt service routine.
/Henrik.
Bookmarks