1

I have a SAMD21G18A-MUT custom board, which has 6 'grove' connectors, of which two are I2C In and out (sharing the same MCU Pins) and also has 2 'special' 8 pin connectors attaching to Particulate Matter sensors that connect to :

  1. PA 14, (9, 8)[Sercom 2 alt]; PB8,PA6 [PWM], PB23

  2. PA 15,(11,10)[Sercom 0]; PB9, PA7 [PWM], PB22

which implement serial interfaces with additional control wires.

The Grove ports are :

  • ADC 0 (A0 & A1); Pins 9,10 [accessible only to SERCOM 0]
  • ADC 1 (A2 & A3); Pins 47,3 [not accessible by SERCOM]
  • GPIO D0/D1 [SERCOM4_ALT]; (used) Pins 21,22
  • UART Tx/RX [Sercom 1]. Pins 27,28
  • I2C Pins (SDA, SCL), (Pins 31,32) [SERCOM 1 PAD 0 & 1] (only one I2C port Used)
  • Debug Connector, ({ins 45,46) [SERCOM 1 PAD 2 & 3]
  • USB Pins (D+, D-, (Pins (33,34) [SERCOM 3] (Used when programming)

SERCOM 5 appears to be unused, but not accessible by either ADC Port. Do not ask me how the overloading of SERCOM 1 works...IDK

So, all but 1 Sercom ports are used up and yet I need to connect up 2 additional serial devices; a Wind sensor and a Rain Gauge.
Obviously I can connect one of them to UART Tx/Rx Sercom1; but the other one can physically connect only to one of the ADC Ports. But the only available Sercom for those pins is already used. So, I think I need to implement SoftwareSerial on (say) A0 and A1 for the second device that I need to connect.

Any thoughts on if or how this can be done ?

My only current alternative is to add a whole new MCU Board, but that brings on space and mounting considerations.

0 Answers0