I have got out a 16F877 and started playing with it's analog inputs whilst I am waiting on an answer to an external ADC like a 548 etc. I have been looking around for code to study on reading an input as an analog. I came up with this. DEFINE ADC_BITS 10 'Its a 10 bit pic DEFINE ADC_SAMPLEUS 50 'Sample time TRISA = 255 'Sets all port a to input A0 VAR WORD High PORTB.7 Pause 500 ADCON1 = 2 Loop: ADCIN 0,A0 SerOut PORTB.6,4,["start",#A0,"stop"] Toggle PORTB.7 Pause 50 GoTo loop I have an output of a 535 hooked up to A0. My question? Is there anything wrong with the above method? Will it be accurate? I have seen another method using binary to set up conditions etc like clock rate etc etc . Why should I do it different etc. All comments welcome. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body