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 CCS Technical Support

Problem with USB
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ELCouz



Joined: 18 Jul 2007
Posts: 427
Location: Montreal,Quebec

View user's profile Send private message

PostPosted: Mon Oct 01, 2007 9:35 pm     Reply with quote

Quote:
vUSB is at 1,0V


well you found your problem Wink

Quote:
I have the schematic of the project, but I don't know how to post it, can you explain ?


Yes, if its an image simply send it to a very simple site like www.tinypic.com then the site will give you a URL like

IMG Code for Forums & Message Boards:
[IM.G]http://i21.tinypic.com/xxxxxx.jpg[/IM.G]

copy/paste it here and be sure the
Disable BBCode in this post option is UNchecked when submitting your post Smile


back to the vUSB of 1.0V ,,, the voltage must be 3.3V or the usb connection will not work ,, i suspect your vUSB capacitor (remember it MUST be one with no polarity ,,, ceramic one with one pin grounded and the other to the vUSB pic pin)

happy to help Razz
ELCouz
JohnLook



Joined: 16 Nov 2006
Posts: 4

View user's profile Send private message

Problem with USB
PostPosted: Wed Oct 03, 2007 3:18 pm     Reply with quote

Hi, I put the schematic here:


I found the problem. When I first connect the device to USB port the Vusb goes to 3.3V but after three seconds the device is disconnected and Vusb goes to 1.0V.

I tried a different code. I used the code of C18 compiler that I found in this page:
http://www.create.ucsb.edu/~dano/CUI/
and it work very well, the device didn't disconnect. So I concluded that the problem was with the software not with the hardware. Could you look my code and find something that I may forgot to include ? Thanks a lot.
nikin78



Joined: 20 Sep 2007
Posts: 11

View user's profile Send private message

PostPosted: Wed Oct 03, 2007 4:39 pm     Reply with quote

i did the following and everything worked fine for fast mode

Vusb connected to D+ with a 1.5k resistor.
.1uf capacitor from Vusb to ground

This may help on the hardware end.
ELCouz



Joined: 18 Jul 2007
Posts: 427
Location: Montreal,Quebec

View user's profile Send private message

PostPosted: Wed Oct 03, 2007 5:18 pm     Reply with quote

Quote:
Vusb connected to D+ with a 1.5k resistor.


There's no need to put a pull up res. on the D- and/or D+ usb line there are already internal pullups on D+/D- in the PIC see PIC Datasheet.

EDIT: i would rewrite the program from scratch the example contain alot of useless code/lines

this example would write to the terminal HELLO WORLD! =) every 2 sec.
Cleaner you think ? Hell yes ! :P

i have cutted the code for the loop thing and the sense pin code since you dont use it based in the reply you gave.

Quote:
I'm not using sense pin. I did every thing, but it still don't work.




Code:

#include <18F2550.h>
#fuses HSPLL,NOWDT,NOPROTECT,NOLVP,NODEBUG,USBDIV,PLL3,CPUDIV1,VREGEN
#use delay(clock=48000000)
#include <usb_cdc.h>

void main(void) {
usb_cdc_init();
usb_init();

while (TRUE)
   {
   usb_task();
   delay_ms(2000);
   printf(usb_cdc_putc,"\r\nHELLO WORLD! =) \r\n");
   }
}
JohnLook



Joined: 16 Nov 2006
Posts: 4

View user's profile Send private message

Problem with USB
PostPosted: Wed Oct 03, 2007 7:24 pm     Reply with quote

Hi. I would thank you a lot. It's working Very Happy, but I have to make the follow change: I changed the fuse PLL3 to PLL5. When I did this it start working, I don't know why it wasn't working with PLL3.
ELCouz



Joined: 18 Jul 2007
Posts: 427
Location: Montreal,Quebec

View user's profile Send private message

PostPosted: Wed Oct 03, 2007 8:28 pm     Reply with quote

sorry i forgot to adapt the header to your project specs Embarassed
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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