Originally Posted by
tazntex
Good Morning to All,
I was wondering if I declared a variable such as, train var byte, then I had another variable, car var byte, in which if there was a car car.0[0] =1 and I wanted to send to portb the bits in train 1,2,3,4,5,6,7 to make portb pins 1-7 high or low depending on how the bits are set in train but I wanted portb.0 to be high or low depending on the value of car. In this way I could have portb pin 0 showing a car is there and portb pins 1-7 providing high or low outputs to control other things. How could I do this together? The Pic I am using is a 16f628a.