LS7166A is a CMOS, 24-bit counter which can be programmed to operate in several functional modes. The operating modes are set up by writing configuration data into control registers (see fig 8). There are three 6-bit and one 2-bit control registers for configuring the functional modes. In addition to the control registers there is a 5-bit status register which indicates the instantaneous device status. A 24-bit preset register is available for presetting the counter. It also serves as the division factor in the mod-N count mode. The device communicates with a host controller over an 8- bit 3-state bidirectional data bus through read/write operations. In addition, a number of discrete inputs and outputs facilitate instantaneous hardware control functions and instantaneous status indication.