commit a2cb23d2cf1cffe33e4e1f91662ed748066b49a6
parent 867d50765eee2c26d7095dfcd2749ee8e50f7c62
Author: Martin Kloeckner <mjkloeckner@gmail.com>
Date: Tue, 12 Dec 2023 09:02:34 -0300
Update README.md
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
@@ -24,9 +24,9 @@ shows the difference in speed of using builtin functions and port manipulation
question](https://forum.arduino.cc/t/ddr-vs-pinmode-solved/497927/3))
```c
-pinMode(5, OUTPUT); takes 71 clock cycles (~4.43us@16Mhz)
-DDRD |= 0b00010000; takes 2 clock cycles (~0.125us@16Mhz)
-bitSet(PORTD, 5, 1); takes 2 clock cycles (~0.125us@16Mhz)
+pinMode(5, OUTPUT); // takes 71 clock cycles (~4.430us@16Mhz)
+DDRD |= 0b00010000; // takes 2 clock cycles (~0.125us@16Mhz)
+bitSet(PORTD, 5, 1); // takes 2 clock cycles (~0.125us@16Mhz)
```
Also assigning the new value to the port allow for multiple ports to be updated