I will say this again as my last post got lost somewhere.. The TRISA register is used to set the port pins to either input or output. They are often set to input on power up, so you have to make sure you change them if you want to use the pins as outputs. Sometimes the pins will be used as analog pins also, mostly on PORTA I think, so you must also clear the ANSEL register sometimes (for the PIC16F, may have other names on other PICs) Which PIC are you using? For instance TRISA = 0xFF set all pins to input. TRISA = 0xF0 sets pins 0-3 as output, and 4-7 as input. TRISB controls PORTB etc etc. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist