Beruflich Dokumente
Kultur Dokumente
Before purchasing the BBUSBRS232 kit or attempting the project, make sure you have
read Breadboard Quick Start Guide, available to download from www.smileymicros.com
THIS PROJECT IS VERY HARD TO WIRE PROPERLY AND GET WORKING
RIGHT – DON’T BUY IT IF YOU HAVE SELF-ESTEEM ISSUES!
Lets create a USB to RS232 converter on a breadboard that functions exactly like a pre-
made USB to RS232 converter cable. So why would you want to go to the trouble of
building one on a breadboard when you can buy one already made for about the same
price? Good question and about all I can say is that this way you learn how that cable
works and get the opportunity to use the extra pins on the BBUSB for other projects. You
also get the opportunity to make a dozen frustrating mistakes and do a lot of debugging,
but that’s part of the fun isn’t it?
1 BBUSB
2 RS232 converter IC (MAX202 or ST202)
3 Male DB-9 connector solder cup
4 Female DB-9 connector solder cup
5 5 - 0.1µF Capacitors
6 2 - 9” Wire 22 AWG wire
You will need parts that are NOT part of the kit:
• If you don’t purchase the BBUSBRS232+Breadboard you will need a breadboard.
• For testing, you will need a system with a RS232 connection, such as an older
computer or a Smiley Micros Butterfly++ Mini-Kit.
• You will need a USB cable.
• If doing the experiment with an older PC, you’ll need a RS232 cable.
You can do this experiment with any RS232 serial device that only requires the Tx, Rx,
and SG lines, such as an older PC with a RS232 connection or the Smiley Micros
Butterfly++ Mini-Kit.
• This experiment is difficult to wire properly, I had to use a scope to find a stupid
wiring error, so be careful and patient.
• Solder the wires to the DB9 connector
o For this experiment we will only use 3 of the 9 pins: Tx, Rx, and SG.
o Cut 3 3” pieces of 22 AWG wire.
o Strip about 1/8” insulation from one end and about 1/4” from the other.
o Solder the 1/8” end to the solder cups for Tx, Rx, and SG on the DB-9
connector.
o Remember that from the perspective of the PC and the external device the
Tx and Rx are switched. This means that you connect the Tx line from the
PC to the Rx line of the external device and visa versa.
Signal DB-9
DCD 1
Rx 2
Tx 3
DTR 4
SG 5
SR 6
RTS 7
CTS 8
RI 9
Solder Wires to back of male DB9 connectors
MAX202 wiring and internal schematic are identical for the ST202EBN and other
compatible RS232 converter ICs.
• Wire up the ST202EBN level converter using the illustration shown on the next
page. The ST202EBN has two TX and two Rx level converters and you can find
the data sheet with the projects zip file.
• Place the BBUSB and the ST202EBN on the breadboard more or less as shown.
• Add the 5 0.1µF Caps as shown. Trim legs to get the caps near the board.
o Cap between +5V and GND.
o Cap between +5V and pin 2.
o Cap between pin 1 and 3.
o Cap between pin 4 and 5.
o Cap between pin 6 and GND.
• Wire ST202EBN pin 7 to pin 8.
• Wire ST202EBN pin 13 to pin 14.
• Wire TxD of BBUSB to pin 11 of theST202EBN.
• Wire RxD of BBUSB to pin 9 of theST202EBN.
• Wire BBUSB for +5V
o Wire USBVCC to VCC
o Wire VCC to breadboard +5V
o Wire VIO to breadboard +5V
o Wire GND to breadboard GND
• Connect the DB9 male connector to the RS232 level converter as shown.
• Connect the DB9 male to the DB9 female to the RS232 cable.
• Wiring this thing up correctly is harder than it appears, isn’t it?
+5V +5V
3V3OUT USBVCC
VCCIO VCC
0.1 uF 0.1 uF
1 16
0.1 uF 2 15
DTR TXD
ST202EBN
3 14
T1OUT RTS RXD
BBUSB
4 13 FTD I CBUS0
0.1 uF R1IN RI
5 12
R1OUT DSR CBUS1
6 11
T1IN DCD CBUS2
7 10
0.1 uF CBUS3
CTS
8 9
GND CBUS4
To DB9 Tx pin
To DB9 Rx pin
To DB9 GND pin
• Type a message in the send box of one terminal and watch it appear in the receive
box of the other terminal.
USB Butterfly
The type of DB9 connector, male or female depends on whether the connection end is on
the PC side or the peripheral side. The male is used on the PC side and the female is used
on the peripheral side.
Links:
Jan Axelson’s web page (author of USB Complete and Serial Port Complete).
http://www.lvr.com/usb.htm
Coming Soon:
Like the name says, this book makes USB almost easy. It uses the FTDI FT232R
USBUART IC and has many instructive and useful hardware and software projects that
will help the user to gain an understanding of one way to communicate between a PC and
a microcontroller. The software is written in both C# and Visual Basic .NET and the