USB-RS232 Interface: A Compact Solution For Missing Ports
USB-RS232 Interface: A Compact Solution For Missing Ports
USB-RS232 Interface: A Compact Solution For Missing Ports
USB-RS232 Interface
A compact solution for missing ports
Design by L. Lemmens
3.3 Volt
3V3OUT Dual Port TX
LDO
Buffer
Regulator
128 bytes TXD
RXD
RTS#
CTS#
DTR#
DSR#
USBDP DCD#
Serial Interface RI#
USB USB UART UART
Engine
Transceiver Protocol Engine FIFO Controller
USBDM ( SIE )
TXDEN
USBEN
TXLED#
RXLED#
Dual Port RX
Buffer
USB DPLL
384 Bytes
EECS
EEPROM EESK
Interface EEDATA
RCCLK
020375 - 13
Figure 1. Simplified block diagram of the USB/RS232 converter type FT232AM (courtesy FTDI Chip).
line to +3.3 V. This level causes the functional parameters. between 300 bits/s and 2 Mbits/s (actually,
USB Host (i.e., the USB controller in Buffers for ‘receive’ and ‘transmit’ up to 920 kbits/s for RS232 and 2 Mbits/s for
the PC) to recognise our interface as (‘Dual-Port TX Buffer’ with 128 bytes RS422/485).
a Full-Speed device and arrange for capacity and a 384-byte ‘Dual-Port The ‘EEPROM Interface’ on board the
the appropriate addressing. In the RX Buffer’) arrange for the exchange FT232AM chip is intended for the connection
case of a Low-Speed device, the D– of data in both directions (between of an external 93C46 EEPROM chip. Although
line is held at +3.3 V with the aid of Serial Interface Engine and the UART the FT232AM will work happily without the
a resistor. Behind the USB Trans- registers). The block identified as addition of a non-volatile data memory, the
ceiver we find a functional block ‘UART FIFO Controller’ is responsible interface will then ‘report’ as a standard ser-
identified as ‘Serial Interface Engine’ for the exchange process between ial device. The small EEPROM allows specific
which handles the parallel-to-serial the two buffers and the transmit and data like manufacturer and product identifier
and serial-to-parallel conversion of receive registers of the UART.
USB data. Next, the ‘USB Control Functionally, the ‘UART’ proper is
Engine’ processes the USB control not unlike the one found in the PC.
RCCLK
XTOUT
AGND
AVCC
EECS
information and looks after the com- Its task is to supply all relevant sig-
XTIN
VCC
TXD
munication with the USB Host Con- nals to the RS232 interface and in
troller (in accordance with the USB addition, for RS422 and RS485.
Low Level protocol), as well as the The ‘Baud Rate Generator’ allows 32 25
commands that define the UART’s the serial data speed to be set EESK 1 24 RXD
FTDI
EEDATA RTS#
VCC CTS#
RESET# DTR#
FTDI Chip contact details TEST
FT232AM DSR#
3V3OUT DCD#
Future Technology Devices International Ltd., USBDP RI#
St. George’s Studios, 93-97 St George’s Road, Glasgow G3 6JA, United Kingdom. USBDM 8 XXYY 17 GND
Tel.: (+44) (0)141 353 2565, Fax: (+44) (0)141 353 2656. 9 16
URL: www.ftdichip.com
UK distributor:
VCC
TXDEN
GND
RXLED#
PWRCTL
USBEN
TXLED#
SLEEP#
R3 C6 R9 R11 R10
C1
470Ω
470Ω
10k
100k
8
100n
10n
T1
3 4 AVCC
DI DO
7 IC2 6 RCCLK
PRE PE
2 1
BC857 SK CS C4 C5
93C46
R2 R1 R12
100n 100n
2k2
470k
100k
5
RESET +5V
C13 C14
+5V
100n 10µ
16V
C8
D1 D2
C11
100n
L1
R7 R8 3 13 26 100n
C7 13
1k
1k
2 30 11 V+ 12
EEDATA AVCC C1+ C9
10µ 16V 1 32 24
EESK EECS EN K1
11 31 IC3 14
RXLED RCCLK C1– 100n
12
IC1 19 26 27 DCD 1
TXLED DCD R3OUT R3IN
4 20 5 4 DSR 6
RESET DSR R2OUT R2IN
15 24 22 23 RXD 2
USBEN RXD R4OUT R4IN
R5 16 23 20 1 RTS 7
D+ TXDEN RTS T3IN T3OUT
10Ω 25 7 2 TXD 3
K2 FT232AM TXD T1IN T1OUT
3 7 22 8 9 CTS 8
R4 USBDP CTS R1OUT R1IN
2 D– 8 21 6 3 DTR 4
10Ω USBDM DTR T2IN T2OUT
1 6 18 19 18 RI 9
3V3OUT RI R5OUT R5IN
R6 5 10 21 28 5
C3 TEST SLEEP T4IN T4OUT
1k5
USB-B 4 14 29 15
PWRCTL AGND MAX213 C2+ C10
10n 25
XIN XOUT SHDN SUB-D9
10 16 100n
9 27 28 17 C2–
X1 V-
C2
17
C12
33n 6MHz
100n
020375 - 11
codes (VID, vendor ID; PID, product ID), ser- tor (K2). A sufficient amount of sup- mode while booting. The other R-C
ial numbers, etc., to be permanently stored ply noise decoupling is afforded by a combination, R11-C4, only decouples
and made known to the operating system. small choke (L1) and capacitor (C7). the voltage at the AVCC (analogue
Note that the EEPROM is obligatory when In addition all integrated circuits supply) pin which powers the inter-
several USB/RS232 converters using FTDI have their own supply decoupling. nal 8x clock multiplier.
chips are connected to a PC. This is because As already mentioned, resistor R6 The MAX213 and its external
the drivers will only install virtual COM ports pulls the USB D+ line to +3.3 V, in charge pump capacitors only serve
for converters with unique serial numbers. order to tell the USB host that the to convert the 5-V signals at the
Without the serial number (i.e., without the interface is a ‘Full-Speed’ device. The RS232 side of the FT232AM into true
EEPROM) only one virtual COM port can be same resistor also triggers the recog- RS232 signals (i.e., having a polar-
installed. nition of an USB device when the ized swing). Normally, that would
interface cable is plugged into the mean approximately ±12 V, but in
USB port on the PC or on a hub. practice only ±8 V is achieved, with
Circuit diagram Very conveniently, the FT232AM a maximum of up to ±10 V.
The circuit diagram shown in Figure 3 looks features two LED driver outputs that
rather uncomplicated. In the top left-hand cor- allow active data transmission (D1)
ner we find the power-up reset circuit com- and reception (D2) to be visualised. Circuit board
prising T1 and the customary R-C network. Although the two R-C networks Even if the circuit diagram is unclut-
Right beside it is the (optional) EEPROM. In R11-C4 and R10-C5 are identical in tered and fairly straightforward, that
the next lower ‘row’ we find, from the left to value, their functions are quite dif- does not necessarily apply to the
the right, the USB-B connection, the FT232AM, ferent. The combination R10-C5 at printed circuit board (Figure 4). The
a MAX213 and finally the RS232 header. the RCCLK pin is a timing network main reason for the discrepancy is
The circuit receives its +5 V supply volt- to ensure clock stability when the found in the use of SMD parts. Also,
age from the PC via pin 1 of the USB connec- FT232AM wakes up from Sleep the PCB is double-sided and
K2
C10
C11
Inductors:
C9
All resistors and capacitors C12
L1 = BLM31A601S (Murata) (e.g., C7
SMD shape 1206
R1
IC3
L1
R2
T1
C13
Farnell # 581-094) R3
C1
Resistors: C2
R1,R3,R10 = 100kΩ Semiconductors:
K1
C5
R2 = 470kΩ D1,D2 = LED, 3mm dia. 020375-1 R10
X1
R4,R5 = 10Ω T1 = BC857
R6 = 1kΩ5 IC1 = FT232AM or FT232BM (FTDI
R7,R8 = 1kΩ Chip order code FT8U232AM)
R9 = 10kΩ IC2 = 93C46 (optional)
R11 = 470Ω IC3 = MAX213ECWI
R12 = 2kΩ2
(C) ELEKTOR
020375-1
Miscellaneous:
Capacitors: K1 = 9-way sub-D plug (male), PCB
C1,C3 = 10nF mount, angled pins
C2 = 33nF K2 = USB connector, type B, PCB
C4,C5,C6,C8-C13 = 100nF mount
C7,C14 = 10µF 16V radial X1 = 6MHz ceramic resonator
C4 R11
R9
R12
C6
IC1
IC2
(C) ELEKTOR
020375-1
R6
R5
C8
R4
C3
R8
R7
Figure 5. Our finished and fully working prototype board seen from above… Figure 4. Copper track layout and component
overlay of the PCB designed for the interface.
3 2
Those of you who dislike DIY constructing on
PC boards, and SMDs in particular, will be 4 1
glad to know that FTDI chip also supply
ready-made USB-RS232 interface modules
020375 - 12
under part number DLP-USB232M, see their
website for further details. These modules
have all connections brought out to pins of a Figure 7. USB-A and USB-B socket pinouts.
standard 0.6-inch wide DIP plug.
Note: since writing this article we have been advised by FTDI Chip that the FT232AM chip
has been superseded by the FT232BM.
Literature:
– USB Driver Programming, Elektor Electronics
October and November 2002.
– USB UART, Elektor Electronics December 2001
and January 2002.
– USB Interface, Elektor Electronics September
2000.
– SMD’s? Don’t Panic!, Elektor Electronics January
and February 2003.
Free Downloads
– PCB layout (pdf file), on
www.elektor-electronics.co.uk/dl/dl.htm.
Select file number 020375-11.zip, month
of publication.
– FT232AM datasheets, drivers, info on
ready-made modules, etc.,
Figure 9. Utility program for (optional) programming of PID and VID information www.ftdichip.com
into the 93C46 EEPROM.