This is a two-part question. I'm working on some bit-banging tests and have noticed that the code examples seem to toggle pins one at a time:
digitalWrite(0, HIGH);Is there a faster way of writing to the entire register, say 0b10110 which would send pins 5, 3 and 2 high?
Part 2: I'm running a basic shift register on P0-P5 right now and it works except for P2 which also pulls P0 high with it. Code is literally 6 iterations of the following:
digitalWrite(0, HIGH);
digitalWrite(1, LOW);
digitalWrite(2, LOW);
digitalWrite(3, LOW);
digitalWrite(4, LOW);
digitalWrite(5, LOW);
delay(1000);
Is there any reason that P2 and P0 go high at the same time?