Enter a reference of 80 (4 * 20) and you will get full scale readding if 19.9 something. What uou get now is full sacle reading of 20/4 or 5 volts. or 4.9 something. Bill ----- Original Message ----- From: "Chetan Bhargava" To: "Microcontroller discussion list - Public." Sent: Sunday, January 15, 2006 10:59 PM Subject: Re: [PIC] ADC code generator > In my las email I wrote that I mov adres to adlow. Please disregard that. > I mov 0xff to adlow to see if I get full scale reading or not. I even > tried moving 0x03 to adhigh (to see if I get full scale reading) but I > get the same result! > > > On 1/15/06, Chetan Bhargava wrote: >> I generated code for the full scale reading of 20 >> >> As my adc is 8 bit so I clear out ADHIGH and mov ADRES to ADLOW. >> >> What I get in CVD00 - CVD05 is 049810 Is this what should I get? >> >> >> >> ;we are trying the new sub from piclist CVDEC >> movlw 0xff >> movwf ADLOW >> clrf ADHIGH >> call CVDEC >> >> movf CVD03,w >> movwf hundreds >> movf CVD04,w >> movwf tens >> movf CVD05,w >> movwf units >> call display ; display 3 digits >> >> >> >> On 1/15/06, James Newton, Host wrote: >> >> > CVD00 is the most significant digit or MSD of the result. Please note >> > that >> > we JUST put that up the other day so I'm not totally sure it is >> > correct. >> >> -- >> Chetan Bhargava >> Web: http://www.bhargavaz.net >> Blog: http://microz.blogspot.com >> > > > -- > Chetan Bhargava > Web: http://www.bhargavaz.net > Blog: http://microz.blogspot.com > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist