Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

Driving SPI Ports


  • Please log in to reply
2 replies to this topic

#1 MarcoAndarcia

MarcoAndarcia
  • Members
  • 17 posts

Posted 28 February 2013 - 09:45 AM

Hi. I am working on a project that requires me to drive 8 SPI devices. I can't find anywhere on the datasheet how many SPI devices I can drive from a single SPI port from the labjack. I was wondering if someone can point me where that information is. Thanks in advance.

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 28 February 2013 - 01:16 PM

There are a couple ways to talk to multiple SPI devices: 1. Use different CLK/MISO/MOSI lines for each device, and just tie CS to GND on each device. The U6 has 20 digital I/O available for SPI, so not enough to do 8 with this technique. 2. Use 3 digital I/O to provide CLK/MISO/MOSI, and then use 1 digital output for each device to control CS. This lets you talk to up to 17 devices. The potential issue with the latter technique, is the the 3 CLK/MISO/MOSI lines are connected to 18 devices at the same time. 1 device is driving the line, while 17 devices are set to high-impedance input mode. If the impedance of the 17 devices is too low, or the capacitance is too high, you can have communication problems. With standard logic, I would not expect impedance or capacitance to be a problem. Two recommendations: - Use EIO or CIO lines for CLK/MISO/MOSI, as they have less impedance than FIO lines. - If you have too much capacitance (rise and fall times are too slow), you can use SPI_CLOCK_FACTOR to slow down the SPI data rate.

#3 MarcoAndarcia

MarcoAndarcia
  • Members
  • 17 posts

Posted 01 March 2013 - 08:20 AM

2. Use 3 digital I/O to provide CLK/MISO/MOSI, and then use 1 digital output for each device to control CS. This lets you talk to up to 17 devices.

The potential issue with the latter technique, is the the 3 CLK/MISO/MOSI lines are connected to 18 devices at the same time. 1 device is driving the line, while 17 devices are set to high-impedance input mode. If the impedance of the 17 devices is too low, or the capacitance is too high, you can have communication problems. With standard logic, I would not expect impedance or capacitance to be a problem. Two recommendations:

- Use EIO or CIO lines for CLK/MISO/MOSI, as they have less impedance than FIO lines.

- If you have too much capacitance (rise and fall times are too slow), you can use SPI_CLOCK_FACTOR to slow down the SPI data rate.



I was planning to do that. Use 3 I/o Lines for SPI and I have a multiplexer to control the CS lines. I was just wondering if the Digital I/O could drive 8 lines for my devices.

Thanks.

Marco.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users