Needed a code to run sensor

nsaspook

Joined Aug 27, 2009
13,273
https://github.com/bogde/HX711

What an odd-ball digital interface.
https://image.dfrobot.com/image/data/SEN0160/hx711_english.pdf
Serial Interface
Pin PD_SCK and DOUT are used for data
retrieval, input selection, gain selection and power
down controls.
When output data is not ready for retrieval,
digital output pin DOUT is high. Serial clock
input PD_SCK should be low. When DOUT goes
to low, it indicates data is ready for retrieval. By
applying 25~27 positive clock pulses at the
PD_SCK pin, data is shifted out from the DOUT
output pin. Each PD_SCK pulse shifts out one bit,
starting with the MSB bit first, until all 24 bits are
shifted out. The 25th pulse at PD_SCK input will
pull DOUT pin back to high (Fig.2).
Input and gain selection is controlled by the
number of the input PD_SCK pulses (Table 3).
PD_SCK clock pulses should not be less than 25
or more than 27 within one conversion period, to
avoid causing serial communication error.
 
Top