>
> Thanks for your reply. It confirms that I have the switch connected
> correctly (Active High). When I use the if statement it works
correctly. When I use
> the VM it give the readings I would expect. When I use the events it
does
> Nothing. I must not understand something.
I really don't care for the idea of putting a hard 5V on any input
pin. Switch inputs are almost always active low with a pull-up
resistor, either internal or external.
IOLines 8..15 have internal pull-up resistors that can be activated by
the statement:
OOPic.PullUp = cvTrue
Any pin in the range that is declared as an input will then have an
internal pull-up resistor.
The normally open switch almost always pulls the pin to ground. To
protect the OOPic from the situation where a pin is accidentally
declared as an output and subsequently pulled to ground by a switch,
it is wise to put a 220 ohm resistor between the pin and the switch.
This thing with pulling to a hard 5V will eventually lead to disaster.
Just use the .InvertIn property of the oWire to invert the logic
state of the input.
The R board uses a pull-up scheme but at least there is some
resistance in the path to the pin. I imagine the values are fairly
low but still, there is no hard 5V being applied to a pin.
Richard
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/oopic/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/oopic/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
No comments:
Post a Comment