View previous topic :: View next topic |
Author |
Message |
BLL
Joined: 11 Nov 2006 Posts: 181 Location: Birmingham, UK
|
USB |
Posted: Tue Dec 11, 2007 1:58 pm |
|
|
Hi,
I am about to delve into usb, using an 18F2550. I have been looking at the CCS examples and in the RS232-USB example, there is a call to a function usb_task(). I have looked in the various files in drivers etc., but cannot find the function or establish what its purpose is.
Can anyone help, please?
Thanks
Brian |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Dec 11, 2007 2:08 pm |
|
|
Using a text search program such as Examine32 shows
that it's in these files:
Quote: | c:\Program Files\picc\Drivers\usbn960x.c
c:\program files\picc\drivers\pic_usb.h
c:\program files\picc\drivers\pic18_usb.h
|
|
|
|
drum_yogi Guest
|
Usb example works but... |
Posted: Mon Jan 07, 2008 1:10 pm |
|
|
Hi
I can only confirm that the example code to create a virtual comm port from the usb port works.I got it to work but whenever I stop the program running in the pic (18F4550) the driver loaded in the host win2k machine shuts down and I have to disable it then re-enable it to restore communication.
I used the ex_usb_serial.c example provided with the version 4.xx CCS compiler. If I resolve my problem then I will post another message.
Drum_yogi |
|
|
davekelly
Joined: 04 Oct 2006 Posts: 53 Location: Berkshire, England
|
Re: Usb example works but... |
Posted: Tue Jan 08, 2008 6:45 am |
|
|
drum_yogi wrote: | Hi
but whenever I stop the program running in the pic (18F4550) the driver loaded in the host win2k machine shuts down |
Correct.
The PIC is performing the USB comms, so if you stop it running, then the host will detect this is disconnected.
Debugging the USB applications can be a nightmare. |
|
|
|