Electronic – Is is possible for a microcontroller with a single serial output to interact with two serial peripherals

microcontrollerserial

I'm looking into using Atmel's 2051 microcontroller with an Xbee and a HC-05 Bluetooth module, the micro however has only one serial connection and no possibility for expandability with memory-accessed peripherals. Is this doable or do I have to choose only one of the two?

Best Answer

Use/find/implement your own Arduino style software-serial library for slow baud-rate serial comms to one of the devices, and use the hardware UART (serial) to the other one.

You could even do software serial for BOTH bluetooth and Xbee if data rates are kept low, and you dont have any crazy hard-realtime system (higher priority control) which may cause loss of data too often.