You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi, great work, I eventually succed to work this lib on teensy hardware, but sample rate was slow (default 10SPS) and get hard to open monitor.
so I look at .cpp and I was intrigued by line 133 (read function) : for (unsigned int i = 0; i < 128; i++) { digitalWrite(PD_SCK, HIGH); #if ARCH_ESPRESSIF delayMicroseconds(1); #endif digitalWrite(PD_SCK, LOW); #if ARCH_ESPRESSIF delayMicroseconds(1); #endif }
why do you produce 128 pulses? according to datasheet, hx710b need between 25 an 27 pulse to properly work
PD_SCK / Pulses Input / Data Rate
25 / Differential input / 10 Hz
26 / Temperature / 40 Hz
27 / Differential input / 40 Hz
so I done some change (I work on teensy LC, I guess I need some timing between pulse) : for (unsigned int i = 0; i < 3; i++) { digitalWrite(PD_SCK, HIGH); //#if ARCH_ESPRESSIF delayMicroseconds(1); //#endif digitalWrite(PD_SCK, LOW); //#if ARCH_ESPRESSIF delayMicroseconds(1); //#endif }
It seem's to work properly and I double at least the sample rate near 25-30SPS (I guess serial routine slow down a bit the theorical 40SPS).
I'm not sure my butcher's code will work on other boards so I let you (or community) to pull this crap properly :)
The text was updated successfully, but these errors were encountered:
hi, great work, I eventually succed to work this lib on teensy hardware, but sample rate was slow (default 10SPS) and get hard to open monitor.
so I look at .cpp and I was intrigued by line 133 (read function) :
for (unsigned int i = 0; i < 128; i++) { digitalWrite(PD_SCK, HIGH); #if ARCH_ESPRESSIF delayMicroseconds(1); #endif digitalWrite(PD_SCK, LOW); #if ARCH_ESPRESSIF delayMicroseconds(1); #endif }
why do you produce 128 pulses? according to datasheet, hx710b need between 25 an 27 pulse to properly work
PD_SCK / Pulses Input / Data Rate
25 / Differential input / 10 Hz
26 / Temperature / 40 Hz
27 / Differential input / 40 Hz
so I done some change (I work on teensy LC, I guess I need some timing between pulse) :
for (unsigned int i = 0; i < 3; i++) { digitalWrite(PD_SCK, HIGH); //#if ARCH_ESPRESSIF delayMicroseconds(1); //#endif digitalWrite(PD_SCK, LOW); //#if ARCH_ESPRESSIF delayMicroseconds(1); //#endif }
It seem's to work properly and I double at least the sample rate near 25-30SPS (I guess serial routine slow down a bit the theorical 40SPS).
I'm not sure my butcher's code will work on other boards so I let you (or community) to pull this crap properly :)
The text was updated successfully, but these errors were encountered: