View previous topic :: View next topic |
Author |
Message |
art
Joined: 21 May 2015 Posts: 181
|
ex_usb_scope.c compile error |
Posted: Tue Nov 24, 2015 3:56 pm |
|
|
Hai,
I'm trying to compile " ex_usb_scope.c" example using PIC18f4550 but it shows error :
#ERROR You must include USB hardware driver (in the usb.c) .
What should i do? Kindly please help me
Code: |
/////////////////////////////////////////////////////////////////////////
//// ex_usb_scope.c ////
//// ////
//// This example shows how to develop a USB bulk device, and is ////
//// accompanied by an example Windows program (oscope.exe) and ////
//// an example Windows USB Bulk driver (usbdemo.sys). This example ////
//// will run on CCS's USB Prototype board. ////
//// ////
//// NOTE: THIS DOES NOT WORK PIC16C7x5 BECAUSE THAT USB PERIPHERAL ////
//// IS A SLOW SPEED PERIPHERAL, AND SLOW SPEED ONLY SUPPORTS ////
//// CONTROL AND INTERRUPT TRANSFERS. ////
//// ////
//// When a PIC with this code is connected to the PC, an install ////
//// driver wizard should pop-up in Windows. Install the ////
//// provided usbdemo.sys driver. You may have to reboot the ////
//// machine. Once installed, you can use oscope.exe to see the ////
//// data from the PIC. ////
//// ////
//// This file is part of CCS's PIC USB driver code. See USB.H ////
//// for more documentation and a list of examples. ////
//// ////
/////////////////////////////////////////////////////////////////////////
//// ////
[code deleted]
|
+++++++++++++++++++
Code deleted.
Reason: Forum rule #10:
10. Don't post the CCS example code or drivers.
http://www.ccsinfo.com/forum/viewtopic.php?t=26245
-Forum Moderator
+++++++++++++++++++ |
|
![](templates/subSilver/images/spacer.gif) |
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Tue Nov 24, 2015 4:15 pm |
|
|
Hi,
There is this section in the code. did you remove it by any chance?
Code: |
#if __USB_PIC_PERIF__
#if defined(__PCH__)
#include <pic18_usb.h> //Microchip PIC18Fxx5x hardware layer for usb.c
#elif defined(__PCD__)
#include <pic24_usb.h> //Microchip PIC18Fxx5x hardware layer for usb.c
#endif
#else
#include <usbn960x.h> //National 960x hardware layer for usb.c
#endif
|
Since you are using an 18F PIC, I'd simply reduce it to this:
Code: |
#include <pic18_usb.h> //Microchip PIC18Fxx5x hardware layer for usb.c
|
Does that solve your issue? _________________ John
If it's worth doing, it's worth doing in real hardware! |
|
![](templates/subSilver/images/spacer.gif) |
art
Joined: 21 May 2015 Posts: 181
|
|
Posted: Tue Nov 24, 2015 4:24 pm |
|
|
Hi,
I did not remove it. But it still give Error ![Crying or Very sad](images/smiles/icon_cry.gif) |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Nov 24, 2015 4:39 pm |
|
|
I edited ex_usb_common.h and changed it to use the 18F4550, and it
compiles OK with CCS compiler version 5.051.
What's your compiler version ? |
|
![](templates/subSilver/images/spacer.gif) |
art
Joined: 21 May 2015 Posts: 181
|
|
Posted: Tue Nov 24, 2015 5:26 pm |
|
|
Hi PCM
It works after I edit ex_usb_common.h to use the 18F4550.
Thank you very much... |
|
![](templates/subSilver/images/spacer.gif) |
|