FTDI Virtual Com Port

I have an application program that allows scripting and has a serial port interface for connecting 'lab equipment'. I need to control an LED's brightness. I figured I'd use one the FTDI USB chips and their Virtual Com Port, but I can't figure out what the Virtual Com Port does. The FTDI web site says there is a lot information on the web about using com ports so they are not going to repeat it. Sure I can write to a com port. The data goes to the FTDI chip, goes round and round and goes where and does what? Can anyone here tell me how the FTDI Virtual Com Port works or point me to a web page with information on it?

Thank you

Reply to
Wanderer
Loading thread data ...

They mean that, once you've installed their device driver, you talk to COM4: (or wherever the FTDI driver has assigned itself) just as you would a "real" (i.e., non-virtual) COM port such as COM1: or COM2: .

E.g.,

f=fopen("com4:") fwrite(f,"Hello world!\n") // "Hello world!" comes out of Tx pin of FTDI chip

If you look at the pinout of the FTDI chip, you'll see it has all standard pins that a traditional serial port does -- Tx/Rx/DTS/DSR/RCD, etc. To a decent approximation, these behave exactly the same as those on a regular serial port (e.g., COM1: again) do.

So if you know how to make your application work when connected to COM1:, you just change the code to open COM4: (or whatever) instead, and there's a good chance it'll "just work."

Note that FTDI does have another API available that lets you do more sophisticated things with their chip -- bit-banging the I/O pins to approximate I2C or SPI, for instance; things a traditional COM port can't do.

---Joel

Reply to
Joel Koltner

Thanks. That make sense. I was looking at the FT200X or FT220X and they don't have those pins and the datasheet mentions the VCP driver. Maybe FTDI just copied that part into all their data sheets even though VCP doesn't apply for these chips.

Reply to
Wanderer

I

se

d

Yes, one can go crazy trying to figure out what FTDI chips does. If you are controlling an LED, you want the parallel port version. You need to figure out the drivers and protocols for such. In my opinion, it's easier to program a USB micro directly.

Reply to
linnix

o

TDI

D,

hose

and

I think I'll get one of these modules.

formatting link

Reply to
Wanderer

Absolutely. Their data sheets make approximately no sense.

If

You could pipe the FTDI chip's TTL serial data output straight into an LED. Then send a continuous stream of serial data from your PC, with various interesting byte values that would PWM the LED.

John

--
John Larkin, President
Highland Technology, Inc
 Click to see the full signature
Reply to
John Larkin

o

TDI

D,

hose

and

if it is the standard ft232 usb-uart you could just use rts/dtr they are outputs and can be controlled just like any "real" uart

or you can use the direct FTDI driver instead of the VCP driver and pretty much all the pins become GPIO

In my opinion,

in some cases maybe, but then you are stuck with the need to program and install your own USB driver, FTDI is already supported in most OSs

-Lasse

Reply to
langwadt

These are hard to beat:

formatting link

Reply to
mike

formatting link

They're sure cheap. Any experience with them?

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
 Click to see the full signature
Reply to
Phil Hobbs

formatting link

I bought a pair, but haven't really used them. Seem to be well made. I loaded the generic cp210x drivers in XP and hooked tx to rx. Seems to send and receive data.

Chip is marked as a real Silabs chip. Not much else on the board to go wrong.

I bought 'em cause they're cheap while I was looking for a Bluetooth/serial board.

There are a bunch of

Reply to
mike

Dunno about this "virtual" crap..would expect that data goes into a virtual hole ( = "PAFF").

Reply to
Robert Baer

Check out this from Olimex:

formatting link

232.html

It's only $18, and uses the Microchip PIC18F14K50 20 pin USB chip which=20 costs less than $2.50 in single quantities.

formatting link
dip-20/dp/77M3103

Paul=20

Reply to
P E Schoen

formatting link

I have this type:

And this type:

Both work OK, so far.

--
You can't have a sense of humor, if you have no sense.
Reply to
Michael A. Terrell

formatting link

formatting link

...which demonstrates just how amazing it is that for $2.92 you can get a single USB to RS-232 converter shipped to your front door from Taiwan!

Reply to
Joel Koltner

This is the answer from FTDI.

"You cannot use the VCP driver to access CBUS BitBang mode with the FT220X device. Use our D2XX API commands to implement CBUS BitBang.

In FT1248 mode, you can use the VCP driver with standard Read and Write COM port commands to send and receive data from the FT1248 slave interface. You can also use our D2XX driver API (FT_Read,FT_Write) to communicate with the FT1248 slave interface."

Reply to
Wanderer

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.