I develpoed a board with PIC16F. Now I need to add a programmable module which convert serial to ethernet. The module need to be connected to the PIC via RS232 line (tx and rx). Because I would like to us those line also for reading other pheriperal how I can do that?
Shoul I add a mux chip to sync the access to the tx and rx line?
I think you are asking for trouble. Since ethernet is asynchronous to your PIC, there's no way to know when a message is coming in. If you've got the input assigned to your other input (non-ethernet), you could miss a message.
- - - Updated - - -
You COULD mux your TX signal, since you control when you are transmitting. But if you've got line(s) available for controlling a multiplexer, why don't you just use THOSE lines for your other inputs?
use the hardware UART for the Ethernet device and a software UART to talk to your PC
do a web search for pic16 software uart and you will get plenty of links