[Question] How do I change GPIO Rise Time?

I'm trying to compare the noise levels on different GPIO lines ... is there a good way to change a signal's rise time when going from HIGH to LOW/ LOW to HIGH?

Rise time/ slew rate for a signal affects ground bounce ...
I know how to measure that, but would like to know the best way to slow down the rise time/ slew rate of the GPIO pins (while they switch) in a repeatable way.

I was thinking PWM ... but I'm not trying to toggle a PIN a bunch of times a second ... unless I can say toggle at a certain frequency but always change state at a specific rate.

Thank you!

example

void loop(){
PORTB = B111111; //toggle on
PORTB = B000000; //toggle off
}

will switch PORTB on and off as fast as can be ...

void loop(){
PORTB = B111111; //toggle on
delay(500);
PORTB = B000000; //toggle off

}

this will toggle them on and off ... and wait half a second between doing that ...
but what the second snippet doesn't do is switch PORTB from HIGH to LOW at a certain, defined rate.

ideas?

The rise and fall times of a processor pin can't be changed. They are characteristics of the chip technology. There are narrow ranges that the times can be under conditions of temperature, voltage, etc. See the processor data sheet.

Rise & fall times can be changed by adding resistance and capacitance to the lines. Basically a lowpass filter.

The ARM-based processors used in the Teensy 3.x family have drive strength control. Apparently AVR processors don't.

CrossRoads:
Rise & fall times can be changed by adding resistance and capacitance to the lines. Basically a lowpass filter.

huh.
hadn't thought of that.

thank you!

any terms that I should be searching for (other than low pass filter) when learning how to do that?