Well what I intended to do with this project was to read from a sensor that generates pulses about 3ms in duration, the peak is around 2.5V, and take a small sample from it (5 to 10 points). There is little noise from the signal, but just to make sure I have my LOIFG set to 1V and HIIFG to 3V. Once the ADC detects a voltage between those two parameters, I'll take those 5 to 10 points and store them in an array. I'm not sure how often the pulse will be generated but I assumed every 5-8 seconds just to be on the safe side, that's why I thought ISR was a good approach. I apologize if I was vague in my description. What my code does right now is monitor for a pulse with the ADC (single conversion) and toggle P2.2 when it detects said pulse. I have a red LED connected to the signal generator as well so I know the ADC is picking up at least 1.55V. The only issue is it won't take any samples from the pulse because the ISR takes some time to execute.
↧