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?