Simply wire the two LCD’s onto the same IO pins with the exception of the Enable lines which are wired through an AND gate. Each display can be activated by toggling the other input on the AND gate.
It is wise though to use the AT modifier as things can get a little confusing as you swap between the two LCD's.
Note: This has only been tested using a 4-line LCD device where the 2 drivers are on the one board. Care should be taken to ensure there are no clashes with dormant data lines.
Example Code
Code:
SYMBOL TOPDISPLAY = PORTB.0 SYMBOL BOTTOMDISPLAY = PORTB.2 Sets up the bits to control the two halves of the display HIGH TOPDISPLAY HIGH BOTTOMDISPLAY delayms 20 DECLARE LCD_TYPE 0 DECLARE LCD_DTPIN PORTB.4 DECLARE LCD_ENPIN PORTB.1 DECLARE LCD_RSPIN PORTB.3 DECLARE LCD_INTERFACE 4 DECLARE LCD_LINES 4 'standard LCD set up CLS LOW BOTTOMDISPLAY PRINT AT 1,1,"HELLO WORLD"