hi! I have a nooby question. I have Arduino Mega2560 and I'm having a problem. I have this is 2 software reading and sending data in 1 comm port and I think that's not gonna work. Is it possible to add 1 more comm port with only one arduino? If yes, How?
A Mega has 4 comm ports so I think you are already adequately tooled up.
You can connect an FTDI Basic or equivalent to a 2nd com port if it is 2 USB ports that you are after.
Robin2: A Mega has 4 comm ports so I think you are already adequately tooled up.
Hi! Do you know how to use the other comm ports of mega?
tacticz03: Hi! Do you know how to use the other comm ports of mega?
It needs some work. You have to read the Arduino Serial Reference page.
It's exactly the same as using the Serial to communicate with the PC. You just use Serial1.begin() etc
If I use the Serial1.begin() in my code, will there be another comm port detected in device manager?
Read CrossRoads' reply.
MAS3: Read CrossRoads' reply.
Hi! I am trying to minimize my expenses that's why I'm not that interested in FTDI Basic for now, unless it is the only solution for my problem.
Any information you can give is important for us to be able to give you a suiting answer.
You have asked about device manager, a part of Windows. Is that what you are referring to ? Using options of your Arduino will not enable anything in Windows. The 2nd. port is a part of your Arduino. If you want to use that in Windows, you need to connect it to your computer. One way to do that, is by using an USB to serial adapter, if your PC doesn't have an actual comport available. That adapter will then appear in your device manager, and you can address it with whatever application you have.
If this is not what you are looking for, tell some more about what you are looking for.
I just re-read your first post, and combined it with your replies to this thread.
tacticz03: I have this is 2 software reading and sending data in 1 comm port and I think that's not gonna work. Is it possible to add 1 more comm port with only one arduino? If yes, How?
Your Mega has multiple comm ports in its controller. One of these is connected to a FTDI-like device that converts one of these comm ports to an USB device. So that is an external device to your controller, but on board for the Arduino. The FTDI-like device isn't capable of addressing 2 comm ports of the controller. So you can't change it in such way that it will report 2 comm ports connected to it, which seems to be what you are looking for.
There are solutions that allow multiple instances to use a single comport in Windows. Such solution will create virtual comm ports. Say you are using com3, the solution would then connect to that, create com4 and com5 (if they are not used already), and your Windows programs will connect to those. Receiving data this way will not be a huge problem, but sending data might prove to be not that easy. I have used a program like that, but never tried to send from multiple instances, so i really don't know. The program i used was free, but it isn't for x64 versions, so i haven't used it anymore for some time.
Oh I see. Using a virtual comm ports is not that easy, it is complicated. Maybe I will just use a USB to serial adapter to add another port. BTW, what can you recommend for FTDI adapter,
This, from adafruit or http://www.adafruit.com/product/70
this from sparkfun? Help me in deciding, which is better. Thanks. https://www.sparkfun.com/products/9716
These are quite equal, using the same FTDI solution. The (more expensive) cable is fixed to 3 volt level. The board can (has to) be set to either 3 or 5 volt level, and your Arduino is at 5 volt. So i'd go for the board, which has the bonus of being cheaper too.
Okay, Thanks for helping me mate :)