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

USB CDC Problem with PIC18F4553

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



Joined: 28 Aug 2011
Posts: 3

View user's profile Send private message

USB CDC Problem with PIC18F4553
PostPosted: Sun Aug 28, 2011 7:41 pm     Reply with quote

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

View user's profile Send private message AIM Address

PostPosted: Tue Aug 30, 2011 9:50 am     Reply with quote

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: 19537

View user's profile Send private message

PostPosted: Tue Aug 30, 2011 9:56 am     Reply with quote

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

View user's profile Send private message

USB CDC Problem with PIC18F4553
PostPosted: Tue Aug 30, 2011 10:35 am     Reply with quote

Thanks Ttelmah, had not thought of that little detail. But it is true that the data sheet mentions it.
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