How to make serial communication using arduino and PC? should it be using the usb cable or through connecting Tx,Rxx pin with Max232 ? I am confused because somebody called the usb port communication a serial communication.
The USB connection emulates a serial port. No need for any converter if you are just connecting to a PC with USB.
Hope this helps. If you are still unclear, just ask.
Do you mean that usb port is connected to pin Tx and Rx? what will be the used communication protocol?
if i used labview to communicate to arduino. and i won't use arduino compiler or boot loader, i will use codevision compiler
Do you mean that usb port is connected to pin Tx and Rx?
I have NO IDEA what Arduino you have, so I cannot answer that!
what will be the used communication protocol?
Serial.
if i used labview to communicate to arduino. and i won't use arduino compiler or boot loader, i will use codevision compiler
You need to go to the LABVIEW and CODEVISION sites for support on their products.
I am talking about arduino uno
missdrew:
I have NO IDEA what Arduino you have, so I cannot answer that!
The USB port is connected the the 16U4 , this converts the USB connection to a Tx & Rx pair connected to pins 0 & 1. On the PC, you get a normal COM port in Windows, and the equivelent in LINUX.
but how could the PC see the usb port as serial port? serial port of PC has 9 pins
Magic. or thats how it's programmed. Just accept that this is how it works.
How can a PC 'see' an external hard drive or a joystick plugged into the USB?
serial port of PC has 9 pins
That is separate from USB. That is probably a "real" RS232 serial port and it will have RS232 voltage levels of ±12V. Connecting a real RS232 port directly to the Uno RX and TX will likely kill the Uno. You will need a level converter like the MAX232 between the PC serial port and the Uno.
mzdo:
but how could the PC see the usb port as serial port? serial port of PC has 9 pins
missdrew:
Magic. or thats how it's programmed. Just accept that this is how it works.How can a PC 'see' an external hard drive or a joystick plugged into the USB?
"Any sufficiently advanced technology is indistinguishable from magic --- Arthur C. Clarke"
During the discovery process when when a USB device is plugged into a PC, there is standardized messaging between a USB device and a USB host (e.g. a PC) that identifies the "Device Class" of the USB device. An Arduino plugged into the USB port will identify itself as a serial port and the operating system (Windows, Linux, MacOS) will use USB protocols appropriate to a serial device. Other common USB device classes include audio input or output devices (e.g. microphones and speakers), human interface devices (e.g. keyboard and mouse), mass storage devices (e.g. memory sticks and external disk drives).
On a lot of Arduino devices (e.g. Uno or Uno clone) there is an integrated circuit distinct from the main microcontroller which functions as a sort of translator, "speaking USB" to PC and "speaking Tx/Rx asynchronous serial" to the Arduino microcontroller. On the official Arduino Uno Rev 3 this translator is itself a programmable microcontroller, namely an Atmega16U2, that has firmware to perform this task. On many Arduino clones the translator is a non-programmable IC device built for this purpose.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.