Hi, Piombazzo

What about

....

Portd = Portd | %00000110

PAUSEUS 15 000 ( or a variable ...)

Portd = Portd & %11111001

....

Just an idea for perfect sync.

Alain