Page 1 of 1

is it possible to convert 16 switches to a 16bit number.

Posted: 17 Jul 2012 19:50
by PaulC
is it possible to convert 16 switches to a 16bit number.
the washing machine doesn't have a readout on it.or a finished cycle beeper.
i figured out the beeper part by reading the led high enable on end cycle & Door, also put timer on them to shut up beeper after 30 seconds.
now i want to read where the dial is so can calculate time left according to manual & display how many minutes left till end on 3 x 7-segment.
so it will only read one switch to gnd.
giving on 16 possible numbers to check, so if i could read the 16 switch's & Convert to binary, i could convert this to the 16 bit number, & would know the time from a data[15] statement.
i will figure out how to do this in the 4k limit later.
Many thanks
Paul

Re: is it possible to convert 16 switches to a 16bit number.

Posted: 26 Nov 2012 22:06
by robert_d1968
Hello there,

I gave you three examples you can try out in the AVR forum.

http://www.mikroe.com/forum/viewtopic.php?f=81&t=49549

Robert