This is the winner:I've tried both in MPLAB SIM butCode:portb = (portb & %00011111 ) | ( ( i rev 3 ) << 5 ) portc = (portc & %10111111 ) | ( i.3 << 6 )
doesn't mask the port right.Code:portc = (portc & %10111111 ) | ( i << 3 )
THANK YOU. Problem solved
Bookmarks