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 on PIC24

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



Joined: 13 Apr 2011
Posts: 417

View user's profile Send private message

USB on PIC24
PostPosted: Wed May 16, 2018 3:51 am     Reply with quote

There's any library for USB OTG for PIC24 in CCS or I must write my own?

Can PIC24 OTG capable device run just with the regular USB library as CDC or HID?

I read in another older post that is possible to use the Microchip OTG library in a CCS code by linking it.
I never do it something like that.
Is that possible?
Any tutorial?
_________________
Electric Blue
Ttelmah



Joined: 11 Mar 2010
Posts: 19506

View user's profile Send private message

PostPosted: Wed May 16, 2018 6:44 am     Reply with quote

No.

Yes.

The standard PIC library runs the devices as 'slaves' fine. For master you'd have to re-compile the MicroChip library. However 'beware'. Remember you have to have a stack supporting every device you want to use. The MicroChip library gives a lot of problems with many devices. I did adapt it some time ago, but after a while 'gave up'. Even compiling it with the MicroChip compiler it was terribly unreliable. I'd rate USB OTG on the PIC as a 'nearly' working product. It's OK if you are developing to use just one target device, but forget the normal simplicity of plugging in loads of different devices....
In the end it was much simpler to add a Vinculum. The complete VDRIVE2 module was about $20, and included the USB connector, and removed the need to have a crystal on my board (The internal oscillator was accurate enough for everything else). By the time you costed the connector, code, crystal etc., it was by far the easiest way to go....
E_Blue



Joined: 13 Apr 2011
Posts: 417

View user's profile Send private message

PostPosted: Wed May 16, 2018 11:13 am     Reply with quote

Thanks for answering.

I just need to connect another PIC18F USB CDC or HID and a pendrive to load new firmware.
Later I was thinking in to use it to read MP3 and WAV files from a pendrive, but that is for another project.

Did you remember what library version did you used?
_________________
Electric Blue
Ttelmah



Joined: 11 Mar 2010
Posts: 19506

View user's profile Send private message

PostPosted: Wed May 16, 2018 11:36 am     Reply with quote

It was whatever Microchip was supplying the sources for about 3 years ago. Honestly use the Vinculum. That will do what you want and you could have it working in a few hours.
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