LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to switch between 0V and 5V using FTDI USB-to-TTL convertor?

Solved!
Go to solution

I've got one of this (TTL-232R-5V-WE) from FTDI (http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm) and it came with some VIs to control the USB convertor.

 

However, I have no idea how to switch the output (between Vcc and Gnd) from 5V to 0V.

 

Basically what I need is an alternating TTL signal output from the FTDI convertor.

 

Any help please? Thank you in advance.

0 Kudos
Message 1 of 8
(6,329 Views)

Just to add, I installed both the virtual com port driver and D2XX drivers.

 

The USB convertor works fine with the "Basic Serial Write and Read" example (i twisted the TXD and RXD).

 

What I need to know is what "command" do I send so that the voltage out drops to 0V?

0 Kudos
Message 2 of 8
(6,328 Views)

I wired up my device to the Gnd and Vcc. Am I suppose to wire it up to Tx and Gnd instead? How do I switch between 0V and 5V? 

0 Kudos
Message 3 of 8
(6,318 Views)

OK- sounds like you need to give us some more info.  What device is on the other end of the serial port?  did you read the manual?

 

A com port is a com port. it does not do anything but provide a physical layer to transport information.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 8
(6,312 Views)

@Jeff Bohrer wrote:

OK- sounds like you need to give us some more info.  What device is on the other end of the serial port?  did you read the manual?

 

A com port is a com port. it does not do anything but provide a physical layer to transport information.


Hi Jeff,

 

The device on the other end is a camera that accepts a TTL trigger input. I'd like to have a TTL signal to trigger the camera to take "snapshots".

 

On the camera TTL input side, there is only a + and - input. I'd assume - goes to Gnd of the TTL-232R-5V-WE. What about the + end? And how in LabView can i switch the voltages from 0V to 5V to "trigger" the camera?

 

Thank you.

0 Kudos
Message 5 of 8
(6,295 Views)
Solution
Accepted by topic author A.Low

Hi sclow,

 

at the provided link you will find datasheets with all information needed. That device is establishing a usual COM port with just TTL level signals. The VCC will always provide +5V with no opption to switch it. But you may switch the CTS/RTS signals! Just look at the description of the VISA property node -> serial settings -> modem line settings...

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 8
(6,284 Views)

@GerdW wrote:

Hi sclow,

 

at the provided link you will find datasheets with all information needed. That device is establishing a usual COM port with just TTL level signals. The VCC will always provide +5V with no opption to switch it. But you may switch the CTS/RTS signals! Just look at the description of the VISA property node -> serial settings -> modem line settings...

 


Hi GerW,

 

Thank you for the reply. I was not familiar with serial comms. The datasheet said CTS and RTS is the request (or clear) to send control output (or input) / handshake signal. I thought that this was something for data transfer.

 

I'll try it ASAP. Thank you very much for the tip. I hope I'm finally on the right track.

0 Kudos
Message 7 of 8
(6,273 Views)

Alright RTS works! Problem solved! Thank you very much guys!!! Smiley Very Happy

0 Kudos
Message 8 of 8
(6,262 Views)