Electronic Design

  
Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


[Ideas For Design]
Switching Circuit Increases Number Of USARTs Available From MCU

Ashish Aggarwal, Manik Chugh  |   ED Online ID #20892  |   April 9, 2009


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 highspeed 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 powersupply 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.


Reprints   Printer-Friendly  Email this Article  RSS    Font Size   What's This?



Reader Comments

Do you have any technical review before publication?

Using 10 transistors ans 10 resistors is considered better than single 'HC4052/4053 in small package? Hello?

"Power supply problem because of ... 3.3V and below" What year is this article from, 1970? Do these guy ever heard of good old 74HC logic, not mentioning single and dual-gate logic?

The only use of this article is to know two people you should never, ever hire as an electrical engineers.

John Moers -April 22, 2009

POST YOUR COMMENTS HERE
Name:

Email:
Your Comments:

Enter the text from the image below


Please refresh the page if you have trouble reading this text.

Search Electronic Design
     
  
 
Email Newsletter
Sponsored By:
Electronic Design UPDATE provides readers with late-breaking news, opinions from industry experts, and timely technology stories. It's a unique opportunity to get your product message in front of engineers, engineering managers, and corporate managers while they're reading about critical information online.

Enter Email to Subscribe
  

Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources