Hi folks and Merry Christmas!
Attached is my schematic. As you can see I use the uC SN250 as SPI master for reading data on the same bus, both from an SPI memory (M25P128) and a SPI pressure sensor (MS5540C). The 74AHC1G126 3-state buffer is because the sensor does not have any CS# line. When GPIO3 is LOW, then the flash memory is enabled for communication and the buffer is in high-Z, whereas when GPIO3 is HIGH, then the buffer is enabled and communication with the sensor an be performed. The SG303LC oscillator provides a clock necessary for the operation of the integral ADC of the sensor. All components are included on the same PCB except for the sensor, which is 3m away. The problem I experience is that the SPI bus seems not to be working correctly, when this long twisted and shielded 3m cable is connected. On the contrary, if the sensor is put very close to the PCB (20cm cables) everything works fine.. When the sensor is connected so far away, I can neither read from the sensor neither read from the memory correctly. Is it possible that the long cables by their own produce such a serious problem? Are you aware of any maximum distance for the SPI bus? Do you have anything else to propose as the reason for this problem?
Thanks!
Attached is my schematic. As you can see I use the uC SN250 as SPI master for reading data on the same bus, both from an SPI memory (M25P128) and a SPI pressure sensor (MS5540C). The 74AHC1G126 3-state buffer is because the sensor does not have any CS# line. When GPIO3 is LOW, then the flash memory is enabled for communication and the buffer is in high-Z, whereas when GPIO3 is HIGH, then the buffer is enabled and communication with the sensor an be performed. The SG303LC oscillator provides a clock necessary for the operation of the integral ADC of the sensor. All components are included on the same PCB except for the sensor, which is 3m away. The problem I experience is that the SPI bus seems not to be working correctly, when this long twisted and shielded 3m cable is connected. On the contrary, if the sensor is put very close to the PCB (20cm cables) everything works fine.. When the sensor is connected so far away, I can neither read from the sensor neither read from the memory correctly. Is it possible that the long cables by their own produce such a serious problem? Are you aware of any maximum distance for the SPI bus? Do you have anything else to propose as the reason for this problem?
Thanks!