LPC1768-usb

所属分类:处理器开发
开发工具:C/C++
文件大小:431KB
下载次数:48
上传日期:2011-11-23 11:44:18
上 传 者XU_WORK
说明:  LPC1768读写U盘FAT16文件的例程
(LPC1768 U disk read and write FAT16 file routines)

文件列表:
【实验20】USBHostLite\common\inc\core_cm3.h (46533, 2009-06-22)
【实验20】USBHostLite\common\inc\LPC17xx.h (34929, 2009-12-17)
【实验20】USBHostLite\common\inc\system_LPC17xx.h (1601, 2009-08-12)
【实验20】USBHostLite\common\inc\type.h (775, 2009-06-11)
【实验20】USBHostLite\common\src\core_cm3.c (17206, 2009-05-22)
【实验20】USBHostLite\common\src\startup_LPC17xx.s (10863, 2009-11-24)
【实验20】USBHostLite\common\src\system_LPC17xx.c (21674, 2010-01-07)
【实验20】USBHostLite\JLink Regs CM3.txt (497, 2010-12-08)
【实验20】USBHostLite\JLinkLog.txt (83441, 2010-12-08)
【实验20】USBHostLite\JLinkSettings.ini (285, 2010-12-08)
【实验20】USBHostLite\Lst\startup_LPC17xx.lst (35228, 2010-12-08)
【实验20】USBHostLite\Lst\USBHostLite.map (122639, 2010-12-09)
【实验20】USBHostLite\Obj\core_cm3.crf (3629, 2010-12-08)
【实验20】USBHostLite\Obj\core_cm3.d (92, 2010-12-08)
【实验20】USBHostLite\Obj\core_cm3.o (10092, 2010-12-08)
【实验20】USBHostLite\Obj\startup_LPC17xx.d (55, 2010-12-08)
【实验20】USBHostLite\Obj\startup_LPC17xx.o (5712, 2010-12-08)
【实验20】USBHostLite\Obj\system_lpc17xx.crf (57674, 2010-12-08)
【实验20】USBHostLite\Obj\system_lpc17xx.d (272, 2010-12-08)
【实验20】USBHostLite\Obj\system_lpc17xx.o (47976, 2010-12-08)
【实验20】USBHostLite\Obj\USBHostLite.axf (105156, 2010-12-09)
【实验20】USBHostLite\Obj\USBHostLite.hex (40551, 2010-12-09)
【实验20】USBHostLite\Obj\USBHostLite.htm (92701, 2010-12-09)
【实验20】USBHostLite\Obj\USBHostLite.lnp (445, 2010-12-09)
【实验20】USBHostLite\Obj\USBHostLite.plg (567, 2010-12-09)
【实验20】USBHostLite\Obj\USBHostLite.sct (486, 2010-05-07)
【实验20】USBHostLite\Obj\USBHostLite.tra (1490, 2010-12-09)
【实验20】USBHostLite\Obj\usbhost_fat.crf (79032, 2010-12-08)
【实验20】USBHostLite\Obj\usbhost_fat.d (830, 2010-12-08)
【实验20】USBHostLite\Obj\usbhost_fat.o (74844, 2010-12-08)
【实验20】USBHostLite\Obj\usbhost_lpc17xx.crf (76723, 2010-12-08)
【实验20】USBHostLite\Obj\usbhost_lpc17xx.d (900, 2010-12-08)
【实验20】USBHostLite\Obj\usbhost_lpc17xx.o (70864, 2010-12-08)
【实验20】USBHostLite\Obj\usbhost_lpc17xx.__i (266, 2010-12-08)
【实验20】USBHostLite\Obj\usbhost_main.crf (72651, 2010-12-08)
【实验20】USBHostLite\Obj\usbhost_main.d (849, 2010-12-08)
【实验20】USBHostLite\Obj\usbhost_main.o (62612, 2010-12-08)
【实验20】USBHostLite\Obj\usbhost_ms.crf (74370, 2010-12-08)
【实验20】USBHostLite\Obj\usbhost_ms.d (829, 2010-12-08)
【实验20】USBHostLite\Obj\usbhost_ms.o (66384, 2010-12-08)
... ...

* NXP USB Host Stack * * (c) Copyright 2009, NXP SemiConductors * (c) Copyright 2009, OnChip Technologies LLC * All Rights Reserved * * http://www.nxp.com/microcontrollers * http://www.onchiptech.com * * History * 2009.07.14 ver 0.01 Preliminary version, first Release * ------------------------------------------------------------------------------------------------------------------- USB Host Sample for LPC17xx ------------------------------------------------------------------------------------------------------------------- 1. What is this sample ? This sample demonstrates how to access the files on "USB Flash drive" connected to USB Host port on Keil MCB1700 board using NXP Semiconductors LPC17xx MCU. When you connect a "USB Flash Drive" to the USB host port on MCB1700 board, the USB host sample mounts the file system on the "USB Flash Drive". 2. How to setup the sample ? To run the mass storage sample, you need the following. . Keil MCB1700 board . Keil ULink USB-JTAG adapter for flash programming. . Keil uVision3 IDE to open the project. . Serial cable to see the log messages on the Hyper Terminal. Jumper Settings of the MCB1700 board: USB as Host Two jumpers closed on silk screen marked as "HOST", middle position. 3. How to see the log messages on Hyper Terminal ? Connect a serial cable to UART #0 on the MCB1700 board. Depending on the PCLKSELx value, if PCLK for UART is 18MHz, the highest baudrate is 57600. If the PCLK for UART can reach 36Mhz or 72Mhz, the baudrate can be set higher to 115,200. Modify this value in usbhost_main.c. Configure the Hyper Terminal settings as 57600-N-8-1 and "No flow control". Leave both jumpers "ISP" and "RST" open near the "RESET" and "INT0" push buttons. Note: The following macros must be defined in the usbhost_lpc17xx.h file. #define PRINT_Log UART_Printf #define PRINT_Err(rc) UART_Printf("ERROR: In %s at Line %u - rc = %d\n", __FUNCTION__, __LINE__, rc) 4. The user is provided with three sample functions, Main_Read(), Main_Write() and Main_Copy() defined in usbhost_main.c. If the user calls Main_Read(), the host sample reads data from file "FILENAME_R" into a buffer. If the user calls Main_Write(), the host sample writes data to file "FILENAME_W" from a buffer. If the user calls Main_Copy(), the host sample copies data from file "FILENAME_R" to file "FILENAME_W". Note: The file name defined by macro "FILENAME_R" must be present on the device (usb flash drive). 5. How to download and run the demo ? 1. Connect the power supply by using USB or optional power supply. 2. Connect the Keil U-Link USB J-Tag 3. Connect the serial cable at UART#0 to see the log messages. 4. Open the hyper terminal and make settings as shown in Hyper terminal settings. 5. Open the USBHostLite directory. 6. Open the project UsbHostLite.Uv2 by double clicking on it. 7. Goto project tab and click 'Rebuild all target files' to compile the project. 8. Goto Flash tab and click 'Download'. 9. Connect a USB flash drive at USB host port. Disclaimer ========== This software is provided AS-IS by NXP Semiconductors. NXP Semiconductors does not support or warrant the software contained herein for any purpose other than for informational use. Please contact OnChip Technologies LLC for further assistance including support options and other embedded USB host/device/OTG stacks.

近期下载者

相关文件


收藏者