captouch_getCurrentState

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I noticed this function in the v2.0.1 API reference guide:

Gets the current state of gpioPortPin.

Parameters
gpioPortPinThe port + pin to sense.
periodThe sampling period in number of 24MHz clock cycles.
Returns
The return value is the number of oscillations the capsense input oscillated in period.

Are there any examples of using this function or documentation on the hardware that it uses?  Which GPIO pins on the BCM20737/BCM20736S are compatible with this function? What is the oscillation frequency as a function of load capacitance? What (if anything) do I need to do to set up the pin for capacitive measurements?

0 Likes
1 Solution
Anonymous
Not applicable

Based on the comments in captouch_getCurrentState, I was able to figure out how to use the function.  A pullup resistor and capacitor on the pin is all that is necessary, and it does not appear to need any other setup (hardware or software).  The timing is based on the RC time constant.

Thanks for your help, JT!

View solution in original post

0 Likes
3 Replies