Rolf wrote: > Good point. All writes to PORTx are written to the latch anyway, so clrf= =20 > PORTx is identical to clrf LATx > > The port pin diagrams indicate that fact as well. > > Further, all analog pins read as '0', all digital pins read the state of= =20 > the signal (which for outputs may be a mis-match to the LATx value if=20 > you have slow-changing signal lines...). > > But, in all cases, clrf PORTx =3D=3D clrf LATx > > On the other hand, it's not an error to do it twice... and further,=20 > operations other than 'clrf' on PORTx will/may produce a different=20 > result than the same operation on LATx... so perhaps it is good practice= =20 > to treat them 'both' explicitly in the initialization routine... > =20 Sorry, you're confusing me now! How would MOVWF PORTx and MOVWF LATx=20 ever end in a different result? David... --=20 ___________________________________________ David Duffy Audio Visual Devices P/L Unit 8, 10 Hook St, Capalaba 4157 Australia Ph: +61 7 38235717 Fax: +61 7 38234717 Our Web Site: www.audiovisualdevices.com.au ___________________________________________ --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .