My group is given a project namely Heat Beat Monitoring System. We need to come out finger clip sensor that connect to PIC and then connect to PC using USB. Currently, my group has set up the finger clip sensor in breadboard, PIC is loaded with bootloader and Window Forms have been designed using Visual Studio 2008 in C++ language. Now I am facing problem how to calculate the heart rate in PIC using MPLAB in C language. May I know how do determine the output from sensor to PIC is in what form? And in MPLAB, how do i write the coding to calculate the heart beat? Hereby attach my circuit. There is some error on the PIC connection so kindly ignore it. Thank you so much.