What is port manipulation in Arduino?
Arduino port manipulation is the act of direct register access to control IO ports. For each IO port, there are 3 registers that control its operation (DDRx, PORTx, and PINx), where x can be (B, C, or D). Using direct register access, we can read or write Arduino pins in a much faster way than using standard digitalWrite and digitalRead functions. It's a little bit risky if not carefully implemented but can provide a huge boost in speed (if needed).