Arduino Comms

Status
Not open for further replies.

Wp100

Well-Known Member
Hi,

Just helping a friend out, not sure if he his doing the right thing with his comms.

He is using a PC program , say Putty, to directly communicate with a Mega2560 but he is using the Megas USB own cable connection for the data link.

Seems it works to some degree, but seem to remember reading that this method can cause problems, correct ?

thanks.
 
I've not used a Mega, but it works fine on a Uno, and is the way you'd normally do comms to a PC. All you're doing is connecting via a serial/USB chip, which you'd have to add otherwise.
 
some differences , clearly not

There is the Mega2560 has 4 hardware uart's you can use the wrong one thats not hooked to USB.

The Uno only has one.

The Mega can use more then one hardware uart comes in handy you can read on one and send the data to a pc with the one on the usb.
 
Last edited:
There is one little bind...

When the RS232 via USB is connected, the arduino mega reboots on the DTR pin... So!!! You need a cap from ground to reset to prevent this from happening.
 
There is serial text monitor utility, and a serial data plotting (graphing) utilitly built-into the Arduino IDE. I use it all the time for debugging a program.
 
Okay.... The why's and wherefore's!!

Arduino and Arduino mega reboot on USB so they can move into bootloader... The DTR is pulsed by the Ardino IDE and conected to the reset so the reset is also pulsed..

You need this to happen so you can re-program from the IDE.... If you are using the arduino as a serial device OTHER than the IDE you need to stop the Arduino re-booting EVERY time you use the serial port!! I place a100uf cap in a IDC plug then have a connector on the reset / ground pins... You need to remove this when you need to re-program... pretty simple fix..
 
Are you sure I don't think it care's if you use the serial com it only reboots when the ide toggles the DTR pin.
I've never had a reboot problem.
I have had a programming problem where I needed a cap to help keep the DTR up longer so the ide could see that the arduino was in program mode.
The mega has 4 hardware serial ports the uno has only one people use the wrong port on the mega all the time
as you can see there are 4


And this little part shows that the serial should work as long as you leave DTR alone
 
Personally from Mega2560 I am very happy.

If the hardware is supported and the software is ok(this will be your problem) there should be no worries.

Please post your software and if possible hardware setup.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…