Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: T3.6 SPI1 alternative CS?

  1. #1
    Junior Member
    Join Date
    Nov 2016
    Posts
    7

    T3.6 SPI1 alternative CS?

    Am planning to use SPI0 and SPI1 on T3.6. I see SPI0 has several *dedicated* CS pins available (e.g. pins 9, 10, 15). For SPI1, I only see a single dedicated CS = pin 31, with no alternatives listed on the pinouts posted on PJRC or elsewhere. Two questions:

    1. Am I missing something...are there no dedicated alternative/additional CS1 pins available? (SPI0 and SPI2 also has multiple dedicated CS pins...is SPI1 different?)
    2. I read in documentation that pretty much any digital line with serve well as SPI CS line provided the slave device's library isn't optimized to use a dedicated hardware pin. This is my case. So maybe I just pick another digital output to serve as the second CS?

    Reason I ask: I am actually connecting 2x of the same device (bioamplifier) to the same SPI port. Right now I have 2 amps connected to SPI0---amp#1 and #2 share a common MISO0, MOS0I, SCK0, but have different CS lines. Amp#1 CS line connects to T.36 pin 9 and amp#2 CS to pin 10. I'm now planning to add 2 more amplifiers (double the channel count) on using either SPI1 or SPI2. Just trying to find the metaphorical path of least resistance.

    Thanks in advance for any info/insight you can share!

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,724
    The answer depends on the code you're using. If you control CS with ordinary GPIO, then you can use any digital pins for both CS signals.

    If you use the special hardware CS, as is done by very special libs like ILI9341_t3, then you must use specific pins and SPI1 probably won't be a viable choice.

  3. #3
    Junior Member
    Join Date
    Nov 2016
    Posts
    7
    Thanks for the quick reply, Paul! All makes sense. No special library for my application---so the good news is I can just use ordinary GPIO to control CS.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •