encoder with interrupts