Itsy Bitsy M4 and inverted UART

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Mandel
 
Posts: 11
Joined: Wed Oct 26, 2022 10:25 am

Itsy Bitsy M4 and inverted UART

Post by Mandel »

I have a small project where I need an inverted UART signal and I wanted to solve it with my new Itsy Bitsy M4. I read that it should be possible to invert both RX and TX. I have found that this requires setting bit 10 (RXINV) of the CTRLA register to 1 and bit 9 (TXINV) of the CTRLA register to 1 as well.

Sounds easy, but I have no idea how to do it. I have never dealt with registers. After googling for a while I'm a bit desperate.

Does anyone have any experience with inverted UART on a SAMD51 or know how to change the CTRLA register?

Thanks a lot!

User avatar
blnkjns
 
Posts: 963
Joined: Fri Oct 02, 2020 3:33 am

Re: Itsy Bitsy M4 and inverted UART

Post by blnkjns »

Not totally sure, but I believe this happens if you enable the pull-up resistor.
What happens if you use

Code: Select all

pinMode(0,INPUT_PULLUP);
pinMode(1,INPUT_PULLUP);

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Itsy Bitsy M4 and inverted UART

Post by adafruit_support_mike »

Mandel wrote: Wed Oct 26, 2022 10:28 am Does anyone have any experience with inverted UART on a SAMD51 or know how to change the CTRLA register?
Unfortunately, poking around in the SERCOM settings doesn't have an easy option. Too many things are interconnected, and rely on a large chunk of background information.

You can sidestep the problem in hardware by running the TX and RX signals through an inverter like the 74acht14:

https://www.adafruit.com/product/3877

Locked
Please be positive and constructive with your questions and comments.

Return to “Itsy Bitsy Boards”