Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Thumbwheel switch

Status
Not open for further replies.
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
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top