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?
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