ADRESH and ADRESL are in bank0 and bank1 respectively. May be you try to read registers without bank switching. Vlad ---------- > Nr: Vasile Surducan > Jnls: PICLIST@MITVMA.MIT.EDU > Rel`: AD result problems > D`r`: 13 h~m 2000 c. 14:15 > > Hi, > I'm trying to read the 10 bites result of conversion ( AN0 ) on 877 > without using interrupts. Accordingly to documentation the following > sequence must be programmed: > > configure ADCON1 = 10001110 ( right justified, Ra0 input, all other > digital IO pins ) > configure ADCON0 = 01000001 (fosc/8, channel0, AD operating ) > set Go/done bit > wait for ad conversion to complete > read result register pairs: ADRESH & ADRESL > > My problem: the contents of ADRESH is the same with ADRESL ( > LSB 8 bites for right justified or first MSB 2 bites for left justified ) > How to read correctly all 10 bites ? > > Thank's > > > ********************************************* > Surducan Vasile, engineer > mail: vasile@l30.itim-cj.ro > URL: http://www.geocities.com/vsurducan > ********************************************* __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com