i have a question, need help?

Status
Not open for further replies.

anhngoc032

New member
Can someone enlighten me please as to the point of a dedicated labeled CS pin, as in that the CS pins is labeled as such, but it seems that the SPI library or possibly even the SPI Hardware module, doesn't actually use it. And you can use any IO pin for CS.

A lot of the SPI based code that uses the SPI library always seems to set the CS pin in a digitalWrite prior to a transfer, Point taken from the barmetric IDE supplied example
 
The dedicated CS pins are used by some SPI drivers to speed up the SPI communication by using DMA to move the data. If the SPI device also has a D/C pin, you would need to use the dedicated pins for both of them. Several of the OLED/TFT display drivers (starting with the optimized ILI9341 library) as well as the ethernet driver use these dedicated pins.


If you don't have a device that has the optimizations, you can use any digital pin for the CS pin.

It is good you posted your queries as separate threads. It would be helpful in the future if you set the subject line to be more specific to aid those of us who skim the subject lines for threads to read and possibly answer.
 
Status
Not open for further replies.
Back
Top