Thanks for the replay.
HenrikOlsson,
That's what i was think excatelly, but it didn't hurt to ask.
HankMcSpank,
When a key is pressed AN0 go from 0-5v depend on the key pressed(ie; if 0 is pressed 0<AN0<.5V, if 1 is pressed .6<AN0<1.0V......).
Thank you,
Any other ideas or suggestions are appreciated.
Oh, now I see.
Then what Henrik said....set a comparator to 'trip' (toggle) at anything higher than 0.4V... use that 'toggling' level to generate a comparator interrupt......do your ADC inside the comparator interrupt routine.
Which PIC are you using? You can likely use the PIC's own internal comparator & DT's CMP_int interrupt....
(http://darreltaylor.com/DT_INTS-14/intro.html )
Bookmarks