Arduino Uno R4 - Register equivalent to PIN & PORT

Hi, I'm considering changing from a Atmega328P based Arduino to the Arduino Uno R4 on a project where I'm using the PIN register instead of the digitalRead() function.

I was wondering if there is a register equivalent to the PIN & PORT register on the RA4M1 chip or does it work completly different?

Yes, but they are different. I have my own version of digitalWriteFast and the like...
It is up at: UNOR4-stuff/libraries/UNOR4_digitalWriteFast at main · KurtE/UNOR4-stuff · GitHub

Also the pins may not be grouped in the similar ports as is in the previous UNOs

If you look at their pinout (from product documentation page)
ABX00080-full-pinout.pdf
You will see images like:
Note I clipped the image:

On this page you see that the pin D0/RX and the number P301 - this tells you that this pin
is on Pin 1 on Port 3, likewise D1, P302 pin 2 on Port 3
D2 - P104 or pin 4 on Port 1
...

2 Likes

@KurtE

FYI, used your code here