Hello all,
I am attempting to create a manual clock pulse inside of a interrupt service routine by doing:
This pulse will tell a peripheral when to activate, additionally, I need the pin to stay high for exactly 30ns, which is 18 CPU cycles at the 600MHz clock of the T4.x
Running this interrupt with an external clock of any frequency, the code enters the subroutine, writes PINx to high as expected, then when it writes it low, it does, but it acts as though the ISR is repeating as many times as it possibly can execute. Picture shows the digital logic, the green line is the trigger to enter the interrupt, and the yellow line is the logic of PINx. I want PINx to go high for 30ns, then go low again, just once inside of the ISR
Thank you,
~RRkt
I am attempting to create a manual clock pulse inside of a interrupt service routine by doing:
Code:
attachInterrupt(digitalPinToInterrupt(InterruptPin), ISR, RISING);
void ISR(){
digitalWrite(PINx, HIGH);
digitalWrite(PINx, LOW);
}
This pulse will tell a peripheral when to activate, additionally, I need the pin to stay high for exactly 30ns, which is 18 CPU cycles at the 600MHz clock of the T4.x
Running this interrupt with an external clock of any frequency, the code enters the subroutine, writes PINx to high as expected, then when it writes it low, it does, but it acts as though the ISR is repeating as many times as it possibly can execute. Picture shows the digital logic, the green line is the trigger to enter the interrupt, and the yellow line is the logic of PINx. I want PINx to go high for 30ns, then go low again, just once inside of the ISR
Thank you,
~RRkt