obscure in baud rate

i have choosen my baud rate for transmitting as well as receiving as 300(i mean 300bits=37 bytes/sec)

if i have serial read of 37 character/bytes and serial print of the same 37 character/bytes.

to complete the work does it take two seconds or one second.its silly question just confirming

First of all serial transmission needs to send extra start and stop bits. A good assumption is that an 8-bit byte needs 10 bits so @ 300baud you would get about 30 bytes per second.

If you receive 30 bytes and then send those back it will take twice as long as if you just received the data without re-transmitting. There will also be a short time interval (measured in microseconds probably) while the Arduino figures out what to do after it receives the data.

...R

Just tried but the UNO (1.5.4) does not handle 300 baud well (win7/64 IDE & putty)
1200 baud is OK ..

If you are using the hardware UART of the avr, then transmission and reception can overlap, and 30 bytes will take about one second to receive And transmit, total.

It will have to be programmed to overlap.

If the Arduino waits for the full message to be received before starting to re-transmit the total time will be double the receive time.

...R

thanks for all of your help

@westfw
in most arduino we uart communication for communication between chip and comp.

hen transmission and reception can overlap, and 30 bytes will take about one second to receive And transmit, total.

transmission occur after all bytes get receive then how you sure about that both occurs at 1 second.could you detail it

how you sure about that both occurs at 1 second.could you detail it

The obvious example is 'echoing.'
If your arduino reads characters as part of some program, and echos them at the same time:

void readline()  // Read a line of text into a buffer, with echoing.
{
  while (buf < BUFLEN-1) {
    c = Serial.read();
    if (c < 0) continue;  // no character there
    Serial.write(c);
    if (c == '\n') break;  // end of line; do something with it
    *buf++ = c;   // save character in buffer.
    *buf = 0; // keep null terminated
  }
}

The after you send it 30 characters, it will already have sent (echoed) 29 characters back.
Protocols that want to maximize communications efficiency will do various things to try to ensure that data communications can proceed in both direction simultaneously, and that the sender of data doesn't need to pause to wait for a response from the receiver. TCP, LAPB, and ZModem using something called "windowing", which is pretty common. Of course, if you need a response, then you need a response and have to wait for it. Xmodem (preceding Zmodem), would transmit one block of 128 bytes, and wait for a single-character response, which was slower...