I find myself thinking more carefully about how data is actually represented in a computer
Such a shame then that the Arduino helpers have managed to conceal that.
On the 8-bit AVR architecture, you can of course just assign your counter variable directly to the memory-mapped pin output register and don't have to deal with them on a per-bit basis. You can even omit the counter altogether and just use the pin output register.
3 comments
[ 6402 ms ] story [ 726 ms ] threadSuch a shame then that the Arduino helpers have managed to conceal that.
On the 8-bit AVR architecture, you can of course just assign your counter variable directly to the memory-mapped pin output register and don't have to deal with them on a per-bit basis. You can even omit the counter altogether and just use the pin output register.