variable to equal low 4 bits of portB, and OUTPUT b4-b7
i am putting a 4 bit binary number to portB on a 16f88. there are 8 bits on portB, and this is what i have:
____________________
keyvalue var byte
keyvalue = PORTB
____________________
now, i want to be able to use b.4-b.7, and not make my code just a ton of if statements. i could do "if (portb.1 == 1 && portb.2 == 1 &&..........." etc, but that is kinda a lot for 9 numbers (i only need values of 1 through 9).
basically, i want to have the high 4 bits of portB to be OUTPUTS.