Hi to all,

I am trying to use a port split between 2 variables.

For example I want to load PORTC upper 4 bits with 4 bits from a variable WITHOUT altering the lower 4 bits of the port. I will also need to similarly load the lower 4 bits of the port with data from another variable again without changing the state of the upper 4 bits.

I know I could do this bit by bit but It would really make things much simpler if I could do it by loading either lower or higher in one move. Is it possible?

From the manual there is- anyvar = PORTB & $0f ‘ Isolate lower 4 bits of PORTB and place result into anyvar.

Could that be reversed?

Again baffled, Al