From 60fc687752464261db3de0c414ee6a5b0e5192a2 Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 18 Apr 2024 10:22:56 -0700 Subject: [PATCH 1/3] Move information re: SoftwareSerial pins to table Previously, the information about which pins could be used with the SoftwareSerial library was documented in prose form. Although reasonable in the context of only needing to cover a few boards as was the case at the time the documentation was established, this approach does not scale as it is necessary to add information for more boards over time. For this reason, the information is migrated to a table in preparation for addition of the missing documentation for the newer boards. --- .../04.software-serial/software-serial.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/content/learn/07.built-in-libraries/04.software-serial/software-serial.md b/content/learn/07.built-in-libraries/04.software-serial/software-serial.md index c7e39c70f7..d96a8dcad8 100644 --- a/content/learn/07.built-in-libraries/04.software-serial/software-serial.md +++ b/content/learn/07.built-in-libraries/04.software-serial/software-serial.md @@ -21,13 +21,19 @@ SoftwareSerial library has the following known limitations: * It cannot transmit and receive data at the same time. * If using multiple software serial ports, only one can receive data at a time. -* Not all pins on the Mega and Mega 2560 boards support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69). -Not all pins on the Leonardo and Micro boards support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI). -* On Arduino or Genuino 101 boards the current maximum RX speed is 57600bps. -* On Arduino or Genuino 101 boards RX doesn't work on digital pin 13. +* On some boards, not all pins can be used. See the "**Supported Pins**" table below for details. +* On Arduino or Genuino 101 boards the current maximum RX speed is 57600bps. If your project requires simultaneous data flows, see Paul Stoffregen's [AltSoftSerial library](https://www.pjrc.com/teensy/td_libs_AltSoftSerial.html). +### Supported Pins + +| Board | RX | TX | +| ------------------------ | -------------------------------------------- | --- | +| 101 | 0-12, 14 (A0) - 19 (A5) | | +| Leonardo
Micro | 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI) | Any | +| Mega
Mega 2560 Rev3 | 10-15, 50-53, A8 (62)-A15 (69) | Any | + ## Examples * [SoftwareSerial example](/tutorials/communication/SoftwareSerialExample): sometimes one serial port just isn't enough! From 90d9ca4afcf40847d92f4a344dc04daf1c7d54cc Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 18 Apr 2024 10:28:10 -0700 Subject: [PATCH 2/3] Link board names to product pages in SoftwareSerial pins table Some board names (e.g., "Nano") are potentially ambiguous to the reader. This is avoided without the introduction of verbosity by linking to the specific hardware page. --- .../04.software-serial/software-serial.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/learn/07.built-in-libraries/04.software-serial/software-serial.md b/content/learn/07.built-in-libraries/04.software-serial/software-serial.md index d96a8dcad8..eb984c2384 100644 --- a/content/learn/07.built-in-libraries/04.software-serial/software-serial.md +++ b/content/learn/07.built-in-libraries/04.software-serial/software-serial.md @@ -28,11 +28,11 @@ If your project requires simultaneous data flows, see Paul Stoffregen's [AltSoft ### Supported Pins -| Board | RX | TX | -| ------------------------ | -------------------------------------------- | --- | -| 101 | 0-12, 14 (A0) - 19 (A5) | | -| Leonardo
Micro | 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI) | Any | -| Mega
Mega 2560 Rev3 | 10-15, 50-53, A8 (62)-A15 (69) | Any | +| Board | RX | TX | +| --------------------------------------------------------------------------------------------------- | -------------------------------------------- | --- | +| [101](/retired/boards/arduino-101-619/) | 0-12, 14 (A0) - 19 (A5) | | +| [Leonardo](/hardware/leonardo/)
[Micro](/hardware/micro/)
[Yún Rev2](/hardware/yun-rev2/) | 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI) | Any | +| [Mega](/retired/other/hardware-pictures/)
[Mega 2560 Rev3](/hardware/mega-2560/) | 10-15, 50-53, A8 (62)-A15 (69) | Any | ## Examples From 7b88e8630795f2c24bbae4d2531eb813cef502f3 Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 18 Apr 2024 10:30:39 -0700 Subject: [PATCH 3/3] Add all supported boards to SoftwareSerial pins table Since the time the SoftwareSerial library documentation was written, Arduino has created several new products supported by the library. The information about which pins can be used on these board must be documented. After this, the only currently active product with SoftwareSerial library support not included in the table is the Portenta C33. From the information in the library's "SerialEcho" example, it might be inferred that the same limitations as the UNO R4 boards apply to this board as well, but I was not able to verify this due to not having the hardware on hand. --- .../04.software-serial/software-serial.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/content/learn/07.built-in-libraries/04.software-serial/software-serial.md b/content/learn/07.built-in-libraries/04.software-serial/software-serial.md index eb984c2384..06e880cd0c 100644 --- a/content/learn/07.built-in-libraries/04.software-serial/software-serial.md +++ b/content/learn/07.built-in-libraries/04.software-serial/software-serial.md @@ -28,11 +28,16 @@ If your project requires simultaneous data flows, see Paul Stoffregen's [AltSoft ### Supported Pins -| Board | RX | TX | -| --------------------------------------------------------------------------------------------------- | -------------------------------------------- | --- | -| [101](/retired/boards/arduino-101-619/) | 0-12, 14 (A0) - 19 (A5) | | -| [Leonardo](/hardware/leonardo/)
[Micro](/hardware/micro/)
[Yún Rev2](/hardware/yun-rev2/) | 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI) | Any | -| [Mega](/retired/other/hardware-pictures/)
[Mega 2560 Rev3](/hardware/mega-2560/) | 10-15, 50-53, A8 (62)-A15 (69) | Any | +| Board | RX | TX | +| --------------------------------------------------------------------------------------------------- | -------------------------------------------- | --------- | +| [101](/retired/boards/arduino-101-619/) | 0-12, 14 (A0) - 19 (A5) | | +| [Leonardo](/hardware/leonardo/)
[Micro](/hardware/micro/)
[Yún Rev2](/hardware/yun-rev2/) | 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI) | Any | +| [Mega](/retired/other/hardware-pictures/)
[Mega 2560 Rev3](/hardware/mega-2560/) | 10-15, 50-53, A8 (62)-A15 (69) | Any | +| [Nano](/hardware/nano/) | 0-19 (A5) | 0-19 (A5) | +| [Nano Every](/hardware/nano-every/)
[UNO WiFi Rev2](/hardware/uno-wifi-rev2/) | Any | Any | +| [UNO R3](/hardware/uno-rev3/) | Any | Any | +| [UNO R4 Minima](/hardware/uno-r4-minima/) | 0-3, 8, 12, 13, 15 (A1)-19 (A5) | Any | +| [UNO R4 WiFi](/hardware/uno-r4-wifi/) | 0-3, 6, 8, 11, 12, 15 (A1)-19 (A5) | Any | ## Examples