Hi all,
I know that only pins that support change interrupts can be used from NewSoftSerial, but for very several problems I cannot change them. I want to know if is it possible to use the NewSoftSerial, changing something, with that pins?
Thx,
it Is hardware: it is a shield for Arduino the uses the pin 2 and 3 on Arduino 2009 for the soft serial. Now I want to use it on a Mega (for many reason for example: to have more RAM) but I read that softserial can’t be used on that pin but I want to be sure for what I read and maybe if there is some trick (maybe hard at low level) to use that pins with softserial. I prefer this istead of rebuild the entire shield.
Thanks,
I prefer this istead of rebuild the entire shield.
Just run a jumper from pins 2 and 3 to the RX1/TX1 pair on the Mega, and use Serial1 instead of a NewSoftSerial instance.
There is a version of NewSoftSerial floating around that works on some pins on the Mega. I don't remember which pins it does and does not work with. But two wires to the hardware serial port is much easier.
Note: Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69
The only pins in common between the UNO and the Mega that NewSoftSerial 11 is compatible with are 10 to 13, which are the SPI pins. I really wouldn’t recommend reserving any of them for your shield.
Oh thanks to everybody, the problem of jumpers is that this is a product that is already in production phase (hundreds items) so it could be a problem. I try with all my forces to resolve this by software so it can be transparent to the user.
PaulS:
There is a version of NewSoftSerial floating around that works on some pins on the Mega. I don't remember which pins it does and does not work with. But two wires to the hardware serial port is much easier.
This can be a very important thing. Maybe I can ask direct to the newsoftserial developers :) Thanks I'll post their reply.
Marco