This is the program I have done until now. I find a problem to detect the first sample:
Each time i have a sample avaiable, an input call IRQ will go low, and this calls the subroutine ”°INTERRUPT”± (external interrupt). Here i take the sample, procces it and add to the average-data. Ok this is fine, the problem is.. how can i detect the first sample???
I have other input call ZX, wich is high in the positive semiperiod of the voltage sample and low in the negative one, but i cant program it. I have been triying to introduce a bool variable like StartAveraging if first detect a 0, and then a 1 (this mean i have the first positive sample)
Related Codes
There are no related downloads