Full tutorial on how to control the Arduino UNO ports using register. Port register manipulation. Set pins as output/input DDRD, set pin to high or low PORTD, or read inputs with the PIN register.