LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ATmega to Labview on USB

Earlier I connected ATmega with Labview through RS232 protocol using COM port on NI controller. Can I connect ATmega to Labview through USB port instead COM port using RS232 protocol?

0 Kudos
Message 1 of 6
(5,314 Views)
Hi,

when your ATMega creates a virtual COM port (VCP) you can use the very same LabVIEW VI!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(5,288 Views)

COM Port have 9 pins, USB - 4. How I must reconnect it?

0 Kudos
Message 3 of 6
(5,260 Views)
You don't. You would use a driver that makes the USB connection a virtual com port. This would be a question for Atmel support and not LabVIEW.

Your other option would be to use lower level USB RAW and the VISA Wizard to create a driver. This would require extensive changes to your program and would not be trivial.

http://forums.ni.com/t5/LabVIEW/Nugget-1-of-n-GEtting-started-with-USB-communication-via-VISA/m-p/74...
0 Kudos
Message 4 of 6
(5,244 Views)

If your Atmega does not have a USB interface then you need a USB to RS232 adaptor.

 

I recommend only using adaptors with FTDI chipsets, as the Prolific chipset has been counterfeited and the fake Prolific adaptors can cause problems. http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm

 

Once you have the USB to RS232 adaptor and driver installed you use it just like any other Com port.

 

The fact that it is a USB device is irrelevant at this point, you don't have to do anything special to used it.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 6
(5,206 Views)

Yeah having an extra chip doing the virtual com stuff can get in the way some times.  I've started using Teensys for most of my projects, which have USB built into the micro.  They are cheap, ARM based, many times more powerful than an Arduino, but is programmed in the Arduino IDE, compatible with practially all libraries, and has USB built in.

 

https://www.pjrc.com/teensy/

0 Kudos
Message 6 of 6
(5,185 Views)