Welcome! Log In Create A New Profile

Advanced

Sending on Serial pins other than Serial0

Posted by mamech 
Sending on Serial pins other than Serial0
February 02, 2017 07:19PM
Hello

I want to use Serial1, Serial2, Serial3 instead of Serial0 in Arduino mega. I want to send the serial communication bytes to the serial pins directly, not using USB.
any suggestions about how this can be applied?
Re: Sending on Serial pins other than Serial0
February 03, 2017 05:22AM
See [forums.reprap.org]

Then all you need to do is change the serial port in your firmware.

NB to upload new firmware you will still need to use serial0, unless you also update the boot loader code.

NB you do know you can get at TX0/RX0 on a ramps, bypassing the usb to serial converters? see AUX-1 port, D0/D1 is the same pins as RX0/TX0
This is how tft28 boards talk to ramps.

Edited 1 time(s). Last edit at 02/03/2017 05:26AM by Dust.
Re: Sending on Serial pins other than Serial0
February 03, 2017 07:06AM
thank you so much!

but how to change serial port in my firmware.? which part should be edited??
Re: Sending on Serial pins other than Serial0
February 03, 2017 06:20PM
marlin configuration.h

/**
* Select which serial port on the board will be used for communication with the host.
* This allows the connection of wireless adapters (for instance) to non-default port pins.
* Serial port 0 is always used by the Arduino bootloader regardless of this setting.
*
* :[0, 1, 2, 3, 4, 5, 6, 7]
*/
#define SERIAL_PORT 0

Seriously did you even try and look?...
Re: Sending on Serial pins other than Serial0
February 04, 2017 05:20AM
Actually, I changed and looked in Configuration.h many times, and this is the first time that I notice this ! I was thinking that the change would have to be done in MarlinSerial.h, because it has also settings for Serial port.
anyway, thanks for your helpful response.
Sorry, only registered users may post in this forum.

Click here to login