Rabbit 67xx SPI

Hello,

I am wondering if the SPI.LIB can handle multiple SPIs on a single board.

For example

//#define SPI_SER_C
//#define SPI_SER_D
//#use “spi.lib”

Also if i can do that then how do I use the spi library functions to read and write bytes from a specific spi.

Thanks for the help in advanced.

–JP

This is a few months late, but the beauty of SPI is that you can put multiple devices on the same bus. Then you just have a separate Chip Select for each one.

So you enable the one you want to talk to:
SelectSPIDisplay(0); (setting the pin low)

Do your reading and or writing:
SPIWrite(&DisplayRead, 1);
SPIRead(&DisplayRead2, 1);

Then turn off the chip select
SelectSPIDisplay(1);

Maybe some delays or yields in there as well for slow things.