Stefan, Check the left/right justification of the result as set by ADCON1, bit 7. If you plan to use all 10 bits of the result, then your result should be right-justified so set this bit. Your conversion result will be in ADRESH:ADRESL as follows: 000000xx:xxxxxxxx where '0' are the leading zeros in front of the result and 'x' represents the conversion result. But be careful with ADRESL; the low byte of the result. It is in Bank1 so you need to change STATUS, RP0 to access it. Andrew akieran_at_ureach.com ________________________________________________ Get your own "800" number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag ---- On , dimov stefan (stefan_d6@YAHOO.COM) wrote: > I've tried to measure DC and display the corresponding > number from the ADC on a LCD .I used pic16F877. For > initiation of the ADC I used AN546. > But when I'm changing the voltage gradually from 0V > to 5V the LCD shows only four values respectivly : 0, > 257, 514, 771. > Where is the culprit? > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail Address AutoComplete - You start. We finish. > http://promotions.yahoo.com/new_mail > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body