Hello, did you get the protocol? I also would like to know if it is I2C or SPI
1. If it would been an I2C Protocol, the HX711 chip should contain a provision to contain 7-bit I2C address and an I2C Logic/Interface. The Fig-1 shows a digital interface which is not an I2C Interface.
Figure-1: Typical connection diagram of HX711 chip with a load cell
2. If it would been a SPI Protocol, the HX711 chip should have a SPI interface; but, HX711does not contain such interface.
3. What is this interface for the HX711 chip?
It is a customized serial interface which has no standardized rules like the I2C Standard/protocol. The manufacturer has said that the HX711 chip is a free-running chip (it does not need any command to begin data conversion); the data lines remains at LH-state as long as data conversion is going on; at the end of data conversion, the data line assume LL-state; to bring out data bit one-after-another (with MSBit first, Fig-2) one has to assert clock pulse at the clock-pin.
Figure-2: Timing diagram of HX711 chip
4. The following sketch is the translation of the timing diagram of Fig-2. This sketch reads 10 samples of data from a load cell, averages them, and show the averaged value on the Serial Monitor.
/* This program takes 10 samples from LC + HX711B at
1-sec interval and then computes the average.
unsigned long x = 0, y=0;
unsigned long dataArray;
int j = 0;
pinMode(A1, INPUT); //data line //Yellow cable
pinMode(A0, OUTPUT); //SCK line //Orange cable
for (int j = 0; j < 10; j++)
digitalWrite(A0, LOW);//SCK is made LL
while (digitalRead(A1) != LOW) //wait until Data Line goes LOW
for (int i = 0; i < 24; i++) //read 24-bit data from HX711
clk(); //generate CLK pulse to get MSB-it at A1-pin
bitWrite(x, 0, digitalRead(A1));
x = x << 1;
clk(); //25th pulse
y = x;
x = 0;
dataArray[j] = y;
unsigned long sum = 0;
for (j = 0; j < 10; j++)
sum += dataArray[j];
Serial.print("Average Count = ");
sum = sum / 10;
// float W = (float)0.90*(sum-901002)/946560 + 0.75;//0.005331 * sum - 1146.176;
//W = (float)W / 1000.00;