Page 1 of 1

Two questions on the ULP

Posted: Sun Aug 25, 2019 6:18 am
by wevets
I have a couple of questions on the ULP.

I want to do some bit-banging to read an HX711, an ADC device that interfaces to load cells. I have to clock the bits off the HX711, so want to output a single clock bit to one GPIO and input from another. I've got this working on the main CPUs, but want to do it also on the ULP. Can single GPIOs be written and read using the ULP? If so, what's the instruction to do it?

Second question: when the LSH instruction (Logical Shift Left) executes, does the MSB in Rsrc1 shift into the overflow flag? I don't strictly need this, but the code will be a bit uglier without it. There's no mention of this in the docs. This behavior is present in other processors I've written assembly to, and it's been convenient on occasion.

Thanks in advance.

wevets

Re: Two questions on the ULP

Posted: Sun Aug 25, 2019 9:25 am
by WiFive

Re: Two questions on the ULP

Posted: Sun Aug 25, 2019 4:10 pm
by wevets
Thank you very much. This is very helpful. I was able to decipher the portions of what I found at the link you provided that were in Chinese with the help of google/translate. Again, thanks.

Still hanging is the question of whether the MSB of a shift left goes into the overflow flag.

wevets.

Re: Two questions on the ULP

Posted: Thu Feb 20, 2020 6:55 pm
by matheusmbg
Hi mr Wevets,


I know this post is old but the subject really interests me and i couldn't find if you did actually got or not to use hx711 with ulp co-processor. I have this task aswell and i'm looking for any documentation or example i can find to help me achieve this goal.



Thank u very much,
Matheus