TRESADERN J.M wrote: > > Hi I was wondering if anybody has done this before or has > any ideas on how to do this. > > I have to count the number of pulses happening in a second > coming from two different devices. One of them will have a > maximum of approx. 200 pulses a second (It is a heart-rate > monitor) and the other will be approx. 15000 pulses a > second (This is from a fly-wheel sensor). > > Now this is my problem, as the two events are at such > different speeds does anybody have any idea on how to count > both of them so that I get a fairly accurate result for > each. > > The idea I had was to count the number of events for the > fly-wheel in the main-line section of code and use an > interrupt to count the heart-rate, this way I will not > hopefully lose any of the pulse for the heart-rate. > > Any help on this will be gratefully received. The Embedded Application book has an example of this. AN592. -- Neil Cherry http://home.att.net/~ncherry ncherry@worldnet.att.net