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

18F2455, USB-HID, random error, help me please

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



Joined: 17 Jan 2005
Posts: 10

View user's profile Send private message

18F2455, USB-HID, random error, help me please
PostPosted: Wed Sep 26, 2007 9:34 am     Reply with quote

Hello.

first, thank you for reading my question.

second, my english might be very poor, sorry.


* PROBLEM

I made ten PIC(s) it can connect to PC with USB-HID

The PIC(s) is consisted of 20Mhz External OSC

and It running 48Mhz MicroProcessor Mode

I said I made 10 PIC(s)

but, just 5-6 PIC(s) is working.

remain (5-4) PIC(s) is not working.



* THE RANDOMLY ERROR

at the first time connected to USB

it seems to be right. but 1~2 minutes after.

i can hear the sound "USB DISCONNECTED SOUND"

(as you know, USB Sounds are CONNECT, DISCONNECT, ERROR, etc...)

and then, when I connect again that is disconnected PIC.

I can not hear the sound "USB CONNECTED"

so It is not working anymore....



* TALKING

I made over the 100 PIC(s) up to now,...

I wasted about 40 PIC(s).

and, I am afraid remained 60 PIC(s) it will be changed to "RANDOMLY ERROR".

Please help me.




0. I did not use "SHEILD LINE" in USB cable
1. I Blocked Electrical Shock using Ground
2. I use Elnec "SMART PROG Perallal Port"
3. I use 1.5K resister on USB Data Line
4. I use 4.7uF capacitor on Vusb
5. MCLR is made as recomanded.
6. USB Voltage Regulator is Enabled (PIC is a little hot)


Code:

#define __USB_PIC_PERIF__ 1
#include "18F2455.h"
#device *=16 adc=10
#fuses HSPLL,NOWDT,NOPROTECT,NOLVP,NODEBUG,USBDIV,PLL5,CPUDIV1,VREGEN,NOBROWNOUT,MCLR //20Mhz Ext-OSC, 48Mhz Micom Running with USB
#use delay(clock=48000000)

#DEFINE USB_HID_DEVICE  TRUE
#define USB_EP1_TX_ENABLE  USB_ENABLE_INTERRUPT
#define USB_EP1_TX_SIZE    18
#define USB_EP1_RX_ENABLE  USB_ENABLE_INTERRUPT
#define USB_EP1_RX_SIZE    18
#include "pic18_usb.h"
#include "usb_desc_hid.h"
#include "usb.c"
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Sep 26, 2007 11:25 am     Reply with quote

You should look at the Microchip USB forum. Here's the link:
http://forum.microchip.com/tt.aspx?forumid=102

Also use the Search page on the Microchip forum.
http://forum.microchip.com/search.aspx

Here are some posts that I found by using the search page to search
the USB forum, and search for: disconnects
Look at all these posts. See how the Microchip USB forum is much
better in terms of answering Microchip USB questions.
http://forum.microchip.com/tm.aspx?m=236558&mpage=1&key=disconnects&#236558

Here's somebody else with your problem. No answers.
http://forum.microchip.com/tm.aspx?m=152035&mpage=1&key=disconnects&#152035

This one may have an answer for you:
http://forum.microchip.com/tm.aspx?m=119076&mpage=1&key=disconnects&#119076

http://forum.microchip.com/tm.aspx?m=181612&mpage=1&key=disconnects&#181612

http://forum.microchip.com/tm.aspx?m=248476&mpage=1&key=disconnects&#248476
denkid



Joined: 17 Jan 2005
Posts: 10

View user's profile Send private message

Thankyou so much
PostPosted: Wed Sep 26, 2007 11:30 am     Reply with quote

I am reading informations

thankyou

and I am waitting for anyother comment you have.

Thank you so much
denkid



Joined: 17 Jan 2005
Posts: 10

View user's profile Send private message

I found something....
PostPosted: Wed Sep 26, 2007 1:51 pm     Reply with quote

I tested other OSC configuration using broken PIC (Disconnected USB)

for example, internal osc.

it is still working. (of course, external osc is not working)


but, internal osc can not support USB.


I think (It might be wrong..)

1. Internal OSC circuits of PIC is broken.
2. Internal USB Regulator is broken.



Thankyou for reading
Ttelmah
Guest







PostPosted: Wed Sep 26, 2007 3:05 pm     Reply with quote

Why have you got a 1.5K resistor on the USB data line?.
The PIC has internal resistors. Have you disabled these?.

Are you using the USB connection sense circuit (two resistors from the USB power to a pin on the PIC). If so, have you enabled fast_io on the port with this connection - if you don't, and output a value on this port, you can hang the USB.

I see no mention of supply smoothing for the PIC itself.

What else is the PIC driving?. The chip should _not_ run hot. Even with the USB regulator enabled, the total power dissipation of the chip is tiny, unless you are driving something else.

Put a smaller capacitor on Vusb. The problem is that 4.7uF, almost certainly implies an electrolytic capacitor. These can have poor HF performance. The capacitor on this line provides two functions. A degree of 'reservoir', and stabilising the regulator from oscillating. An electrolyic capacitor, may not perform this second function, leaving the regulator oscillating. If this happens, it will run hot, and may well fail.

Best Wishes
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