I am having difficulty writing to D10 to D13 on a MEGA. I can write to pins D7-D9 and D13-D15, but not pins D10-D13 using the following code.
pinMode(7, OUTPUT); // OK
digitalWrite(7, HIGH);
pinMode(8, OUTPUT); // OK
digitalWrite(8, HIGH);
pinMode(9, OUTPUT); // OK
digitalWrite(9, HIGH);
pinMode(10, OUTPUT); // Fail
digitalWrite(10, HIGH);
pinMode(11, OUTPUT); // Fail
digitalWrite(11, HIGH);
pinMode(12, OUTPUT); // Fail
digitalWrite(12, HIGH);
pinMode(13, OUTPUT); // Fail
digitalWrite(13, HIGH);
pinMode(14, OUTPUT); // OK
digitalWrite(14, HIGH);
pinMode(15, OUTPUT); // OK
digitalWrite(15, HIGH);
pinMode(16, OUTPUT); // OK
digitalWrite(16, HIGH);
I have tried using the noInterrupts() statement, but that does not solve my problem.
I know that I am doing something dump. Any suggestions?
Hoyt