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

USB CDC Win7 64 "This device cannot start. (Code 10)

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



Joined: 01 Dec 2010
Posts: 25

View user's profile Send private message

USB CDC Win7 64 "This device cannot start. (Code 10)
PostPosted: Tue Dec 14, 2010 12:48 pm     Reply with quote

Hello, I'm using a PIC18F27J53 with CCS 4.114. I'm attempting to use the CCS CDC driver but I keep getting the message in the subject when using Win7 64. On an old XP computer the driver installs and functions correctly. The following is the code I'm using to test the connection.

Code:
void main(){
   initialise();
  BYTE i;
   usb_init_cs();
   
   do
   {
      usb_task();
      
       if (usb_enumerated())
       {
      if (msg==0){
         printf(lcd_putc,"\fEnumerated!");
         msg=1;
      }
         if (usb_cdc_kbhit())
         {
            i = toupper(usb_cdc_getc());
           
            if (i == 'R')
            {
               printf(usb_cdc_putc, "Sending a R Back");
            }
           
            if (i == 'W')
            {
               printf(usb_cdc_putc, "Sending a W Back");
            }
         }
      }
   else {
      if (msg==1){
         printf(lcd_putc,"\fWaiting...");
         msg=0;
        }
   } 
   } while (TRUE);
}


There are lots of posts in the forum saying different things regarding the compatibility of the CDC driver with Win7 64. I would like to know if the driver bundled with CCSC 4.114 should work on Win7 64 and if so does anyone know why I get "This device cannot start. (Code 10)" in device manager for "USB to UART"
Bollo



Joined: 01 Dec 2010
Posts: 25

View user's profile Send private message

PostPosted: Wed Dec 15, 2010 10:54 am     Reply with quote

I have just solved it it seems. XP doesn't seem to care if the
Code:
#define  USB_CONFIG_BUS_POWER
section in usb_desc_cdc.h is set to a value even if the 5V line of the usb is not connected. Win7 (64 or 32) does seem to get upset. Setting that USB_CONFIG_BUS_POWER to 0 seems to have allowed the device to start so no more code 10 errors!
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