On Tue, Jun 11, 2013 at 9:09 PM, Joe Wronski w= rote: > Since the enc_tab[] only contains -1,0,+1, the only explanation I can > think of would be that you are actually getting 4x the number of > interrupts that you think you are. Have you tried setting breakpoints > in the interrupt or print_error_code() func to step through the code? > Also, what happens when the count goes over 9 or less than 0? You only > have 10 digits to print 16 possible values, and count is unsigned. Right, array returns 1, -1 or 0 only. Interrupt is fired 4 times for RBIF, PORTB change Interrupt. The display can show 0-9, so after a reset/powerup, it starts with 0. :-) I guess, I understand what's happening. Regards, Manu --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .