I was wondering that too...
And BCD and 16 pos didn't sound right either.
Maybe Vshort could clarify please.
I would have thought that a rotary switch (as in genuine clickety-click switch) was a bad way to go for a volume control that could be twiddled regularly and vigorously. Was that the only thing you had in the drawer?
With the switch I'd have used an interrupt-timer to check for changes in value, then process direction and magnitude.
That's what I did with a rotary switch PIC interface and it worked really well.
Okay, Sorry for the Hiatus. I've been a little under the weather.
Yes, this is a true BCD Switch. NKK Part number FR01-AC16 (
Datasheet here) You can see the BCD Truth table on G7. Perhaps calling it a "16 position" switch isn't the right term. I say that because the switch has 16 different "clicks" on it and it's capable of generating 0 - F in Binary. Does that clarify?
This isn't going to be used as a volume switch, rather it' being used as a tuning knob for an aviation band radio receiver. Each "click" tunes up .05mhz between the 108 and 118mhz band.
I have it working smoothly now. Here's how:
Common on the BCD goes to ground. Each of the 4 "byte" pins goes to a pin on the picaxe. That same pin is the driven high through a 10K resistor. - problem solved.
Before, I was running 5v to the switch "common", wiring up each "byte" pin to the picaxe and having all sorts of problems as described above. Reverse the circuit and it works perfectly. I don't fully understand why though. Would someone like to help me understand this?
Here's a rudimentary schematic