lrhorer
Posts: 54
Joined: Sun Feb 22, 2015 6:35 pm

Do GPIO output pins bounce?

Thu Jun 27, 2019 5:35 am

Does anyone know if setting or re-setting a GPIO output pin to its current status will cause the pin to bounce? IOW, if the pin is set high, and one issues a command in Python to set the pin high, does it momentarily drop low, or vice-versa?

User avatar
PeterO
Posts: 4859
Joined: Sun Jul 22, 2012 4:14 pm

Re: Do GPIO output pins bounce?

Thu Jun 27, 2019 7:12 am

You are asking about "glitches" rather than "bounces". Bounces are normally taken as being multiple transitions on a state change.

To answer your question , GPIO outputs are glitch free.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
HermannSW
Posts: 1307
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Do GPIO output pins bounce?

Sun Jun 30, 2019 10:29 pm

PeterO wrote:
Thu Jun 27, 2019 7:12 am
To answer your question , GPIO outputs are glitch free.
That is good to hear!

I do control 38V/1.5A led drivers powering a 5000lm led via two 24V IRF520 mosfets in series. GPIO13 is connected to SIG pin of both IRF520 modules. When Pi GPIO13 goes from high to low I would expect this:

Code: Select all

‾‾‾‾‾‾‾‾|_______
What my 100MSps logic analyzer sometimesshows is this

Code: Select all

‾‾‾‾‾‾‾‾|_|‾|______
or even this

Code: Select all

‾‾‾‾‾‾‾‾|_|‾|_|‾|______
with width of the short pulses being 10ns.
So is this a problem of having reached maximal resolution of the logic analyzer, or is this real?

[even if it is real, that is no problem for my application, but I want to know]
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 4988
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Do GPIO output pins bounce?

Mon Jul 01, 2019 10:02 pm

HermannSW wrote:
Sun Jun 30, 2019 10:29 pm
...
I do control 38V/1.5A led drivers powering a 5000lm led via two 24V IRF520 mosfets in series. GPIO13 is connected to SIG pin of both IRF520 modules. When Pi GPIO13 goes from high to low I would expect this:

Code: Select all

‾‾‾‾‾‾‾‾|_______
What my 100MSps logic analyzer sometimesshows is this

Code: Select all

‾‾‾‾‾‾‾‾|_|‾|______
or even this

Code: Select all

‾‾‾‾‾‾‾‾|_|‾|_|‾|______
with width of the short pulses being 10ns.
So is this a problem of having reached maximal resolution of the logic analyzer, or is this real?

[even if it is real, that is no problem for my application, but I want to know]
Historically I've always used oscilloscopes (never had a "logic analyser" and no longer have access to a 'scope) but maybe what the analyzer is showing is its "interpretation" of "ringing" caused by probe/cable mis-match?
Trev.
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my 2xP3A+, P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Return to “Interfacing (DSI, CSI, I2C, etc.)”