SPI Chip Select

Status
Not open for further replies.
Looking at the Teensy 3.2 card, there are 5 pins labelled CS. Does this mean you can only run a maximum of 5 SPI devices from a Teensy? In my limited understanding the Chip Select pulls to ground to tell the chip to action the rest of the communication. So would this mean I can use any of the non-SPI pins for this function?

Is CS the same as 'slave select', or am I woefully confused :p
 
Yes, for SPI the terms "slave select" and "CS" mean the same thing.

There's 2 ways to generate this signal, normal digital output or optimized hardware control.

Almost all libraries and programs use the normal digital output way, which allows use of any digital pin for CS. In theory, this way could allow you to connect a very large number of SPI chips. In practice, there are limits to wire lengths and the ability of both Teensy and all the other SPI chips to drive such long wires with the capacitive loading of so many pins connected.

A few very special libraries use the optimized hardware control. One good example is ili9431_t3, which uses 2 of the special hardware controlled pins.

http://www.pjrc.com/store/display_ili9341.html

With these very special libraries, you're limited to using only those 5 special pins.
 
Is it possible to use some other pin than pin 10 for CS with the ssd1351 library ? Perhaps simply by disabling the hardware functionality ? I say simply, but I have no idea if it's that simple.. just realized I made my PCB with a CS pin that's not pin 10, and I'm getting "CS and DC need to be special chip select pins" in the log. Tried removing that if statement in the library source, but the display didn't seem to work still

It's a teensy 3.6 btw

btw, can't seem to figure out which pin is supposed to be the hardware DC pin on a teensy 3.6. It isn't on the pin diagram. Any ideas?
 
They are marked as "CS" on the printed card. I don't know if the library supports all of them - you have to read its documentation.
 
right.. i'm wondering why chip select (the same as SS I assume) needs a specific pin. Isn't it merely a signal that's either low or high in order to enable or disable a certain SPI slave? How come this needs a specific pin? Sorry for my ignorance. Shoot.. I see Paul answered this already in a post above. sorry
 
Status
Not open for further replies.
Back
Top