I have 3 separate LCD's which have 5 push buttons to control the LCD settings and power. All push buttons on the LCD share a common ground. What I would like to do is use 1 switch bank and a 3-position rotary switch to select which LCD to adjust the settings on, however I'm unable to find an elegant solution via google. due to space limitations, I am unwilling to use a giant multi-pole rotary. Is there an IC that will handle this?
-
\$\begingroup\$ Do your GND lines need to be connected? The obvious choice would be switching the GND lines. \$\endgroup\$– JankaFeb 2, 2017 at 16:11
-
1\$\begingroup\$ @Janka The even more obvious choice is to just use a microcontroller for 8 inputs and 15 outputs. Either that or a couple of standard logic gate packages \$\endgroup\$– user103993Feb 2, 2017 at 16:19
-
\$\begingroup\$ When I can just switch the GND lines, I don't need a µC or such. Only 15 diodes and a three-way switch and that was it. \$\endgroup\$– JankaFeb 2, 2017 at 16:21
-
\$\begingroup\$ Are the LCD control lines digital or analog? A multiplexer for digital, and I think you can do the same with analog switch bank. I don't have any part numbers on hand. \$\endgroup\$– George HeroldFeb 2, 2017 at 16:22
-
\$\begingroup\$ All of the control lines are analog as far as I can tell. I was just drawing out the 15-diode-common-ground idea before I came back to check for an answer. I think I might go with that and see if it works. Thanks everyone. \$\endgroup\$– Metal-MuffinFeb 2, 2017 at 16:49
1 Answer
first of all, you have to make sure that you can work with ONE lcd, ONE rotary switch, ONE set of buttons, ....
Structuring your code in a modular way helps greatly here. for example, your lcd code would look like this:
lcd_init(LCD1); //initialize lcd1
if (rotary_read() = ROTARY_2) lcd_puts(LCD3, vBuffer); //display vBuffer on LCD3 if rotary 2 is selected
btn_state=lcd_readbtn(LCD2); //read the button states on LCD2
-
\$\begingroup\$ Theses are 800x600 LCD driver boards acting as monitors, so I'm not running them through a micro controller. I'm using the inputs included on the driver boards. Thank you, though. \$\endgroup\$ Feb 2, 2017 at 16:54