View previous topic :: View next topic |
Author |
Message |
ELCouz
Joined: 18 Jul 2007 Posts: 427 Location: Montreal,Quebec
|
|
Posted: Mon Oct 01, 2007 9:35 pm |
|
|
well you found your problem
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
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
ELCouz |
|
|
JohnLook
Joined: 16 Nov 2006 Posts: 4
|
Problem with USB |
Posted: Wed Oct 03, 2007 3:18 pm |
|
|
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
|
|
Posted: Wed Oct 03, 2007 4:39 pm |
|
|
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
|
|
Posted: Wed Oct 03, 2007 5:18 pm |
|
|
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
|
Problem with USB |
Posted: Wed Oct 03, 2007 7:24 pm |
|
|
Hi. I would thank you a lot. It's working , 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
|
|
Posted: Wed Oct 03, 2007 8:28 pm |
|
|
sorry i forgot to adapt the header to your project specs |
|
|
|