> > > Mathew Cohen wrote: > > > > Q. what is the correct way to read the status of the port into a > > register. > > Hi Mathew, > > The way you have your circuit connected, sounds like your input pins are > floating. > > Connect the resistors between the port pins and +5V. Then connect one > side of the switches to the port pins and the other sides to ground. The > port pins are now held at a 5V potential, and if you read them, each one > will be at logic 1. Tony, Since the switches are connected to PortB, couldn't he just enable the internal weak pullups on PortB and connect the switches to ground. It would eliminate the external resistors. > > When you press the switch, the port pin is connected to ground, and it > will register as a logic 0 when you read it. Exactly the same thing will happen with the weak pullups enabled right? > > To read PortB > > movf PortB,w > movwf wherever BAJ