View previous topic :: View next topic |
Author |
Message |
PIC18
Joined: 28 Aug 2011 Posts: 3
|
USB CDC Problem with PIC18F4553 |
Posted: Sun Aug 28, 2011 7:41 pm |
|
|
Hello everyone.
I'm new to the forum and my English is pretty bad, first of all I apologize for my expression.
I am doing a personal project in which I use a PIC18F4553 as DMX transmitter, connected by USB to the PC.
I am using a USB protocol debugger to check the driver's communication with the PIC.
I got the enumeration and the creation of the serial port are satisfactory.
I developed a small application that sends the PIC command 1 byte and a string of 10 bytes every 2 seconds at a speed of 38,400 bps. The pic just have to light a LED at the end of each transmission. communication works well a few minutes for no apparent reason is interrupted by a packet returns to the debugger "status unsucessfull." Later, the pic rejects the package, returning "canceled status." The pic does not crash, because restarting the USB connection is working again.
Has anyone had the same problem? If someone could help me I'll be happy to provide more data. |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Tue Aug 30, 2011 9:50 am |
|
|
post the code you wrote
especially the rs-232 serial port code that
is sending and receiving the DMX channel.
ditto any command response parser code that you depend on
for both the USB port AND the serial DMX port
then anlysis may be possible
but as it is --who can tell whats wrong? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19499
|
|
Posted: Tue Aug 30, 2011 9:56 am |
|
|
However, one thing that can cause intermittent USB, is inadequate smoothing on the Vusb connection. Also LED's draw significant current. Depending on how the supply is generated for the chip, and what current limiting resistors are used on these, the PIC could well be crashing, and recovering.
Best Wishes |
|
|
PIC18
Joined: 28 Aug 2011 Posts: 3
|
USB CDC Problem with PIC18F4553 |
Posted: Tue Aug 30, 2011 10:35 am |
|
|
Thanks Ttelmah, had not thought of that little detail. But it is true that the data sheet mentions it. |
|
|
|