Right now I'm trying to write a driver for HX711 ADC for Weight Scales which is using SPI to communicate and I've found some issues.
I'm using Intel Edison + Arduino Breakout Kit (https://www.sparkfun.com/products/13097
) connected to my HX711 and a load-cell.
When I do a spi.read(buffer, 1) it should pulse the clock 8 times (corresponding with those 8bits I want to read), but in reality it happens something different.
I hook my Logic Analyzer and I get the following SPI Clock signal (see the upper half of 1st image):
- where is that red arrow is the actual clock (under the arrow is a zoom of those clock pulses) triggered by my spi.read()
- and before that clock I have some LONG clock pulses that are not part of my code.
Those 3 long pulses will break the SPI connection with HX711, which will be fooled and will enter sleep mode
I've tried the same code but this time using Raspberry PI 3 (see the 2nd image) and this issue doesn't reproduce anymore.
But using RPI3 I can see another possible issue at the clock signal. I'm trying to read 3 bytes (24 bits) and look at the clock, there is an break between every byte. In some cases this could affect the communication if the break is long enough.