Rikard Bosnjakovic wrote: > To be on the safe side, I checked the datasheet for the chip in > question and turned off the comparator mode. But something must be > wrong, because these two > > movlw b'11111000' > movwf TRISA > > Yields "00111000" in TRISA. RP0 is set and RP1 is cleared before > setting TRISA. Perhaps I should find a more decent beginner book than > "The quintessial PIC microcontroller" that I'm using. :-) I have this in my 16F628: movlw 00000111b ; comparatori OFF movwf CMCON clrf TRISA ; TUTTE output (non uso MCLR, ma reset interno) Just be sure BANKING is correct, maybe you can use BANKSEL macros if you're just starting out with PICs :) -- Ciao, Dario -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist