I am a hobbyist. I coded some IGBT firing program as enclosed. A very basic one.
General working is explained in it.
I have a strange observation.
The code gets stuck after Round 19.
However if you swap the next two statements in code (ref ISR routine), it work.
Round = Round + 1;
IGBTdelay = (500*Round);
I just would like to know what exactly causes the program to get stuck.
and also by swapping why it runs.
I have recently started working on Arduino and my knowledge of C++ is limited.
Seniors should be able to get me some clarification.
DemagProgram1.ino (6.78 KB)