Andy Farrar wrote: >I have a requirement (actually a friend has) whereby output pin on >pic triggers a VCO, starts off at high frequency and eventually slows >down to DC settling on '0' or '1', is there an efficient way to >monitor this pin, preferably with software or could be hardware if >not too elaborate to say when it has settled '0' or '1', ie is no >longer clocking; once this happens we wish the PIC to go to the next >stage of program. >Many thanks in advance of any help >Andrew Farrar Andy: As was mentioned, this is very similar to debouncing a switch. Trouble is if you've never done that, its not very helpful. What I would do is read the state of your port pins, and store them. Then, in a tight loop (so as not to miss transitions), I would continually read the pins and XOR them with the stored value. If the result of the XOR is zero (no change), I would increment a counter, check for overflow/terminal count and loop if no timeout. If the XOR is nonzero, then store the value of the pins, and zero your counter. Hope this is helpful. Jim Nagy Elm Electronics ICs for Experimenters http://www.elmelectronics.com/