In my testsetup I have two arduino UNO's talking to each other by a software uart port. One is using altsoftserial, the other softserial. The hardware serials on both boards are used for something else. On the board that uses altsoftserial I need a high speed on the hardware serial(that's why softserial won't do). On the board that uses softserial I need pin 8 and 9(therefor the choice of softserial).
I did some test with both boards running altsoftserial, that works. Both running on softserial also works. Making the combination as described above doesn't. It gives some results in the serial monitor. Sending the caracter "R" comes back in the serial monitor as "R[little square]". Sending "123" comes back as "1[jitter]3[jitter]".
I have no idea why this is happening, and any help or ideas would be much appreciated!
They have a completely different way of sending out the bits (one is timer/interrupt based, the other uses noop loops for the delays), the timing almost surely differs because of that. Both never will be near the reliability of a hardware serial interface.
You haven't explained why you can't use one of the implementations on both Arduinos.
Thank you for your response.
I'm creating a rs485 network capable Arduino. On the board there are 2 atmega328p chips. One of them uses the hardware serial to communicate to the network, and uses altsoftserial/softserial to communicate to the other chip. The second chip(which is used as an uno chip and has an arduino layout) uses softserial on A6 and A7(smd chip) to talk back to the 'networkchip'. Now I would like to implement altSoftSerial as much as possible because the way it creates it pulse is more neat than softserial. Also, if i'm not mistaking, softserial interferes with timers, interrupts, millis().
The network can work on a higher baudrate if altsoftserial is used. softserial makes the hardware serial have limits.
The reason why the 2nd chip has to work as an uno is for compatibility reasons. The network consists out of max32 nodes which are all uno's who are able to talk to each other. The network chips takes care of the communications.
Also, if i'm not mistaking, softserial interferes with timers, interrupts, millis().
SoftwareSerial does interfere with interrupts (and therefore also millis()) and Altsoftserial does interfere with timers (it uses Timer1 exclusively). And Altsoftserial is fixed to pins 8 and 9 and you cannot use pin 10 as PWM. Both implementations are by far not as robust and reliable as the hardware serial.
The network can work on a higher baudrate if altsoftserial is used. softserial makes the hardware serial have limits.
That's correct, because it's disabling interrupts while sending and receiving.
But you haven't provided a reason yet why you have to use both, SoftwareSerial and Altsoftserial. And as far as I can see, you could even use hardware serial on the "UNO"-Chip.