Author Topic: PIC18F4550 WinUSB Sample  (Read 9354 times)

Limited_Atonement

  • Member
  • ***
  • Posts: 10
PIC18F4550 WinUSB Sample
« on: February 17, 2011, 11:05:34 am »
I tried the example at www.lvr.com/winusb.htm.  I got the project to compile easily enough, but, after putting the program on the board and resetting the board, it doesn’t work!  Nothing seems to happen on the board.  I’m using Windows XP, and the PICDEM board referenced in the readme.  Windows doesn’t seem to notice a USB device on the port.  I’m using the Windows driver SDK (which has USB VIEW) to monitor the USB ports.
  The reason I even found this project is because I had the same problem with other examples that came on the CD with the PICDEM board.  The DEMO program works (via usb) and turns on LEDs, and reads from the on-board potentiometer, etc., but that’s the only USB program I can get to work.  Please let me know if you can think of a suggestion (anything, really!), or if you need more information.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: PIC18F4550 WinUSB Sample
« Reply #1 on: February 17, 2011, 02:21:22 pm »
Have you used Microchip's MPLAB to run the program? That will show if the program is running or where it stops.

On the host side, viewing the setupapi log file will show if the OS detected the device.

http://msdn.microsoft.com/en-us/library/ff550882%28VS.85%29.aspx

Jan

Limited_Atonement

  • Member
  • ***
  • Posts: 10
Re: PIC18F4550 WinUSB Sample
« Reply #2 on: February 17, 2011, 02:27:31 pm »
The problem was a Preprocessor directive.  Since I was using FS USB Demo bootloader to load the program, line 77 of Hardware Profile ... .h should be uncommented, and line 81 should be commented. My co-worker just stumbled onto this looking over my shoulder.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: PIC18F4550 WinUSB Sample
« Reply #3 on: February 17, 2011, 03:37:04 pm »
Glad to hear you got it figured out.

Jan