3 serial ports

I have a processor PIC1846k22 with 2 serial ports. One is connected to an LCD screen, and the other is connected to an ESP Wroom 2 Now the issue is that i need an extra serial port to talk with a second LCD display. Because each component transmit data to the processor at aleatory time, i cannot predict when one wants to transmit and i loose the data from second one. Any solution ? Thank you

A simple multiplexer will not do the job. Should be a device which have a storage buffer and store data until the first one finish.

Unless the LCD sends data to the microcontroller of it's own accord, a simple multiplexer IC is fine - switch to one, write to it, wait for any acknowledgment (if any), then switch to the other when writing to that...

If the PIC allows pin remapping (I don't know if it does - you won't find much PIC-specific knowledge here, since there's no Arduino support for PIC), you could also use that to move which pins are used for it to switch between LCDs.

igeorge: I have a processor PIC1846k22 with 2 serial ports. Any solution ?

Its a PIC processor, not an Arduino one.

Best to ask questions in the PIC forums ..........................