1 Lecture: DIGITAL SYSTEMS Chapter 6: Counters and Registers Nguyen Thanh Hai, PhD University of Technical Education Faculty of Electrical & Electronic Engineering University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 2 Nguyen Thanh Hai, PhD 6.1 Asynchronous Counters 6.2 Counters With Mod Number < 2 N 6.3 IC Asynchronous Counters 6.4 Asynchronous Down Counter 6.5 Synchronous Counter 6.6 Asynchronous Down and Up/Down Counter 6.7 Shift-Register Counters 6.8 Applications University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 3 Nguyen Thanh Hai, PhD 6.1 Asynchronous Counters J K CLK 1 Q 1 Q J K CLK 2 Q 2 Q J K CLK 3 Q 3 Q J K CLK 4 Q 4 Q Clock 2 Q 1 Q 3 Q 4 Q 1 16 2 0000 0001 1111 0000 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 4 Nguyen Thanh Hai, PhD 6.2 Counters With Mod Number < 2 N J K CLK 1 Q 1 Q J K CLK 2 Q 2 Q J K CLK 3 Q 3 Q A B CLR CLR CLR - A=B=1 - The following counter sequence: 000 001 010 011 100 101 110 Q 1 Q 2 Q 3 -n bit (n FFs) can count 2n- 1 states or MOD 2n -Count less than 2n using logic gate What is asynchronous Counter? University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 5 Nguyen Thanh Hai, PhD MOD-6 counter produced by clearing a MOD-8 counter when a counter of six (110) occurs 000 001 010 011 100 101 110 6.2 Counters With Mod Number < 2 N University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 6 Nguyen Thanh Hai, PhD Example 6.1: J K CLK 1 Q 1 Q J K CLK 2 Q 2 Q J K CLK 3 Q 3 Q CLR CLR CLR J K CLK 4 Q 4 Q CLR 4 Q 3 Q 2 Q Mod-14 counter: count from 0 to 13 or 0000 to 1101 Example 6.2: Similar for Mod-10 counter, still call BCD counter University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 7 Nguyen Thanh Hai, PhD Example 6.2: Mod-10 counter, called BCD counter: 0000 - 1001 University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 8 Nguyen Thanh Hai, PhD Example 6.2: Mod-10 counter, called BCD counter: 0000 - 1001 University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 9 Nguyen Thanh Hai, PhD Example 6.2: University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 10 Nguyen Thanh Hai, PhD 6.3 IC Asynchronous Counters Implement Mod- 14 counter J K CP 1 Q 1 Q J K 2 Q 2 Q J K 3 Q 3 Q D C J K 4 Q 4 Q D C D C D C CP CPCP 0 CP 1 CP 1 Q 2 Q 3 Q 4 Q 1 MR 2 MR )(LSB )(MSB 2 MR 1 MR 0 CP 1 CP 29374 LS 1 Q 2 Q 3 Q 4 Q cc V+ )14( )11( )10( )9( )7( )8( )4( )5( )12( )13( University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 11 Nguyen Thanh Hai, PhD Mod-14 counter kHz10 0 CP 1 CP 29374 LS 1 Q 2 Q 3 Q 0 Q 2 MR 1 MR HzkHzf 71414/ 10 == 6.3 IC Asynchronous Counters University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 12 Nguyen Thanh Hai, PhD Mod-6 0 CP 1 CP 29374 LS 1 Q 2 Q 3 Q 0 Q 2 MR 1 MR 60/ inout ff = 0 CP 1 CP 29374 LS 1 Q 2 Q 3 Q 0 Q 2 MR 1 MR Mod-10 10/ in f in f Mod-60 counter 6.3 IC Asynchronous Counters University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 13 Nguyen Thanh Hai, PhD Example 6.3: Mod-60 counter University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 14 Nguyen Thanh Hai, PhD 6.4 Asynchronous Down Counter J K CLK 1 Q 1 Q J K CLK 2 Q 2 Q J K CLK 3 Q 3 Q University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 15 Nguyen Thanh Hai, PhD Clock 2 Q 1 Q 3 Q 000 Recycles 111 000 111 110 101 100 011 010 001 0 1 2 3 4 5 6 7 1 Q 2 Q 3 Q 6.4 Asynchronous Down Counter University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 16 Nguyen Thanh Hai, PhD 6.5 Synchronous Counters -Common clock pulse -J-K FFs University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 17 Nguyen Thanh Hai, PhD Count upwards from 0 (“0000”) to 15 (“1111”) 6.5 Synchronous Counters University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 18 Nguyen Thanh Hai, PhD More Examples 1 Q J K CLK 1 Q 1 Q J K CLK 2 Q 2 Q J K CLK 3 Q 3 Q J K CLK 4 Q 4 Q 1 Synchronous Mod-16 counter 1 1 Q 2 Q 2 Q 3 Q 321 QQQ 6.5 Synchronous Counters University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 19 Nguyen Thanh Hai, PhD 6.5 Synchronous Counters University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 20 Nguyen Thanh Hai, PhD 6.5 Synchronous Counters . Engineering Counters and Registers 2 Nguyen Thanh Hai, PhD 6. 1 Asynchronous Counters 6. 2 Counters With Mod Number < 2 N 6. 3 IC Asynchronous Counters 6. 4 Asynchronous Down Counter 6. 5 Synchronous. Counter 6. 6 Asynchronous Down and Up/Down Counter 6. 7 Shift-Register Counters 6. 8 Applications University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 3 Nguyen. counter 6. 3 IC Asynchronous Counters University of Technical Education Faculty of Electrical & Electronic Engineering Counters and Registers 13 Nguyen Thanh Hai, PhD Example 6. 3: Mod -60 counter University