Hawaslsh
Full Member level 3
- Joined
- Mar 13, 2015
- Messages
- 171
- Helped
- 5
- Reputation
- 10
- Reaction score
- 7
- Trophy points
- 1,298
- Location
- Washington DC, USA
- Activity points
- 3,527
Hello all,
I have a system that requires I program 8 different SPI devices within a single chassis. Originally I had two raspberry Pis in the system, one programming 4 of the devices and another programming the other 4. I used 2 separate Pis because there were a host of other GPIOs i needed to control other devices. That solution worked great, apart from needing two Pis and needing 2 ethernet cables to run the system.
However, I wanted to compress the design down to 1 raspberry pi with an added GPIO expander, MCP23017, to cover what the second raspberry pi was intended for. The figure above shows what I tried. There was a PCB over the Pi attached to the 40 pin connector on the PI with 4 devices sharing the SPI lines (SCK, MOSI, MISO). Each device had its own dedicated GPIO for their listen enable. A second PCB housed the MCP23017 and daisy chained the same SPI lines from the Pi to the other 4 devices. I run into an issue trying to program the all the SPI devices at once. I can successfully program some of the devices when only a number/combination of devices are hooked up to the circuit. For example, If I disconnect the MCP23017 board from the PCB over the Pi, i can successfully program all the devices connected to the PCB over the Pi. However, if I simply add the SPI connection to the MCP23017 board, with no devices actually connected the MCP23017 board, all the SPI devices are left in an unknown state and do not operate correctly. Another example, I can have 1 device connected to the PCB over the PI and 2 connected to the MCP23017 board and program them successfully.
All this leads me to think there is a loading issue? Is there a common solution to this problem? I know its not common, but can pull up resistors be used to help SPI? Also, all the SPI devices have 33 Ohm resistors in series with their SPI lines, all the devices are the eval boards of the chips.
Fun testing quirk, when i tried to probe the data and clock lines with an oscilloscope, i was never able to program any chips successfully. I was using a common oscilloscope probe and set the tool to high impedance, but the loading affect of the probe itself caused the same issue.
Happy to provide more context, thanks in advance,
Sami
I have a system that requires I program 8 different SPI devices within a single chassis. Originally I had two raspberry Pis in the system, one programming 4 of the devices and another programming the other 4. I used 2 separate Pis because there were a host of other GPIOs i needed to control other devices. That solution worked great, apart from needing two Pis and needing 2 ethernet cables to run the system.
However, I wanted to compress the design down to 1 raspberry pi with an added GPIO expander, MCP23017, to cover what the second raspberry pi was intended for. The figure above shows what I tried. There was a PCB over the Pi attached to the 40 pin connector on the PI with 4 devices sharing the SPI lines (SCK, MOSI, MISO). Each device had its own dedicated GPIO for their listen enable. A second PCB housed the MCP23017 and daisy chained the same SPI lines from the Pi to the other 4 devices. I run into an issue trying to program the all the SPI devices at once. I can successfully program some of the devices when only a number/combination of devices are hooked up to the circuit. For example, If I disconnect the MCP23017 board from the PCB over the Pi, i can successfully program all the devices connected to the PCB over the Pi. However, if I simply add the SPI connection to the MCP23017 board, with no devices actually connected the MCP23017 board, all the SPI devices are left in an unknown state and do not operate correctly. Another example, I can have 1 device connected to the PCB over the PI and 2 connected to the MCP23017 board and program them successfully.
All this leads me to think there is a loading issue? Is there a common solution to this problem? I know its not common, but can pull up resistors be used to help SPI? Also, all the SPI devices have 33 Ohm resistors in series with their SPI lines, all the devices are the eval boards of the chips.
Fun testing quirk, when i tried to probe the data and clock lines with an oscilloscope, i was never able to program any chips successfully. I was using a common oscilloscope probe and set the tool to high impedance, but the loading affect of the probe itself caused the same issue.
Happy to provide more context, thanks in advance,
Sami
Last edited: