I`m new to Embedded Systems and Microcontrollers. I have a basic doubt reg the UART. Is it possible to connect two devices to a single UART in a microcontroller and use them at different times by enabling one and disabling the other?
Are you using the Uart port of the Microcontroller to transmit only to these 2 devices? Or you are also going to use the Uart receive port to receive data from these 2 devices?
Yes, you can, but not without separating them with some glue logic - e.g. using a
tri-state buffer like the 74125 and one inverter, or something similar.