>Does anyone know how to do a simple command like subwf for the 10 bit a/d >converter. I'm trying to set an led from an analog signal (ADRESH,ADRESL) >and a 10 bit set point value but I can't seem to find anything on the web You really don't need the resolution of a 10-bit result for this purpose. Left justify the result and take the upper byte only. This is the same as using a regular 8-bit A/D. Why do subtraction if you just want to match up a set point? Just XOR the setpoint bytes with the ADRES: movlw SetPointHI xorwf ADRESH btfss STATUS, Z goto No_Match movlw SetPointLO xorwf ADRESL btfss STATUS, Z goto No_Match . (otherwise, set point == ADRES) . No_Match . . . --Andrew _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body