Two questions on the ULP

wevets
Posts: 112
Joined: Sat Mar 09, 2019 2:56 am

Two questions on the ULP

Postby wevets » Sun Aug 25, 2019 6:18 am

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

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Two questions on the ULP

Postby WiFive » Sun Aug 25, 2019 9:25 am


wevets
Posts: 112
Joined: Sat Mar 09, 2019 2:56 am

Re: Two questions on the ULP

Postby wevets » Sun Aug 25, 2019 4:10 pm

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.

matheusmbg
Posts: 10
Joined: Thu Feb 20, 2020 2:44 pm

Re: Two questions on the ULP

Postby matheusmbg » Thu Feb 20, 2020 6:55 pm

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

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 225 guests