Serial3 question

On a mega, I'm using Serial3 (pins 14 and 15), to control a Sabertooth 2x60 controller; but only need the Tx pin, (14). Is it possible to use Serial3's Rx pin, (15), for something else, ie, digital input or output?

If this has been asked before, I apologize, but nothing relevant showed up in my searches.

Thank you Perry. That makes sense, and I only need a baudrate of 9600 on the Tx pin. The Sabertooth does not return any data, so I do not need the Rx pin for anything. Thanks again. That was a very quick reply!

That was weird...I replied to a post that is no longer there. LOL

John,
Sorry, I deleted my reply immediately after I posted it because I realised that I had misread your question, so now you have replied to an answer that's not there.

My answer was that you can use TX for one thing and Rx for another as long as the baud rate is the same for both, but that's not what you asked.

I would think what you ask is possible but I have not tried. Try it. Set up the serial port then configure pin 15 for input or output. You won't break anything by trying.

A Mega has a lot of pins, what are you doing that means you need to do this?

PerryBebbington:
A Mega has a lot of pins, what are you doing that means you need to do this?

LOL, it's a complex project, with a lot of sensors, LEDs, a software SPI display, etc. Every pin is used, although I suppose I could use a shift register to combine 13 indicator LEDs onto one pin. I haven't gotten to that point yet, though.
The 2560 chip is really amazing...
My concern was using pin 15 for something else would futz up the serial connection to the H-bridge, and since the array weighs over a ton, I'd prefer to not let it start spinning randomly around, as one could imagine.

Have you used all of the analog pins ?

If setting pin 15 as input or output (I don't know if that works), then the RX might get triggered and the Serial interrupt will read the pin as if it is RX data. It does not influence the TX output, but the interrupt puts extra stress on the whole Arduino board.

There is a limit for the ATmega2560 for the maximum current through the GND pins. It is not allowed to connect too many leds to it. What about a I2C I/O expander, or a ledstrip.

Can you give us a full list of what is connected to your Mega board ?

UKHeliBob:
Have you used all of the analog pins ?

Yes.

Koepel:
If setting pin 15 as input or output (I don't know if that works), then the RX might get triggered and the Serial interrupt will read the pin as if it is RX data. It does not influence the TX output, but the interrupt puts extra stress on the whole Arduino board.

There is a limit for the ATmega2560 for the maximum current through the GND pins. It is not allowed to connect too many leds to it. What about a I2C I/O expander, or a ledstrip.

Can you give us a full list of what is connected to your Mega board ?

At most, only 2 LEDs are lit at a time, and they are connected to a 1K resistor, so LED drain isn't too much. The total current sunk on the ground pins is less than 50 milliamps at maximum.
It would appear that trying to use 15 for other tasks would either not work at all, or worse, work erratically, playing hob unexpectedly with a sketch that runs well otherwise, ergo; not worth it. I'll leave it be.
Thank you everyone!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.