A 1k resistor on the DIO pin can't hurt and floating a input is generaly
a bad idea. A floating input can change state unexpetantly, here's a
quick diagram of how I'd set it up.
|
| 1k Switch
uC| ->DIO_1 ---/\/\/\/----------| |--------- 3.3v
| | 10k
| |----/\/\/\/-------- GND
A 1k resistor at the DIO port, 10k pull-down to ground and a switch to
3.3v, to be honest I haven't tried this at 3.3v, only PIC's running at
5v but these values should still work fine at 3.3v.
Jason
aussie_in_seattle wrote:
> Hi folks, a newbie hardware question, hope someone can put me on the
> right path....
>
> I want to add a simple momentary pushbutton on DIO_01, and poll its
> status with software. Can I just wire the button between the 3.3V
> supply and DIO_01? i.e. input DIO_01 floats when NC, is at 3.3V when
> pressed.
>
> This appears to work, but I'm wondering whether I should add a
> resistor to limit current (if so, how do I determine the value?) or
> any other circuitry for debouncing.
>
> cheers, Andrew
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|