You probably need to disable comparator inputs as well as ADC. Comparator inputs will read as '0', regardless of what you're outputting on the digita= l pin. I.e. pin goes high externally, but internally a port read will return a '0' on enabled analog inputs, whether they are ADC or comparator. I think you'll find that the simulator is correctly showing what a port rea= d would return. Regards, David Meiklejohn John Coppens wrote > Sent: Monday, 20 August 2012 11:09 AM > To: piclist@mit.edu > Subject: Re: [PIC] Doubt on RAx pins >=20 > On Sun, 19 Aug 2012 18:21:18 -0300 > John Coppens wrote: >=20 > processor pic16f874 >=20 > include P16F874.INC >=20 > cblock 0x20 > testvar > endc >=20 > org 0 >=20 > banksel TRISA > movlw b'00000111' ; Tried both 6 and 7 > movwf ADCON1 >=20 > movlw b'00111001' > movwf TRISA >=20 > clrf TRISB >=20 >=20 > banksel PORTA > bsf PORTA,1 ; These seem to have no effect > bsf PORTA,2 >=20 > bsf PORTB,3 ; This does work >=20 > bsf testvar,2 ; This too, of course >=20 > end > -- > http://www.piclist.com PIC/SX FAQ & list archive View/change your > membership options at http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .