Disclaimer: Other newbie trying to answer a question. I think you need to enable the pull-up resistors for portb. IIRC, the internal pull-ups are disabled when you change PORTB to output. Because you have the LED bar tied to ground and the PIC can't source any current when the output is high (if the pull-ups are disabled), the LED's will never light up. A simple test would be to turn the LED bar around and tie it to VCC instead of GND. You'll get the complement of what you're expecting. Otherwise, you can add external pull up resistorts or set an OPTION bit (I don't remember which) to enable the internal pullups. Kevin -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics