I need to use more than 1 UART on Atmega328. Hence, I will be using either NewSoftSerial or AltSoftSerial. May I know if there are any restrictions on the kinds of baud rates for these software UARTs? Any recommended baud rates?
The AltSoftSerial claims it can do 57600 baud.
The SoftwareSerial claims it can do up to 115200 baud.
But has a major disadvantage: If using multiple software serial ports, only one can receive data at a time.
For a single serial port, use the SoftwareSerial. It is a well working library.
What is it for ? Do you need a higher baudrate than the common 9600 baud ?
With higher baudrates, the other device must have a precise clock with a X-tal.
Also keep in mind that AltSoftSerial is linked to specific pins (8 and 9 IIRC), while SoftwareSerial allows you to use any pins other than the hardware serial pins (0 and 1).
NewSoftSerial is for 0023 and earlier versions, which are now obsolete.
Erdin:
The AltSoftSerial claims it can do 57600 baud.
The SoftwareSerial claims it can do up to 115200 baud.
But has a major disadvantage: If using multiple software serial ports, only one can receive data at a time.
For a single serial port, use the SoftwareSerial. It is a well working library.
What is it for ? Do you need a higher baudrate than the common 9600 baud ?
With higher baudrates, the other device must have a precise clock with a X-tal.
Thanks for the reply. I know when using internal oscillator, the hardware UART cannot use higher baud rates. Does this also apply for SoftwareSerial? If you don't mind, another question is whether the baud rate chosen for the SoftwareSerial independent of the baud rate for hardware UART.
Note that the hardware serial (tested UNO only) can do higher baud rates than 115200 . success with 230400, 345600 and 500000 baud but not with the IDE of course which only supports up to 115K2