Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/27/02 21:35
Read: times


 
#21216 - RE: Bump Sensors on a robot.
Here's another idea Chris:

Again assuming only one sensor switch would be active at a time,

1. Set your input lines to output and set them low.

2. Tie common side of switches to interrupt pin, use it's internal pullup to pull net high.

3. If a switch is closed, the low from input lines (outputting a low, remember?) cause an interrupt.

4. When an interrupt occurs, set the interrupt pin as output and set it low.

5. Change input lines to input with internal pullups active, and read them to see which switch is closed.

6. When switch opens, reset I/Os (step 1).

A bit round about, but no extra H/W is involved, except maybe some small caps to ground on the input pins to help debounce. If you are going to have different inputs active at the same time, you might be able to pair them up and use a second interrupt line.

A long way of saying "yes" to your original question!

Dennis

List of 12 messages in thread
TopicAuthorDate
Bump Sensors on a robot.            01/01/70 00:00      
RE: Bump Sensors on a robot.            01/01/70 00:00      
RE: Bump Sensors on a robot.            01/01/70 00:00      
RE: Bump Sensors on a robot.            01/01/70 00:00      
RE: Bump Sensors on a robot.            01/01/70 00:00      
RE: Bump Sensors on a robot.            01/01/70 00:00      
RE: Bump Sensors on a robot.            01/01/70 00:00      
RE: Bump Sensors on a robot.            01/01/70 00:00      
RE: Bump Sensors on a robot.            01/01/70 00:00      
RE: Bump Sensors on a robot.            01/01/70 00:00      
Have we lost the language            01/01/70 00:00      
RE: Have we lost the language            01/01/70 00:00      

Back to Subject List