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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/01/02 19:30
Read: times


 
#33522 - PCA Capture mode
Hello all,

I'm trying to do some period measurement with the PCA of a 89C51RC2 for measuring low frequency signals.
I'm using the sample source from the PCA Cookbook : period measurement

Everythings works fine and I get a very accurate reading. But it only works once.
How can I do repeated measurements?
My plan was to use a timer interrupt to enbale the PCA interrupt every 50 ms. This way I can get 20 readouts a second.

I'm testing my software now using an infinate loop which is only left on the PCA interrupt. Every time I got my second capture I disable the PCA Interrupt (IE.6 = 0), process the values and enable the PCA interrupt again.
The first readout is fine. Then the microcontroller hangs or resets. To me it seems that the PCA int isn't disabled. I've checked this in a simulator and it seems to be enabling / disabling

I have read the PCA Cookbook over and over but I can't see a way of doing the above.

I have used the PCA modules a lot for PWM etc. Never used it for Capture.

Is there anyone who can help me?

Thanks in advance













List of 3 messages in thread
TopicAuthorDate
PCA Capture mode            01/01/70 00:00      
RE: PCA Capture mode            01/01/70 00:00      
RE: PCA Capture mode            01/01/70 00:00      

Back to Subject List