Page 1 of 1

MX016 - Measuring Time with Interrupts

Posted: Fri May 01, 2009 11:51 am
by Benj
Article: http://www.matrixmultimedia.com/resourc ... php?id=380

If you have any questions for the author or comments on the article, please post them below.

Re: MX016 - Measuring Time with Interrupts

Posted: Thu Aug 14, 2014 11:22 pm
by WvdBerg
Good evening

Quick question, would it be possible to measure two different pins with this routine? Say RA0 & RA1?

Been trying to measure the frequency of two separate signals but either getting the first port read or just plain junk returned.

Ordered a HP299 ( In-Circuit-Debugger) but have to wait a couple of days before it gets here, then i can debug the problem.

So i was hoping i could twist somebody's arm in the meantime for some help.

On a side note, big-up with flowcode, finding it to be a valuable development tool, cut the RnD time on projects down drastically. Looking forward to getting into it even more :P

Re: MX016 - Measuring Time with Interrupts

Posted: Fri Aug 15, 2014 2:42 pm
by Benj
Hello,

Yes this should be possible but the program would need to be changed a bit to allow for two simultaneous counters.

I've had a quick go at creating an example but this is untested so not 100% sure it will work.
Freq_Counter.fcf
(20.44 KiB) Downloaded 911 times
Let me know how you get on.

Re: MX016 - Measuring Time with Interrupts

Posted: Fri Aug 15, 2014 2:56 pm
by WvdBerg
Hey,

Simulation looks solid, and already can see where my problem was. So I'm sure I'll get it going now.

Will test this over the weekend and let you know.

Thanks for the help, much appreciated