View previous topic :: View next topic |
Author |
Message |
MiniMe
Joined: 17 Nov 2009 Posts: 50
|
USB interfacing |
Posted: Mon Mar 10, 2014 3:08 pm |
|
|
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: 9246 Location: Greensville,Ontario
|
|
Posted: Mon Mar 10, 2014 3:29 pm |
|
|
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: 19552
|
|
Posted: Mon Mar 10, 2014 4:12 pm |
|
|
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 |
|
|
|