How to use SPI interface for external communication
I'm developing a panoramic vision system using multiple CMUCam, and I would like to connect them using SPI interface. Does any one know (or have) any firmware example teaching how to configure and use GPIO pins as a SPI interface? I've looked for SPI related functions on cc3, but it seems there's nothing that allow me to initialize pins, nor send and receive bytes.
Any help would be appreciated.
I would search for SPI examples for the LPC2106. I'm sure others outside of the CMUcam community have some sample code available. If not, it would be possible to build that code from scratch by referring to the manual. I'll poke around a bit and see if we have any SPI code around that isn't in the repository.
I've got some code examples about how to setup LPC2106 for a proper SPI connection. But now I got another problem: it seems that I cannot setup the CMUCam3 board as a SPI slave.
I was trying to connect two cams, one as master and the other as a slave, the problem is that I don't have external access to SPI_SSEL (P0.7) bit, that would control the start and finish of transmissions between them. The CMUCam3 datasheet says that the GPIO Header has a CS port, which "can be used as chip select when the MMC card is not inserted". However, it is actually connected to LPC's P0.14, and not P0.7 as I think it was supposed to be. Whithout access to SPI_SSEL (P0.7) (going low) bit I can't tell the slave cam when the transmission starts.
In the board's schematics and I saw that the P0.7 port is connect to a 3.3Vdd. Am I wrong, or in other words, it tells that the CMUCam3 board can only operate as a master device?