>> Hi Rik, maybe you need to configure it as Digital (as opposed to analog, >> which is the default.) > >Could you hint me of how to do this? I'm not yet very proficient in using >MPLAB. > >To be on the safe side, I checked the datasheet for the chip in >question and turned off the comparator mode. Well, that should have done it, but you don't say what chip you are using, or precisely what instructions you used to do this. >But something must be wrong, because these two > > movlw b'11111000' > movwf TRISA > >Yields "00111000" in TRISA. How many bits are there in PORT A? That sounds like there are only 6 bits (RA0 to RA5) and so the top two bits are not used. Again, you don't say what chip you are using. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist