Code: Serial.println(i); digitalWrite(clk, LOW); digitalWrite(dio, value & 0x01 ? HIGH : LOW); Serial.println("delay"); delayMicroseconds(3); Serial.println("shift"); Never reaches 'shift'.
Code: void setup() { Serial.begin(115200); delay(100); // initialize digital pin 13 as an output. pinMode(13, OUTPUT); } // the loop function runs over and over again forever void loop() { digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(13, LOW); // turn the LED off by making the voltage LOW Serial.println("A"); delayMicroseconds(3); // wait for 3 microseconds Serial.println("B"); { This is giving me no issues, but only if I start with delayMicroseconds(3000); and go down to 3. If I then load an empty sketch into the M4 and load the above sketch it fails completely.