Don't know if anyone can get some use out of this?
I have used a Cherry BCD rotary switch
http://uk.farnell.com/cherry/pefa3000/switch-bcd-complement/dp/1180021
http://www.cherrycorp.com/english/switches/pdf/pushwheel.pdf
Just put your +5v (or what ever) to the C and the other 4 to the Picaxe. Below is what I get for each value. The rest I am just serrially transmitting it to another device, you may not need this.
Hope someone can find this of some use, I was pretty happy when it worked
I have used a Cherry BCD rotary switch
http://uk.farnell.com/cherry/pefa3000/switch-bcd-complement/dp/1180021
http://www.cherrycorp.com/english/switches/pdf/pushwheel.pdf
Just put your +5v (or what ever) to the C and the other 4 to the Picaxe. Below is what I get for each value. The rest I am just serrially transmitting it to another device, you may not need this.
Hope someone can find this of some use, I was pretty happy when it worked
Code:
' 0 - 11110000
' 1 - 01110000
' 2 - 10110000
' 3 - 00110000
' 4 - 11010000
' 5 - 01010000
' 6 - 10010000
' 7 - 00010000
' 8 - 11100000
' 9 - 01000000
'
b21= pinsB AND %11110000 'Read value on BCD switch on pins pinsB 4,5,6,7
SerOut A.4, N2400, (b21) 'send b19 value out pin A.4
Last edited: