# Extra UART

**URL:** <https://community.sparkfun.com/t/extra-uart/43404>\
**Category:** Education Products\
**Created:** [January 28, 2022, 2:01pm UTC](https://community.sparkfun.com/t/extra-uart/43404 "2022-01-28T14:01:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![powersoft](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/powersoft/32/7354_2.png) [@powersoft](https://community.sparkfun.com/u/powersoft)\
**Post date:** [January 28, 2022, 2:01pm UTC](https://community.sparkfun.com/t/extra-uart/43404/1 "2022-01-28T14:01:45Z")

</div>

Hello,

I have a ATSAMD21G18.

I wont to make an extra UART in processor pin 37 (TXD, SERCOM5.2) and pin 38 (RXD, SERCOM5.3) and call this material.

found this code segment, and how to change the code so it is working with SERCOM5.2 and SERCOM5.3.

Thanks for all results.

Jan

```auto
 #include "wiring_private.h" // pinPeripheral() function
//D2-TX, D3-RX
Uart mySerial (&sercom2, 3, 2, SERCOM_RX_PAD_1, UART_TX_PAD_2);
void SERCOM2_Handler()
{
  mySerial.IrqHandler();
}

void setup() {
  // put your setup code here, to run once:
  mySerial.begin(9600);

  pinPeripheral(2, PIO_SERCOM);
  pinPeripheral(3, PIO_SERCOM_ALT);

```

---

<div class="post-metadata">

**Author:** ![TS-Russell](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/ts-russell/32/6092_2.png) [@TS-Russell](https://community.sparkfun.com/u/TS-Russell)\
**Post date:** [January 28, 2022, 9:52pm UTC](https://community.sparkfun.com/t/extra-uart/43404/2 "2022-01-28T21:52:37Z")

</div>

Here’s a guide form adafruit [https://learn.adafruit.com/using-atsamd … new-serial](https://learn.adafruit.com/using-atsamd21-sercom-to-add-more-spi-i2c-serial-ports?view=all#creating-a-new-serial)
