Wow! So simple. I played with it on paper and that works great. I did have the idea of an OR in my head, but couldn't figure out how a bit that was set to a '1' could change back to a '0'.
Actually, now that I think of it, since MyByte is only going to be zero to nine, I think I could get away with this:
Thanks!Code:PORTB = (PORTB & $F0) | MyByte
Bookmarks