CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

ex_usb_scope.c compile error

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
art



Joined: 21 May 2015
Posts: 181

View user's profile Send private message

ex_usb_scope.c compile error
PostPosted: Tue Nov 24, 2015 3:56 pm     Reply with quote

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
+++++++++++++++++++
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Tue Nov 24, 2015 4:15 pm     Reply with quote

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!
art



Joined: 21 May 2015
Posts: 181

View user's profile Send private message

PostPosted: Tue Nov 24, 2015 4:24 pm     Reply with quote

Hi,

I did not remove it. But it still give Error Crying or Very sad
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Nov 24, 2015 4:39 pm     Reply with quote

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 ?
art



Joined: 21 May 2015
Posts: 181

View user's profile Send private message

PostPosted: Tue Nov 24, 2015 5:26 pm     Reply with quote

Hi PCM

It works after I edit ex_usb_common.h to use the 18F4550.

Thank you very much...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group