Switching Circuit Increases Number Of USARTs Available From MCU

April 9, 2009
This design, based on a Maxim MAX220 RS-232 driver/receiver IC, allows you to increase the number of USARTs (universal synchronous, asynchronous receiver/transmitters) available on a microcontroller.

This design builds on a previously published Idea for Design (“Talk To Multiple Devices With One UART”). Our solution allows you to increase the number of USARTs (universal synchronous, asynchronous receiver/transmitters) available on a microcontroller with minimum hardware.

Typical 8- and 16-bit microcontrollers have one programmable USART for communication. But designers may need more USARTs for communication with two peripherals. A masterslave circuit communicating serially might also need another USART for connection to a computer.

Solutions include using dedicated serial ICs, designing software USARTs, and using remappable pins, I2C, or serial peripheral interface (SPI). However, these alternatives require strict timing sequences, and the pins required may be needed for other purposes. The circuit in the figure shows an alternative high-speed switching circuit that increases the number of available USARTs using minimum hardware and I/O pins.

Transistors Q1, Q2, Q3, and Q4 represent the receiver circuit block; Q5, Q6, Q7, and Q8 represent the transmitter circuit; and Q9 and Q10 form a TTL hex inverter. The inverter never sources current, so there’s no need for a totem-pole output. An I/O pin from the microcontroller is connected to Q9 and serves as the selection pin for the USARTs.

When the I/O pin is at logic zero, Node 1 is at logic low and Node 2 is at logic high. Thus, Q2 and Q3 are cut off, and the states of Q1 and Q4 depend on the instantaneous logic level of RXD1. When RXD1 is low, Q4 conducts and Q1 is cut off, and when RXD1 is high, Q1 conducts and Q4 is cut off. Therefore, at any time, either Q1 or Q4 conducts (is in the active region), and the voltage logic at RXD1 is made available at RXD, while RXD2 is completely cut off. Similarly, when the I/O pin is at logic one, Node 1 is high and Node 2 is low; Q1 and Q4 are completely cut off, and either Q2 or Q3 conducts. Therefore, RXD2 is connected directly to RXD.

The transmit circuit functions in a similar way. The table shows this operation.

High-speed transistors such as the 2N2907 and 2N2222 are preferable in order to minimize the propagation delay in the inverter, thus eliminating the need for the firmware to account for this delay. Very high transmission speeds (230.4 kbits/s) are possible with the use of such fast transistors. Additionally, with small modifications and the use of BJT-pairs and microcontroller pins, the designer can create more than two programmable USARTs.

This circuit is essentially a two-way switching circuit. The switching can also be accomplished with either tri-state buffers or multiplexers-demultiplexers. But these may cause power-supply problems because most of today’s systems run on 3.3 V or below. Also, these dedicated ICs require a lot of space. The circuit described here avoids these problems.

Continue Reading

Sponsored Recommendations

TTI Transportation Resource Center

April 8, 2024
From sensors to vehicle electrification, from design to production, on-board and off-board a TTI Transportation Specialist will help you keep moving into the future. TTI has been...

Cornell Dubilier: Push EV Charging to Higher Productivity and Lower Recharge Times

April 8, 2024
Optimized for high efficiency power inverter/converter level 3 EV charging systems, CDE capacitors offer high capacitance values, low inductance (< 5 nH), high ripple current ...

TTI Hybrid & Electric Vehicles Line Card

April 8, 2024
Components for Infrastructure, Connectivity and On-board Systems TTI stocks the premier electrical components that hybrid and electric vehicle manufacturers and suppliers need...

Bourns: Automotive-Grade Components for the Rough Road Ahead

April 8, 2024
The electronics needed for transportation today is getting increasingly more demanding and sophisticated, requiring not only high quality components but those that interface well...

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!

New

Most Read


Sponsored