Thumbwheel switch

It's usually used for scrolling navigation in handheld devices. You can figure out the pins by reading the datasheet or simply using a multimeter to find out what they do when you operate it.
 
BCD Thumbwheel Switch is used to input-set data in digital form, this can be read by digital circuits, uC and uP systems and PLC-SCADA Interfaces.
 
I use two thumbwheel switches to select stall/service tracks for a model railroad roundhouse and turntable. Here is how to read the two switches using a PicAxe controller with the switch commons tied to + voltage.

cnt1 = pins & $0F
cnt1 = pin4 * 10 + cnt1
cnt1 = pin5 * 20 + cnt1

If the switch commons are grounded and b0 can be used
then use the following:

b0 = pins ^ $3F
cnt1 = b0 & $0F
cnt1 = bit4 * 10 + cnt1
cnt1 = bit5 * 20 + cnt1

cnt1 is the decimal value of the two switches.

Al
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…