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

CDC: no connection after closing and re-open terminal

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



Joined: 10 Apr 2007
Posts: 5
Location: Germany/Bonn

View user's profile Send private message

CDC: no connection after closing and re-open terminal
PostPosted: Tue Mar 10, 2009 7:57 pm     Reply with quote

Hello CCS-users,
I have a problem with a PIC18F2550 running as CDC on a terminal program.
Enumeration and using kbhit, putc, getc and so on works fine

If I close the terminal program the PIC is still enumerated.
I think this is right.
But if I open the terminal again, an Error occurs, because the com-port is still held open since first use with the terminal.
The only way to reconnect is to plug out the USB from the pic and start a new enumeration.

Does anyone know a trick to reconnect without new enumeration?

Thanks a lot

Dirk
Ttelmah
Guest







PostPosted: Wed Mar 11, 2009 3:28 am     Reply with quote

It ought to work fine.
Look carefully at how you are re-checking usb_task, and how your code handles the waiting in the main loop.
What terminal program?. Have you tried another?. Some have a background thread that handles the comms, and if this is not being stopped, when you leave the program (you don't tell it to disconnect), then this thread keeps running and holds the port open. However most likely thing is in the layout of your program, and how it is waiting once the code starts running.

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