Timer Interrupt problem Digital and Analog sampling
Posted: Tue Sep 11, 2018 8:56 am
I have posted code on this forum to allow the calculation of frequency from a square wave on a digital input . Works absolutely fine. I have also code to sample an analog based on a timer interrupt. This also works fine, giving me 750 samples for each analog, and sequencing between 4 analogs (I'm working on the 5 to 20 HZ here so quite slow)
When I combine these two programs the analog sampling works fine but the frequency does not seem to work. Output remains about 3300 HZ.
I must admit I am a little lost with the port Entry/Exit calls and have used different ones for each interrupt. if I use the same for both there isI still have the problem. Can any one shed a light on where I am going wrong
The zip file includes both programs
When I combine these two programs the analog sampling works fine but the frequency does not seem to work. Output remains about 3300 HZ.
I must admit I am a little lost with the port Entry/Exit calls and have used different ones for each interrupt. if I use the same for both there isI still have the problem. Can any one shed a light on where I am going wrong
The zip file includes both programs