Arduino to PC interface

When setting up the Arduino,you have to select a com port. Also, it seems that pins 0 and 1 are used for the com port. My question. Is this a serial connection or a USB connection? Can I hook the Ardino USB connector to a serial port of some sort and bypass the USB stuff?

How does this work?

Assuming you have an Uno (you did not say) then the USB connection goes to a separate 16u2 microprocessor on the Uno board. The 16u2 can interface directly with USB and it converts the USB data into standard serial data that is fed to and from Pins 0 and 1 - the Rx and Tx pins.

I don't know what you had in mind when you said "Can I hook the Ardino USB connector to a serial port". You can only connect a USB port to another USB port. USB operates at a much higher frequency than the Serial that is used on pins 0 and 1.

...R

On the PC, you have to select the COM port for the Uno. I used to think of a com port as a serial RS232 interface. If I have an RS-232 terminal, could I operate the uno via the serial pins on pin 0 and 1? So if the Uno is USB, then why do I have to select a com port?

Also, there is a keyboard UDB ot PS2 (serial) adapter that is no longer in favor even though I still have some. With this device it seems that perhaps the USB can be configured to be a serial link. The keyboards that used this adapter could operate in USB mode or serial mode.

As an aside, I have been trying to use the USB shield to interface a game controller to the Arduino. I have tried many controllers, mice, and keyboards and have concluded that the USB library is not good. I am going to have to bypass the USB and make my own joystick assembly. I am really disappointed in the usb library and there is basically no help.

Why do you have to select a baud rate for the serial monitor if it is a USB interface?

barryjo:
Why do you have to select a baud rate for the serial monitor if it is a USB interface?

Your serial connection uses a virtual serial port and is assigned a COM#.
The hardware connection is a USB to serial interface similar to an FTDI interface.
Therefore you need to contend with baud rates.

The Arduino appears to the PC as a pseudo virtual serial port. USB systems can appear as several different types of devices depending on the driver software that is used in the PC.

Setting the baud rate enables the 16U2 on the Arduino board to match the baud rate that your Arduino program selects for the Atmega 328 chip.

If you use a Leonardo which has a 32U4 microprocessor that can do native USB communication the baud rate is ignored and the communication takes place at full USB speed regardless of the baud rate selected.

Are all these questions just to further your knowledge (which is fine) or do you have a specific requirement in mind - if so tell us what you want to achieve and it will make it much easier to help.

...R

Robin2, In addition to learning more I do have a project in mind.

Originally, I wanted to replace a radio control transmitter and receiver with some Arduino hardware and a couple of the RFM67 modules (maybe I dont have he number correctg). I wanted to use a USB game controller as the user control. I have the rf link working. I have the PWM modulator working. However, I am frustrated to the point of dumping the USB shnield and a game controller. It seems that the USB library only works with specific devices and I do not know what they are and I cannot continue to buy one from Amazon, try it, see that it doesn't work, and then return it. I have done this three times so far. So, I have decided to purchase some of the joystick assemblies and then use the ADC's on the Arduino to read their position and then send the position to the remote Arduino via the RF link.

I have this joystick controller from a RC simulator that has a funny USB connector. It has the USB connector along with another IC. Ah Ha, I figured, this is a FTDI cable. I took apart the connector expecting to find a serial interface, RS232 type as a baud rate to be determined, but instead found out that it was a PWM signal. The adapter by the USB connector converts PWM to USB.

I was hoping that I could cut off the USB connector and adapter and use the box as a serial interface. Then I began to wonder how the Arduino USB connector related to a baud rate of the serial monitor. I guess if I have an assembly of joystick and buttons connected to another (perhaps) arduino that converted the switches and voltages from the joysticks to serial data I could connect it to the USB connector of the Arduino. However, it seems I will have to use pins 0 and 1 instead.

Anyway, I am still considering my options. A serial game controller would be nice but they are not available.

You need a USB Host shield to connect a USB device (like joystick) to an Arduino. The USB connection on an Uno is a USB slave (is that the correct name) not a host. The PC is the host. The Host must have software that recognizes the USB device.

I don't have any experience with a USB Host shield but AFAIK it can only work with a limited range of USB devices.

An FTDI cable (aka USB-TTL or USB-RS232 cable) can connect a USB Host to a serial connection. Note that RS232 serial uses high voltages that could damage an Arduino's 5v pins which operate at TTL voltage levels,

Cutting off USB connectors is a recipe for wasting money.

...R

I would not recommend using the Arduino USB host, or rather the USB host library that is available. I have tried many of the devices that are supposed to work and they do not work. I have wasted a lot of time trying to get the USB shield to work and have given up, and there is no help available.

barryjo:
I wanted to use a USB game controller as the user control. I have the rf link working. I have the PWM modulator working.

If you can’t find a way to get the USB game controller working, you can either hack straight into the potentiometers or even build your own. I’ve built a custom RC controller joystick set for my own Arduino RC plane project - it is possible and really isn’t that hard.

I have decided to build my own. I have ordered some joysticks so I will build my own. I do not hink it will be very hard. The USB library is worthless in my opinion.