Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/29/05 06:20
Read: times


 
#106138 - PCA extension
I am trying to capture a variable frequency signal by measuring the period with the input capture.

The frequency range extends beyond the 16 bit capture range, and I am trying to extend the PCA range in software to handle the low frequencies.

What happens is that when captures occur very near the PCA rollover point, there are errors in the period due to the improper handling of the CF and PCA extension relative to the captured value.

I thought I had an elegant solution, but it doesn't work. I was checking if the MSB of the capture was greater than CH, and if so this indicates that a rollover happened after the capture but before I could service the ISR. Then, depending on if CF was set, handle the math to fix it......

But.... its not working correctly. I can't seem to find any resource or document that addresses this, and was hoping you guys might have a hint.

The CPU is a Philips P89C51RB2BA running at 18.432 mhz

Thanks guys!!!

Bob

List of 16 messages in thread
TopicAuthorDate
PCA extension            01/01/70 00:00      
   is this what you mean            01/01/70 00:00      
   a major boo-boo            01/01/70 00:00      
      Still trying.            01/01/70 00:00      
         Use Tags            01/01/70 00:00      
            tags?            01/01/70 00:00      
               Look Below            01/01/70 00:00      
         that will make it erratic any time            01/01/70 00:00      
            Is there any way.....?            01/01/70 00:00      
               everything depends            01/01/70 00:00      
                  Hm, sounding like there is no clean fix            01/01/70 00:00      
         Hold flags            01/01/70 00:00      
            I fixed it, sort of......            01/01/70 00:00      
   Compiler            01/01/70 00:00      
      should not be t he problem            01/01/70 00:00      
   sketching an idea            01/01/70 00:00      

Back to Subject List