Dear all,
I ordered some SAMD21 Mini Breakout DEV-13664 to test them with a shield I originally designed for the Arduino Pro Mini 8Mhz, 3.3V.
In the underlying application for which I designed the shield PCB, I needed one additional serial port.
So, when I designed the shield for the original Pro Mini, using D9 for TX and D8 for RX appeared to me being the best option because this way it is possible to use both libraries SoftwareSerial and AltSoftSerial (on the Pro Mini, AltSoftSerial is restricted to TX on D9 and RX on D8).
Now, I wanted to check my options to replace the Pro Mini by the SAMD21 Mini Breakout DEV-13664 and actually everthing should work, only the additional serial port I need on D9 and D8 appears to be problematic.
Well, I already learned that the widely used libraries for a software emulated serial (i.a. SoftwareSerial and AltSoftSerial) ara not compatible with the SAMD21 Mini Breakout DEV-13664.
In principle, however, this would not be a problem as the SAMD21G offers several SERCOMS to create additional hardware serial ports which is better anyway. But now looking a bit deeper into that I found the information that "… you cannot have TX on pad 1 or pad 3… " in a guide from Adafruit (https://learn.adafruit.com/using-atsamd … new-serial).
Now, unfortunately D9 just happens to be just pad 3 (SER0:3), wheras D8 is pad 2 (SER0:2)
https://media.digikey.com/Photos/RDL/DE … Pinout.pngYou see, the problem is that my shield is using exactly the D9 pin as TX and according to my current understanding this means that if there is no other way to get the D9 working as TX using the SAMD21G, I would have to adopt my shield’s PCB design to change that. As far as I understand, I could e.g. just swap the pins to make D9 act as RX and D8 as TX… However, doing so the drawback would then be that such redesigned new shields would then not work with the Arduino Pro Mini and the ALTSoftSerial any more… only with the Pro Mini + SoftwareSerial…
So, my question is now if there is really no possibility to use D9 as TX for a serial via SERCOM?
I mean, is this a hardware limitation of the ATSAMD21G or is this something which has to do with the Arduino libraries (i.a. variants.cpp, variants.h, sercom.h or wiring_private.h)?
If it is a software imposed limitation, how could I circumvent that?
Thank’s a lot for your suggestions and support!
Best,
Michael