In SX Microcontrollers, SX/B Compiler and SX-Key Tool, veecee42 wrote: OK, as there is no such thing as a stupid question: I was thinking about building a frequency counter with an sx when I was struck by a different approach; don't know if it might work, but maybe some smart fellas here can comment.. traditionally one would use a high clock generator and generate an interrupt with the signal to be measured.. (at least, thats what I think happens).. the only example I found counts up to 15mhz so I assume the interrupt routine than needs 5 clockcycles - what seems plausible Now I was thinking out of the box: What if we use the frequency to be counted as the clock input and a 4 Mhz crystal oscilator (or other) as an interrupt generator.. and an algorithm that calculates the input clock based on the number of interrupts that have occured over a certain period of 'time' (time being relative to the input clock)? Then we could count up to 75Mhz! Accuracy would off course be limited to a function of the input clock and the interrupt clock, but still quite a performance!!!! Theoretically it seems this could work.. any thoughts? greetings, Vinnie ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=138423 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)