@3v0 & @erricgibbs
actually the 8051 boards are custom made(i.e. its PCB not development board where I can change connections).Only the LCD connectors are detachable from both the boards .So I can't make now one microcontroller sending request to other for display(because I have only 2 spare pins left on each of microcontroller).What I am planning is follows :
1)Change code and use one extra pin(name it command pin,set by default to high) from each of the boards .This pin will be used to indicate whether the uC is to be in "Halt" state or not.
2)Both the boards will now have a common power switch.
3)When powered on,each of them will be in a "Halt" state till it gets a signal on the "command pin".
3)And the other power switch will be replaced by a DPDT switch such that when its is switched UP ,board 1 gets command to now set its port as output and initialize LCD and continue its normal operation.
4)Now to select board 2,reset the power supply to both the boards,so that again they are in "halt" state and now when the switch is pushed DOWN,board2 will get command signal,board 1's LCD output will be put to high impedance and board2 will do its normal operation.
So do you think this strategy will work?(Also @ erricgibbs could you tell why would putting diodes in line from LCD connectors to LCD not work?If I removed both VCC and GRD from one board,and considering that the impedance between pins is low in off state,the didoes should work as they will block the path of signal from other board and its signal levels would be maintained?)