Paul Curtis Bennett wrote: > > > > > > > > > > > ;FIRST initialize porta as inputs & portb as outputs. > > > > LOOP > > > > BTFSS PORTA,0 ; if portb bit zero is high skip next > > > instruction > > > > GOTO BUTTON_1 ; jump directly to the instruction after > the > > > label > > > > BUTTON_1 > > > > BTFSS PORTA,1 ; if portb bit one is high skip next > > > instruction > > > > GOTO BUTTON_2 ; jump directly to the instruction after > the > > > label > > > > BUTTON_2 > > > > ;repeat as necessary..... > > > > GOTO LOOP ; back around again > > > Tony replied Wow this looks so much different than it did when I sent it > > out What happened to my formatting ? Oh yeah and my code such as it is > > is not meant to initialize the ports but to manipulate them afterwards I > > as I said assumed the port initializationbuisness had been conquered. ;) > > Oops! Sorry! I apparently misunderstood what you were trying to do... > > However, I think that you should still read the Port as one word/byte > whatever, and then you can write the state of the port to the output, > instead of doing it bit by bit. > > (But then again, this is coming from someone who just smoked his > 16c84 -- Important tip: Vdd and Vss are NOT interchangeable... ;) > > Paul Bennett > pbennett@kilby.elee.calpoly.edu > > "And therefore as a stranger give it welcome, there are more things in > Heaven and earth, Horatio, than are dreamt of in your philosophy..." > -- Hamlet, Act 1, Scene 5 Been there Learned to use sockets Was cheaper I'm curious as to your reasoning, If you read the port as a whole would you not still need to determine the state of the individual bit in question.And since the port register can be manipulated like the other registers where is the benefit in moving the values elsewhere?I mean in this particular application of course. Tony M.