breadboard usb - bu electronics design facilityohm.bu.edu/~pbohn/__atmel_butterfly_demo_board... ·...

8
Breadboard USB Quick Start Guide Joe Pardue Copyright © 2/25/07 The Smiley Micros Breadboard USB Quick Start Guide assumes that you are already somewhat familiar with USB RS232 Converters and Virtual COM Port drivers like those from FTDI or Silicon Labs. Please read this Guide and if you aren’t quite sure what to do, then we strongly recommend that you wait until we finish our new book Virtual Serial Port Cookbook by Joe Pardue which will have 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. This book is not available yet.

Upload: others

Post on 25-Mar-2020

6 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Breadboard USB - BU Electronics Design Facilityohm.bu.edu/~pbohn/__Atmel_Butterfly_Demo_Board... · 2008-02-11 · The Breadboard USB (BBUSB) allows you to use your PC to communicate

Breadboard USB Quick Start Guide Joe Pardue Copyright © 2/25/07

The Smiley Micros Breadboard USB Quick Start Guide assumes that you are already somewhat familiar with USB RS232 Converters and Virtual COM Port drivers like those from FTDI or Silicon Labs. Please read this Guide and if you aren’t quite sure what to do, then we strongly recommend that you wait until we finish our new book Virtual Serial Port Cookbook by Joe Pardue which will have 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. This book is not available yet.

Page 2: Breadboard USB - BU Electronics Design Facilityohm.bu.edu/~pbohn/__Atmel_Butterfly_Demo_Board... · 2008-02-11 · The Breadboard USB (BBUSB) allows you to use your PC to communicate

Introduction

Smiley Micros BBUSB:

• FTDI F232R single chip USB solution. • Easy to use, royalty-free FTDI drivers for Windows, Linux, and Mac.

o PC Virtual COM Port drivers for legacy RS232 type serial communications with microcontroller UARTs.

o Bit-bang mode using special drivers and software. • 14 I/O lines for use with RS-232, bit-bang, or special function modes. • Provides USB Bus power of 5 V or regulated 3.3 V at up to 500 mA. • Unique serial number for security dongle applications using FTDIChip-ID™. • Clock generator to drive microcontrollers (6, 12, 24, and 48 MHz). • LED drivers to show serial traffic. • Cute as a puppy. • Available from www.smileymicros.com for a pittance,

The Breadboard USB (BBUSB) allows you to use your PC to communicate with AND power a breadboard project. You have two choices for communicating: either use the Virtual COM Port (VCP) drivers for RS-232 style serial ports, or use a special Dynamic Link Library (DLL) to directly control access to the USB device and pin I/O (both free from FTDI). You can also provide your project with either 5 or 3.3V, up to 500mA, or you can choose to power the BBUSB and your project from your own power supply. We use gold-plated square header pins spaced on 0.1” intervals that are longer and much more sturdy than usual IC pins or ordinary ‘stamp’ type board pins making our board ideal for use with breadboards.

Page 3: Breadboard USB - BU Electronics Design Facilityohm.bu.edu/~pbohn/__Atmel_Butterfly_Demo_Board... · 2008-02-11 · The Breadboard USB (BBUSB) allows you to use your PC to communicate

Layout and Schematic

3V3OUT

VCCIO

DTR

DCD

DSR

RI

RTS

GND

CTS

VCC

USBVCC

TXD

RXD

CBUS0

CBUS1

CBUS2

CBUS3

CBUS4

BB

US

B

FTD I

Top view showing pin locations.

Schematics.

Power The USB Bus can provide up to 500 mA power to a USB device, but certain rules must be followed. Violating the rules can result in your PC assuming a USB Bus power fault and the PC will then shutdown (no warning, just a black screen and bye-bye to all your unsaved work – this is not an official ‘fact’ but a personal observation). Save your work frequently when playing with these devices and be prepared to reboot your system. The USB peripheral tells the USB host how much power it needs in 100mA units up to 500mA. It cannot use more than 100mA while starting up before making a request for more power. And the USB host can deny the peripheral’s request for more power. Also, if the USB Host tells the peripheral to go into suspend mode, it must not use more than 500 µA. This can get complex. For instance, a device off a bus-powered hub cannot use

Page 4: Breadboard USB - BU Electronics Design Facilityohm.bu.edu/~pbohn/__Atmel_Butterfly_Demo_Board... · 2008-02-11 · The Breadboard USB (BBUSB) allows you to use your PC to communicate

more than 100 mA, but you can have hubs with external power that can supply the full 500 mA. For the quick start guide, we will assume that the device is powered either directly from a PC or from an externally powered hub so that we can use up to 500 mA. Power Wiring:

3V3OUT

VCCIO

DTR

DCD

DSR

RI

RTS

GND

CTS

VCC

USBVCC

TXD

RXD

CBUS0

CBUS1

CBUS2

CBUS3

CBUS4

BB

US

B

FTD I

Wired for 5 Volts I/O Drive

3V3OUT

VCCIO

DTR

DCD

DSR

RI

RTS

GND

CTS

VCC

USBVCC

TXD

RXD

CBUS0

CBUS1

CBUS2

CBUS3

CBUS4

BB

US

B

FTD I

Wired for 3.3 Volts I/O Drive

3V3OUT

VCCIO

DTR

DCD

DSR

RI

RTS

GND

CTS

VCC

USBVCC

TXD

RXD

CBUS0

CBUS1

CBUS2

CBUS3

CBUS4

BB

US

B

FTD I

External3.3 to 5 Volt

Wired for external power input 3.3 to 5 V

Breadboard Wired for USB Bus 5V

Loop-back Test Wiring for the loop-back test:

3V3OUT

VCCIO

DTR

DCD

DSR

RI

RTS

GND

CTS

VCC

USBVCC

TXD

RXD

CBUS0

CBUS1

CBUS2

CBUS3

CBUS4

BB

US

B

FTD I

Page 5: Breadboard USB - BU Electronics Design Facilityohm.bu.edu/~pbohn/__Atmel_Butterfly_Demo_Board... · 2008-02-11 · The Breadboard USB (BBUSB) allows you to use your PC to communicate

• Wire up the BBUSB as in the illustrations above. The capacitor isn’t really

needed for this test. • Plug a USB cable into your PC and the BBUSB. • If you are using XP, the following window will appear:

• Click the ‘No, not this time’ radio button. Actually, I’d prefer a less polite ‘Hell NO!’ option, but it isn’t available. Click the ‘Next’ button and the following window will appear:

• Select the ‘Install from a list or specific location (Advanced) radio button, then click the ‘Next’ button and the following window will appear:

Page 6: Breadboard USB - BU Electronics Design Facilityohm.bu.edu/~pbohn/__Atmel_Butterfly_Demo_Board... · 2008-02-11 · The Breadboard USB (BBUSB) allows you to use your PC to communicate

• Click the ‘Browse’ button and locate the CDM 2.00.00 directory, which contains the FTDI drivers. Click the ‘Next’ button and the following window will appear:

• Click Finish and the following balloon will pop up:

• And be shocked to see that the very first Windows Form in the above sequence

pops up again. Rather than waste the space showing all the above forms again, just note that the first round installed the D2XX drivers and this second round will proceed exactly as above and install the VCP drivers.

Page 7: Breadboard USB - BU Electronics Design Facilityohm.bu.edu/~pbohn/__Atmel_Butterfly_Demo_Board... · 2008-02-11 · The Breadboard USB (BBUSB) allows you to use your PC to communicate

The Simple Terminal Software:

• You do have .NET Framework 2.0 installed don’t you? Most recent XP machines will have it, but if yours doesn’t, then you can get it at: http://msdn.microsoft.com/vstudio/downloads/default.aspx

• Open SimpleTerm by clicking on SimpleTerm.exe.

• Click on the Settings menu item • You should see the Settings form, which will list all your COM port devices. In

this case, we select COM10.

• Click the Okay button.

Page 8: Breadboard USB - BU Electronics Design Facilityohm.bu.edu/~pbohn/__Atmel_Butterfly_Demo_Board... · 2008-02-11 · The Breadboard USB (BBUSB) allows you to use your PC to communicate

• Type ‘Hello world!” into the Send window and you should see ‘Hello world’ appear in the receive window.

Links: Jan Axelson’s web page (author of USB Complete). http://www.lvr.com/usb.htm USB Developers Forum: http://www.usb.org/developers Stealing USB-port power: http://www.edn.com/article/CA220400.html General Good Stuff: http://www.smileymicros.com

Coming Soon: USB Made Almost Easy by Joe Pardue 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 components needed to do the projects will be available as kits from Smiley Micros.