jpeakall
- 12th May 2005, 17:43
Hi All,
A brief outline of what I am working on:
The PIC will recieve a signal using the onboard comparators. I loop and look for the state of the comparator until it hits. Timer 1 is running and uses the intterupt for a timeout if the signal is not recieved.
Now what I want to do is use the ADC right after the comparator hits and measure the voltage on a cap to determine signal strength (its a 40kHz ultrasonic signal, amplified by an op amp and fed into the comparators) so as to position my sensor in the best location.
From reading the spec sheets and browsing the archive on the 'F88, I gather that there are issues using both the adc and the comparators at the same time. Before I pound my head silly, I thought I'd run it past y'all and see if this is what I should do:
init the comps
wait for signal
disable the comps
enable the adc
get the signal
Or, is it possible to have to comps turned on and the the adc turned on, using only of course the channels not used by the comps?
As always, thanks!
Jonathan
A brief outline of what I am working on:
The PIC will recieve a signal using the onboard comparators. I loop and look for the state of the comparator until it hits. Timer 1 is running and uses the intterupt for a timeout if the signal is not recieved.
Now what I want to do is use the ADC right after the comparator hits and measure the voltage on a cap to determine signal strength (its a 40kHz ultrasonic signal, amplified by an op amp and fed into the comparators) so as to position my sensor in the best location.
From reading the spec sheets and browsing the archive on the 'F88, I gather that there are issues using both the adc and the comparators at the same time. Before I pound my head silly, I thought I'd run it past y'all and see if this is what I should do:
init the comps
wait for signal
disable the comps
enable the adc
get the signal
Or, is it possible to have to comps turned on and the the adc turned on, using only of course the channels not used by the comps?
As always, thanks!
Jonathan