0
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心
发布
  • 发文章

  • 发资料

  • 发帖

  • 提问

  • 发视频

创作活动
BOB-12700

BOB-12700

  • 厂商:

    SPARKFUNELECTRONICS

  • 封装:

    -

  • 描述:

    SPARKFUN USB TYPE A FEMALE BREAK

  • 数据手册
  • 价格&库存
BOB-12700 数据手册
Page 1 of 7   USB Type A Female Breakout Hookup Guide Introduction If you have a microcontroller that can act as a USB host, then you will need a way to plug in USB cables and devices. The USB Type A Female Breakout accepts a Type A USB plug on one end and breaks out the 4 USB lines to a standard 0.100 inch header. USB Type A Female Breakout NOTE: This tutorial uses the mbed LPC1768, as it has a built-in USB host. However, the breakout board can be used for any platform that has a USB host. Covered In This Tutorial In this tutorial, we will use the mbed LPB1768 and the USB Type A Female Breakout to create a simple circuit that accepts a USB keyboard and prints pressed keys to a serial console. Required Materials • • • • USB Type A Female Breakout LPC1768 Male PTH headers 2x 15kΩ resistors (if you don’t have any, 10kΩ resistors will work for this) • 5x Jumper wires to connect from breadboard to Arduino. • Breadboard to tie everything together. • USB Keyboard Page 2 of 7 Suggested Reading • How to Solder • How to Use a Breadboard • Getting started with the LPC1768 Board Overview The board is a simple breakout for USB lines. USB Type A Female Breakout front GND should be connected to the ground of the host circuit. D+ and D- are the differential pair lines for USB. They should be connected to D+ and D-, respectively, of the host circuit. Additionally, a 15kΩ pulldown resistor is needed on each D+ and D-. VCC needs to be connected to a 5V supply (which could come from the host circuit, if available). Hookup Example Assembly To connect the USB breakout board, solder the break away headers to the 4 header holes on the board. PTH headers on the USB breakout board Connecting the USB Breakout Board Page 3 of 7 Basic hookup using an mbed LPC1768 and a breadboard For the LPC1768, make the following connections with jumper wires: (USB Breakout → LPC1768) • • • • VCC → VU D- → DD+ → D+ GND → GND Additionally, add 2 15kΩ pull-down resistors on the D+ and D- lines. Attach one resistor from D+ to GND, and attach another from D- to GND. USB Type A Female Breakout added to the mbed LPC1768 Example Code We will use the mbed online editor and compiler for this example. First, navigate to mbed.org, and login or create a profile. Once logged in, go to the Handbook Homepage, which contains all of the official mbed libraries. Page 4 of 7 Scroll down to find the USB Host Keyboard library under “Communication Interfaces.” Click the “Import Program” button to load the library and example program into the online compiler. Make sure you have “Program” selected from “Import As:”, as we want to use the example program (select “Library” if you plan to write your own program using the library). Page 5 of 7 In the “Program Workspace,” select the “USBHostKeyboard_HelloWorld” folder and click “Compile” at the top. This will automatically compile the program and download a binary (.bin file) to your computer. Plug in the mbed microcontroller to your computer using a USB cable. The mbed should enumerate as a USB mass storage device. If you are using Windows, it will appear as if you plugged in a thumb drive. Find where you downloaded the compiled .bin file and copy it to the root directory of your mbed device. Press the reset button on the mbed system. This will reboot the mbed and load the .bin file to be immediately executed. In addition to enumerating as a mass storage device, the mbed also has a built-in COM port. If you are on Windows, open up the Device Manager and locate the mbed Serial Port’s COM number. Start the serial program of your choice (I will use PuTTY for this example) and select the COM port correseponding to the mbed device. Use 9600 baud, and click “Open.” Page 6 of 7 Once you establish a Serial connection to the mbed, you will be presented with a blank console. Plug in a USB keyboard to the USB Type A Female Breakout Board. The Serial console should show the keyboard being enumerated. You can type, and keystrokes will appear in the console. If you unplug the keyboard, you should see a “disconnected” message. IMPORTANT: Only letters and numbers are supported in this example program. Additionally, the program cannot discern multiple keystrokes (for example, if you hold ‘1’, press ‘2’, let go of ‘2’, and let go of ‘1’, you’ll see “111” printed). Resources and Going Further Page 7 of 7 The USB Type A Female Breakout is a great way to add USB devices to your microcontroller, assuming your microcontroller can support a USB host. For some ideas, see mbed’s Handbook section on USB host libraries: • • • • • USB Host Mouse to add a USB mouse to your project USB Host Keyboard (Yes, I know we just covered this one) USB Host MSD to read/write to USB flash drives USB Host Serial to communicate via Serial over the USB lines USB Host Hub to have the mbed act as a USB hub Resources • Breakout Board Schematic • GitHub Repository https://learn.sparkfun.com/tutorials/usb-type-a-female-breakout-hookup-guide?_ga=1.198... 11/16/2015
BOB-12700 价格&库存

很抱歉,暂时无法提供与“BOB-12700”相匹配的价格&库存,您可以联系我们找货

免费人工找货