|
24-6-2004 21:06 Views: 1870 |
phwhite |
| | | RE: Sensing two switch contacts with one digital I/O on 932 Hi
I''ve not tried this, but it may work!
The basic idea is to put a different value resistor in series with each switch from 3V, with the resistors feeding a single capacitor. The I/O pin connects to the RC junction through another resistor RL. Other end of the cap connects to 0V.
To determine if a switch is closed, set the I/O pin to 0V to first discharge the cap. Then set the pin as an input. If either switch is closed, the cap will charge through the associated resistor. The micro should time how long it ... more (see whole posting) |
|
14-7-2004 4:15 Views: 1902 |
steveglover |
| * | | RE: Sensing two switch contacts with one digital I/O on 932 I had thought of something like that but wanted a scheme that could determine the state of the pin with just one visit, rather than checking it again after a delay.
On the other hand, if the RC time constant was small enough you wouldn''t need to wait that long anyway.
Thanks for the comments. |
|
25-7-2004 2:20 Views: 1865 |
phwhite |
| | | RE: Sensing two switch contacts with one digital I/O on 932 HI!
Here is a idea non tested, to connect 2 switches on a single LPC932 port without timer.
HARDWARE SHEMATIC:
Connect the switch SW1 between the port and 0V .
Connect the other switch SW2 in series with R1=1Kohm between the port and +3V.
Connect a resistor R2 (2.2Mohm) between the port and 0V.
SOFTWARE:
1)The software put the port in input-only mode.
If the state of the port is 1 (level=+3V) then the switch SW2 is ON.
2)Folowing, The software put the port in quasi-bidirectional mode.
If the state of the port is 0 (level=0V) then the switch ... more (see whole posting) |
|
17-9-2004 14:35 Views: 1862 |
pcayarcy |
| | | RE: Sensing two switch contacts with one digital I/O on 932 switch to a 935. You can than use the ADC to read as much as 12 switches on 1 I/O pin by using a voltagedivider network. I have done this often and is does work realy fine. 932 and 935 are pincompatible and the difference in price is nearly nothing.
succes
BEst regards
Robert |
|
15-8-2006 12:50 Views: 1267 |
RobertUD |