I am just beginning to learn Flowcode ( V3 pro).
I need to use switches to input a number at startup ( a unit address) This is no problem, however it would be nice to be able to scan the switches using one port bit so that the port could be used for some other purpose later. Is it possible to connect switches not to 0V but to a port bit so that the switches could be scanned and then ignored?
Switches
-
- Posts: 209
- Joined: Thu Oct 19, 2006 11:46 am
- Location: Bakewell, UK
- Has thanked: 20 times
- Been thanked: 16 times
Another aspect of the point you make is that it would be useful to use port pins for two different electrical functions, initial switch input and then for something else later.
One way is to use one port pin as the '5v' or Vcc to the switches (single throw only) by setting as a 'high' output for one switch pole and the other port pins as the input lines for the other switch pole(s).
When the switch has ben read the '5v' outut pin can be made as an input pin so disabling the switches and allowing other uses for the remaining port pins.
Mark
One way is to use one port pin as the '5v' or Vcc to the switches (single throw only) by setting as a 'high' output for one switch pole and the other port pins as the input lines for the other switch pole(s).
When the switch has ben read the '5v' outut pin can be made as an input pin so disabling the switches and allowing other uses for the remaining port pins.
Mark
Go with the Flow.