
Originally Posted by
triton99
What I was wanting to know, is there a better way of reading the voltage using an ADC on the 16F675.
fwiw I've come to the conclusion that using the picbasic 'ADCIN' command = much badness (unstable ADC readings for me at least)
Nowadays, if I've a spare CCP module going free, I always use the PIC's special event trigger - it's a very tidy effiicient way of collecting ADC samples in the background - Once it's setup (it's not hard to do this), whenever you want a sample - it's already therefore you ...just go and grab the contents of ADRESH. Job done, eg...
Code:
v_in = ADRESH
'now go do cool stuff with v_in
The 16f675 has a special event trigger option ...it uses CCP4 for it, so...if you're not intending utilising CCP4, then seriously consider dedicating it to the special event trigger....
Bookmarks