??? 02/28/04 06:53 Read: times |
#65667 - RE: About internal pull-ups Responding to: ???'s previous message |
Thanks Kai. I've assumed the i/o lines worked something like that, though I didn't know the details. The truth is I'd still need to study a schematic to get a good picture. But the point is that the "internal pull up resistors" are metaphoric. And yes, I've been simply accepting the metaphor without thinking about the implications regarding the surface physics of mechanical contacts. That was a very helpful bit of insight. It most definitely warrants explicit understanding. Really, Thanks.
Now concerning the posted question, don't you think that writing a zero to the i/o line and then pulling it to Vcc with a switch would tend to "let the smoke out?" Unless of course it was done through a current limiting device? Even then, while a current limiter might protect the µ-controller from being damaged, it still won't raise the i/o line to a 1 state will it? And what about debouncing (assuming now that the i/o line is written high and the switch pulls it low)? Since this isn't a hardware interrupt, will the normal progression of code execution take care of the problem? In other words, once one of the transition bounces breaks the execution out of the while( !SWT ) //not switch {} // Wait till switch goes high loop, is it safe to presume that the sendATCommand(); //function prototype function execution (the bulk of her code) will last longer than it will take for the bouncing to subside. Will this be sufficient consideration? I've seen bouncing last for quite a long time, especially with poorer contacts. Or should the circuit include some type of hardware debouncing? |