+ byte input = ( INPUT_SIG_PORTB & ~ PINB ) | ( ( INPUT_SIG_PORTC & ~ PINC ) <<1 ) |( INPUT_SIG_PORTD & ~ PIND );
+ byte output = ( OUTPUT_SIG_PORTC & ~ PINC ) | (( OUTPUT_SIG_PORTD & ~ PIND ) <<2 ); // no output on B
+
+ if (!input)
+ return;
+ if (last_input==input && last_output==output)
+ return;
+ last_input=input;
+ last_output=output;
+ Serial.print(output,HEX);
+ Serial.print('\t');
+ Serial.println(input,HEX);