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 interfacing

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



Joined: 17 Nov 2009
Posts: 50

View user's profile Send private message

USB interfacing
PostPosted: Mon Mar 10, 2014 3:08 pm     Reply with quote

Greetings!

Options for interfacing USB PIC device on PC.

After looking around I found two possible outcomes.
-FTDI with provided drivers (expensive)
-Virtual COM cdc

FTDI is out of the game, because it raises cost and adds additional PCB design & complexity.

What are the "real life" options for native PIC USB.

Where to find virtual USB drivers for different OS?

What are Your experiences with solving similar problems?


Req are:
- PIC native USB (no FTDI)
- minimal bit rates
- anything that can be coupled with java. javax.comm? Something fresher perhaps?
- CDC, HID anything goes if java can receive.
- Java is not best choice for such problem. What then how does it work with hardware? drivers?


Thank you in advance!
temtronic



Joined: 01 Jul 2010
Posts: 9174
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Mar 10, 2014 3:29 pm     Reply with quote

I gave up on the 4550 type PIC with USB, opting for a USB<>TTL module for $2. Perhaps the newer USB PICs are 'better' but the driver used 1/3 of program space.
For $2 I got a 'wire up and go' module WITH connector, proper wiring,2 LEDS, drivers inside the module...oh yeah, it worked FIRST time !
Currently I use the 18F46K22 for 99% of my projects adding the USB<>TTL module for those that need USB is super easy.

It's a viable option,especially when you consider OVERALL cost of a project.

hth
jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19369

View user's profile Send private message

PostPosted: Mon Mar 10, 2014 4:12 pm     Reply with quote

I've used the standard CCS drivers happily on several dozen products. Standard serial drivers work under Linux/Unix, and the supplied drivers handle Windows.
Key is that you do have to be a little more complex than the examples might suggest. USB actually _requires_ the connection sense pin, if the device is not powered by the bus. Without this it can't handle disconnect/reconnect correctly.
I have posted in the past the sequence needed to get the comms correctly handled. Do a search for 'usb_cdc_carrier.dte_present', which is used in these notes, and I doubt if this has been used in many other threads.
The internal code is as easy as external interfaces, once you have it working right.

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