I connect the collector of an opto-coupler, ACPL-847-300E, with one PIN of the iMX6, PIN configured as GPIO inport, Schmitt-trigger, slow, 22kOhm. That works fine, inverted logic.
Now I placed a 3.3nF capacitor to that PIN, hoping to control the frequency, 1/2*PI*R*C, by the PIN control register.
But the behavior is not like expected. Falling edges lead to one edge, but rising edges lead to more then one rising-falling edge. Like the signal bounces around the threshold of being 1 or 0.
The put the filter in the entrance of the opto-coupler is more likley, I think. But the possibility to change the cutoff frequency would be nice.
Is it impossible, or would I need more then a capacitor?
Many thanks for your help.