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 support@ccsinfo.com

USB

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



Joined: 11 Nov 2006
Posts: 181
Location: Birmingham, UK

View user's profile Send private message

USB
PostPosted: Tue Dec 11, 2007 1:58 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Dec 11, 2007 2:08 pm     Reply with quote

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...
PostPosted: Mon Jan 07, 2008 1:10 pm     Reply with quote

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

View user's profile Send private message

Re: Usb example works but...
PostPosted: Tue Jan 08, 2008 6:45 am     Reply with quote

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.
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