movf ADCON0,W ; get current value addlw B'00001000' ; point to next channel andlw B'00111000' ; extract only channel bits iorwf B'xx000101' ; setup ADCS bits and GO bit movwf ADCON0 ; start the conversion Bob Ammerman RAm Systems ----- Original Message ----- From: "Nick Stedman" > Hi, > I'd like to cycle through the 8 A/D Channels on a 16f877a, read each channel > and store the results in separate variables. The channel select bits are 5-3 > of the ADCON0 register. So far I've come up with: > > bcf/bsf ADCON0, 3 > bcf/bsf ADCON0, 4 > bcf/bsf ADCON0, 5 > > and using a different combo of bcf/bsf for each channel. It doesn't seem > very efficient though. Am I missing something? Any help would be > appreciated. > Nick -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body