80 likes | 93 Views
Basic Counters: Part I. Section 7-6 (pp. 353-366). Definition. Counter is a register that goes through a sequence of states as it is clocked Binary counter Counts through a binary sequence Example: 2 bit “up” counter; a circuit with 2 FFs that goes through the sequence of states:
E N D
Basic Counters: Part I Section 7-6 (pp. 353-366)
Definition • Counter is a register that goes through a sequence of states as it is clocked • Binary counter • Counts through a binary sequence • Example: 2 bit “up” counter; a circuit with 2 FFs that goes through the sequence of states: (00 , 01, 10, 11)2 = (0, 1, 2, 3)10 • n bit “up” counter counts from 0 to 2n – 1 • n bit “down” counter counts from 2n – 1 to 0
Waveforms of a 2 bit Counter Counter CP A B 0 1 0 1 2 3
Synchronous Counters • Clock inputs of all FFs receive a common clock pulse • Change in state is determined from the present state of the counter
Synchronous Counter • Count enable, EN = 0 • counter remains in the same state • Count enable, EN = 1 • counter counts up • Carry output, CO used to expand counter (e.g. to 8 bits)
Arbitrary Count • Counter goes through an arbitrary sequence • Example: States 3 and 7 are not used
State Diagram of Example Arbitrary Counter • Analysis of state diagram shows: • if circuit ever goes in an unused sate (011 or 111) the next clock transfers it to a valid state