I don't consider this to be a "problem", I just thought it was interesting and so I wanted to share what I found in case someone else might find it interesting...
The microcontroller is a Teensy 4.1
Here is the sketch
#define STEP 30
void setup() {
pinMode(STEP,OUTPUT);
}
void loop() {
digitalWrite(STEP,HIGH);
delayMicroseconds(500);
digitalWrite(STEP,LOW);
delayMicroseconds(500);
}
And here is the graph on the scope ...
That is at a horizontal setting of 200 µS
And here it is at a setting of 20 nS
I was NOT expecting to see that and I can't explain why it seems to have "contact bounce" when it's switched silicone...
Mike
Switched silicone ... CPUs are made from doped silicone that's how they make the transistors in the chips ... but I suppose the more accurate way to put it would be to say that it is a switched transistor ... at least that's the assumption without knowing the specific design of the chip.
No, CPUs are made of doped silicon.
Sorry, I thought you had some sort of elastomer switch.
Have you tried tweaking your probe's compensation?
isnt this just a side effect because squarwaves are actually just "modulated" sinewaves in the right way? so to have the highest rising "edge" it actually needs to overshoot and stabalize otherwise it would be much slower or/and not squarewave enough.... sorry for my nontechnical speaking
i just know this because i come from the audio-sector
(tho im not sure if im right)
Thats ok, this is a non-formal post 
Well looking at the sketch, Im merely transitioning the pin from high to low every 500 µS ... so not sure about the "intent of a square wave" theory ... since that's not technically what I told the microcontroller to do....
Tweaking my probes compensation? How would you suggest I do that exactly?
Keep in mind that the "contact bounce" is only seen when the scope is dialed down to a setting of 20 NANOSECONDS per division ... that's EXTREMELY fast and as you can see from the first screenshot ... that contact bounce is not visible at all and I would assume that in everyday use of digital switching, this would not even remotely pose a problem.
In fact, it takes 0.00000008 seconds for that contact bounce to settle in ... difficult to imagine a scenario where that would be a problem.
i think contact bounce is not the right word, there are no moving parts in silicon
this is what i meant:

We must be looking at different pictures.
There's also undershoot on the trailing edge.
I'd check my 'scope's user manual.
Yes, I agree contact bounce is most likely an inaccurate description, but I am ignorant of any other words from which to describe it.
well ... it's difficult to see the phenomena as being the fault of the scope where making an adjustment would make that wave pattern go away ... I told the scope to auto-adjust to the waveform and its locked in very solid ... so I think what we are seeing is what is actually happening.
Here is the same sketch at 50 µS per division ... I could not get the rise and the fall on the entire screen where we can also see the "bounce" ... I have to zoom in to the tens of NANOSECONDS per division before I can see the bounce.
"ringing" - I'm not familiar with that term ... is that a known word to describe what we are seeing here?
It's right there, under the downwards-pointing blue arrow.
Pour yourself a large coffee, and google "transmission line theory"
True but it does seem to me to be more exaggerated when zoomed out ...
Well, yes, that's what zooming does.
Actually maybe not ...
The peak does seem to remain consistent throughout the zoom