One of the address pins must be sent through an inverter gate to specify which chip is being addressed. Because the address lines are shared with the LCD, neither the 74HC251 or LCD can be accessed at interrupt time. Only a single pin can be read at a time. All inputs are read and debounced in software and stored globally. This eliminates the complexity of reading bits in various locations of the source code.
Routines can register to be called whenever a debounced bit changes state.
The dipswitch, pushbuttons, and infrared logic detectors all are connected to these inputs. Opening attack pattern bit 2 Unused Unused ON reduces timer for preprogrammed patterns. Bugdozer doesn't have wheel encoders, so timers are used to determine how long a particular movement should last. ON forces all LEDs on. ON initiates immediate attack mode from reset or cold-start.