Quentin, thanks for the input. > Welcome to the wonder world of PIC's! > I notice you Tris all the unused pins as inputs, did you connect them to > ground? > If not, Tris all your unused pins as outputs, and do not tie them to > ground. With the PICDEM, it appears all pins are used - portb to LED's and porta to switches and pots. I checked them and they're running low - about .6v when the circuit is hot. > There is an ongoing discussion about whether to make unused pins as > inputs and tie them to ground, or tris the pins as outputs and just let > them float. Find out what works best for you. It's amazing just how many opinions there are out there! > Also, your input pin for the switch, did you use a pull up resistor to > keep the input pin high when the switch is not made? The PICDEM has it tied to a 4.7k pullup and to Vdd. > The rest of your code is fine. You can make the code a whole lot > shorter, but as you are still learning, I am not going to tell you, > figure it out yourself. Tip: PortA and PortB are also registers. The reason I'm snooping out this method is that I eventually will have the switch's status in EPROM to retain the state if I lose power beyond the brownout protection. In other words, if I have a disorderly shut down, I'd like the switches to remember where they were. If it's a "proper" shut down, the status will be cleared - I realize that this is probably easier to say than do. As for the shorter part, I'll label that as a "duh!" - I'm used to higher-level languages and this assembly stuff is a bit more of a challenge. In addition, I find myself crying for a monitor where I can fire off some "print" statements once and a while. Oh well, one person's monitor is another person's scope and DMM. -DO -DO