USB

所属分类:单片机开发
开发工具:C/C++
文件大小:970KB
下载次数:27
上传日期:2011-09-16 14:59:44
上 传 者hakdas
说明:  USB Examples and Codes for PICC CCS

文件列表:
USB\BulkUSBDemo Driver Source\BulkUSBDemo.dsw (447, 2002-08-06)
USB\BulkUSBDemo Driver Source\BulkUSBDemo.ncb (74752, 2002-08-08)
USB\BulkUSBDemo Driver Source\BulkUSBDemo.opt (53760, 2002-08-08)
USB\BulkUSBDemo Driver Source\dirs (15, 2002-08-06)
USB\BulkUSBDemo Driver Source\sys\BulkUSBDemo.aps (39196, 2002-08-07)
USB\BulkUSBDemo Driver Source\sys\BulkUSBDemo.cpp (5845, 2002-08-07)
USB\BulkUSBDemo Driver Source\sys\BulkUSBDemo.dsp (13170, 2002-08-07)
USB\BulkUSBDemo Driver Source\sys\BulkUSBDemo.h (1638, 2002-08-07)
USB\BulkUSBDemo Driver Source\sys\BulkUSBDemo.inf (3026, 2002-08-09)
USB\BulkUSBDemo Driver Source\sys\BulkUSBDemo.plg (254, 2002-08-07)
USB\BulkUSBDemo Driver Source\sys\BulkUSBDemo.rc (2752, 2002-08-07)
USB\BulkUSBDemo Driver Source\sys\BulkUSBDemoDevice.cpp (23187, 2002-08-07)
USB\BulkUSBDemo Driver Source\sys\BulkUSBDemoDevice.h (2899, 2002-08-07)
USB\BulkUSBDemo Driver Source\sys\function.h (1186, 2002-08-07)
USB\BulkUSBDemo Driver Source\sys\makefile (295, 2002-08-06)
USB\BulkUSBDemo Driver Source\sys\resource.h (501, 2002-08-07)
USB\BulkUSBDemo Driver Source\sys\sources (1184, 2002-08-06)
USB\BulkUSBDemo.inf (3029, 2003-06-04)
USB\cdc_NTXP.inf (1082, 2005-07-05)
USB\HIDDemo Source\HID\DBT.dcu (5183, 2002-08-08)
USB\HIDDemo Source\HID\DBT.pas (19655, 2000-02-13)
USB\HIDDemo Source\HID\Hid.dcu (11946, 2002-08-08)
USB\HIDDemo Source\HID\Hid.pas (103776, 2000-03-23)
USB\HIDDemo Source\HID\HidController.cfg (362, 2002-08-08)
USB\HIDDemo Source\HID\HidController.cnt (376, 2000-08-25)
USB\HIDDemo Source\HID\HidController.dcu (1891, 2002-08-08)
USB\HIDDemo Source\HID\HidController.dof (1259, 2002-08-08)
USB\HIDDemo Source\HID\HidController.dpk (676, 2001-03-19)
USB\HIDDemo Source\HID\HIDCONTROLLER.HLP (62246, 2000-09-01)
USB\HIDDemo Source\HID\HidController.res (1536, 2000-08-25)
USB\HIDDemo Source\HID\HidControllerClass.dcr (500, 2000-02-11)
USB\HIDDemo Source\HID\HidControllerClass.dcu (28361, 2002-08-08)
USB\HIDDemo Source\HID\HidControllerClass.pas (52251, 2000-09-01)
USB\HIDDemo Source\HID\HidToken.pas (8708, 2000-02-13)
USB\HIDDemo Source\HID\HidUsage.pas (31619, 2000-02-05)
USB\HIDDemo Source\HID\SetupApi.dcu (97475, 2002-08-08)
USB\HIDDemo Source\HID\SetupApi.pas (226641, 2000-02-24)
USB\HIDDemo Source\HidComponents.cfg (360, 2002-10-23)
... ...

Readme.txt The readme file for the CCS USB Demos. This file contains important instructions on building, using, and troubleshooting the example programs. It is recommended that you read this file first before trying to use the demos, it will probably save time and frustration. ------- HIDDemo ------- Description This is a Delphi demo that accesses the demo USB HID device. It can write to the device to set the state of the LEDs. It also continuously tries to read from the device to retrieve the current A/D voltage. Building Before opening the project, install these two packages: HIDComponents.dpk Hid\HIDController.dpk The project file is: HidDemo.dpr Running Click on "File"->"Select Device" Select the CCS USB Demo device and click Select Click on Establish Connection to connect to the selected device Troubleshooting It usually takes awhile for the program to start. This is because it is enumerating the HID devices. If the demo device does not show up in the "Select Device" list try pressing reset for the device to be enumerated again. ------- Oscope ------- Description This is the Delphi demo interface program for the BulkUSBDemo driver. It displays the information read from the USB device similar to an oscilloscope. It also writes data to the device to select the sample rate and the trigger. Building Before opening the project install this package OScopeComponents.dpk The project file is: OScope.dpr Running Make sure the BulkUSBDemo device driver is installed first. For instructions on this see the BulkUSBDemo section. Once the program is running goto "File"->"Connect" this will connect to the first device. Once connected the display will show the data from the device. To the left of the display is a control for the trigger. The device will not send data if the trigger is greater than the current voltage level. The trigger and the sample rate will be sent to the device every time it is changed. Troubleshooting Do not unplug the demo device while connected. In Windows *** the program catches the error and informs the user. In Windows 2000, the system notices the error before the program does and kills the OScope program. For information on troubleshooting the driver see the BulkUSBDemo section ------- BulkUSBDemo driver ------- Description This is a WDM device driver for the USB test device. It is needed for the OScope program. It supports bulk reading and writing. It is a very simple driver. It sends all driver read and write requests to the USB controller. There is a timeout for the reads and writes so if there is a problem, the calling program does not hang. Building This driver uses Compuware Numega's DriverWorks. This comes with their SoftICE Driver Suite. DriverWorks is required to build the driver. Also, the Windows DDK is required to build the driver. Information on the Windows DDK can be found at: http://www.microsoft.com/DDK/ Information on DriverWorks can be found at: http://www.compuware.com/products/driverstudio/ds/dworks.htm This driver was written using Microsoft Visual C++ 6. If the DDK and DriverStudio is setup correctly, the driver can be built from the project file. I have found problems, under Window ***, installing a driver whose filename is longer than the standard 8.3 size. The Visual C++ project has a smaller filename set up than the name of the project file for this reason. If the driver is built under a different compiler or project file, the .SYS file may have to be renamed to match the expectations of the .INF file. To see if the filename will not work Right click on the file and select properties. On the properties page it should list the MS-DOS name. If the name has a "~" in it, than it probably is a long filename and may have trouble under Windows ***. Installing As a WDM USB driver, it requires Windows 2000 or ***. Although later OEM versions of Windows 95 have USB support, this support is limited. This driver has not been tested on Windows 95. The driver would have to be recompiled with a different build of the DriverWorks library. The driver can be installed off a floppy disk or directly from the hard drive. Installing off a floppy disk can be easier. There are two files needed for the driver: BulkUSBDemo.inf and UsbDemo.sys. Both of these are in BulkUSBDemo\driver. To install off a floppy, copy both of these files to the disk. First, plug the USB demo device into your computer. Windows should detect the new plug-in-play hardware and try to set up a driver for it. Select the option "Search for the best driver for your device." If installing off a floppy, make sure only the "Floppy disk drives" option is checked. To install directly from the hard disk, make sure only the "Specify a location" option is checked. Also use the browse button to locate the driver. Windows should locate the driver and install it. Sometimes Windows may require a reboot after installing a driver. Once the driver is correctly installed the OScope program should run correctly. Troubleshooting Use the device manager to verify that the driver is working correctly. If the device is plugged in, it should show up under Universal Serial Bus Controllers. To reload the driver, select the device under the device manager. Click on Properties. Under the driver tab, there should be a button to update the driver. Follow the same instructions for installing the driver. Note: as a demo driver, it is not digitally signed. Windows 2000 will notice this and bring up a message stating this. Tell Windows to install it anyway. In Windows 2000, the system will inform you whenever the device is removed. This is to warn the user against removing a device that a program or the system is currently using. It is safe to remove the demo device only if the OScope program is not running.

近期下载者

相关文件


收藏者