Page 2 of the following document shows two pulses that I need a PIC to analyze: http://www.phoenix.tc-ieee.org/0001_Bibliography/2007-05-24%20EMB%20Presentation/2-Carl-Sensors_20070520_Phoenix%20Sensor2.ppt Basically, there are two pulses from two sensors. The systolic blood pressure we're measuring is a function of the time difference between the peaks of the two pulses. The diastolic blood pressure we're measuring is a function of the time difference between the troughs of the two pulses. I have never before used a PIC to analyze a pulse. I'm trying to think of the best way to do this. If you forced me to try something right now, here is how I would do it: 1. Use the A/D converters to obtain voltage measurements, one from pulse 1 and one from pulse 2. 2. Save these voltage measurements in variables. 3. Repeat steps 1-2 many times until data has been collected for at least a full cycle. 4. Go through the set of pulse 1 measurements and pulse 2 measurements. Use a counter to keep track. 5. Identify the variables representing the peaks and troughs. 6. Compare the timing of the peaks and troughs in the two pulses. 7. Use the timing data obtained in the previous step to calculate the blood pressure numbers. What do you think? Is this a good way, or is there a much better way? Are there examples of PIC programs that analyze pulses that I can look at? It would help me tremendously to look at examples of pulse analysis programs. -- Jason Hsu http://www.jasonhsu.com/swrwatt.html http://www.jasonhsu.com/swrwatt-c.txt http://www.jasonhsu.com/swrwatt-asm.txt -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist