I have never used a 10F part before but looking at the datasheet that has got to be the easiest ADC there is to run. No Clock source selection, no left/right justification, no sample time configuration, nothing, three lines of code pretty much.Of course, not having used one before, may mean I'm missing something but it really looks like there's nothing more to in than that. If you can setup the CCP module manually you can figure out how to operate this ADC :-)Code:GO_DONE VAR ADCON0.1 ' Alias to GO/DONE bit for ADC ADCON0 = %01000001 ' GPIO 0 = Analog, Channel 0 connected to ADC, ADC Enabled GO_DONE = 1 ' Start the conversion WHILE GO_DONE : WEND ' Wait for it to complete. ' Result is now availabe in ADRES.
/Henrik.




Bookmarks