Turn off the comparators as there are inputs pin to these also on PORTB. Add the 2 lines..... movlw 0x07 movwf CMCON to your source code. That should make it work. Regards, Jim -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of jana1972@centrum.cz Sent: Saturday, November 05, 2011 11:02 AM To: piclist@mit.edu Subject: [PIC] Is this correct code? I learn programming in assembly language. Can anyone let me know if the following program will open RA2 port as outpu= t and there will=20 be voltage on that port RA2? Thanks #include "P16F628A.INC" ; Include header file=20 __CONFIG _INTOSC_OSC_NOCLKOUT org 0 bsf STATUS,RP0 ;bank1 BCF TRISA,2 bcf STATUS,RP0 ;bank0 BSF PORTA,2 END I expect _INTOSC_OSC_NOCLKOUT will cause PIC16F628A to use internal oscilator, so=20 that no external crystal is not needed Thanks L. --=20 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 .