Double Serial

I must control 1 Serial Servo Controller - ROB-08897 - SparkFun Electronics and 2 http://www.basicmicro.com/RoboClaw-2x30A_p_46.html with an arduino uno... Is there any way i can switch the serial lines to control each seperatley with a single serial out from the uno?

-Nick

Is there any way i can switch the serial lines to control each seperatley with a single serial out from the uno?

What do you mean by "switch the serial lines"? There is one hardware serial port that you can use to talk to one serial device. You may be able to use other pins, and SoftwareSerial, to talk to other serial devices.

SoftwareSerial only allows listening to one device at a time, but if two way communications is not needed, then there is not problem talking to several devices, one at a time.

Is there any way i can switch the serial lines to control each seperatley with a single serial out from the uno?

Probably not.

You can, however, create a software serial that mimics the hardware serial, using interrupts: you can simply load up a char / string to it and the module will send out bits / bytes by itself, and similarly for receiving.

PaulS:

Is there any way i can switch the serial lines to control each seperatley with a single serial out from the uno?

What do you mean by "switch the serial lines"?

He means having something like a MUX.

If you need fast communications to both devices, might be easier to just a uC that has 2 serial ports, such as the ATmega1284P (or one of the lower memory variants - 164, 324, 644)


Bare boards $5 sent via USPS, buy new parts or scrounge from your parts bin.
PL & schematic here
http://www.crossroadsfencing.com/BobuinoRev17/

Is there any way i can switch the serial lines to control each seperatley with a single serial out from the uno?

In theory yes, but it involves using external logic components to switch the send and receive pins to the separate serial devices and of course you would have to manage that switching with extra code in your sketch. Easier to see if you can use the software serial library or even get a board with more hardware serial UART channels like the mega boards with four, or Bob's board with two.

Lefty