|
|
View previous topic :: View next topic |
Author |
Message |
coellen_d
Joined: 10 Apr 2007 Posts: 5 Location: Germany/Bonn
|
CDC: no connection after closing and re-open terminal |
Posted: Tue Mar 10, 2009 7:57 pm |
|
|
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
|
|
Posted: Wed Mar 11, 2009 3:28 am |
|
|
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 |
|
|
|
|
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
|