Binary Counters Lecture L8.3 Section 8.2. Counters 3-Bit Up Counter 3-Bit Down Counter Up-Down Counter.

Slides:



Advertisements
Similar presentations
Modulo-N Counters Module M10.4 Section 7.2.
Advertisements

VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
Encoders Module M9.3 Section 6.3. Encoders Priority Encoders TTL Encoders.
Demultiplexers Module M6.4 Section 6.4. Demultiplexers YIN 1 x 4 DeMUX d0d1 Y0 Y1 Y2 Y3 Y0 Y1 Y2 Y3 d1d0 0 0 YIN YIN YIN
Shift Registers Module M11.1 Section 7.3.
7-Segment Displays Lecture L6.1 Section 6.3. Turning on an LED.
Latches and Flip-Flops Discussion D8.1 Section 13-9.
Binary Counters Module M10.3 Section 7.2. Counters 3-Bit Up Counter 3-Bit Down Counter Up-Down Counter.
7-Segment Displays Lecture L6.7 Section 6.5. Turning on an LED.
Binary-to-BCD Converter Lecture L6.2 Section 6.5 pp
Using State Machines as Control Circuits Lecture L9.4.
Multiplier Lecture L7.3 Section 10.4 (p.276) Section 7.3 (Handout)
Pulse-Width Modulated DAC
Multiplexers Lecture L6.4 Section 6.4.
Subtractors Module M8.2 Section 6.2. Subtractors Half Subtractor Full Subtractor Adder/Subtractor - 1 Adder/Subtractor - 2.
Designing State Machines Lecture L9.2 Handout Section 9.2.
Datapaths Lecture L10.2 Sections 10.2, ALU (Sect. 7.5 and Lab 6)
Sequential Logic Design
Arbitrary Waveforms Lecture L8.5 Section 7.2. CLK DQ !Q CLK DQ !Q CLK DQ !Q Q0Q0.D Q1 Q2 Q1.D Q2.D s s s s3 0 1.
Counters as State Machines Lecture L9.1 Handout Section 9.1.
Designing State Machines SQRT controller Lecture L9.2a Section 9.2.
Equality Detector Lecture L6.1 Section 6.1. Equality Detector XNOR X Y Z Z = !(X $ Y) X Y Z
Flip-Flops Module M10.2 Section 7.1. D Latch Q !Q CLK D !S !R S R X 0 Q 0 !Q 0 D CLK Q !Q Note that Q follows D when the clock in high, and.
Counters Mano & Kime Sections 5-4, 5-5. Counters Ripple Counter Synchronous Binary Counters –Design with D Flip-Flops –Design with J-K Flip-Flops Counters.
Shifter Lecture L7.4 Group HW #4 Section 10.3.
Modulo-N Counters Lecture L8.4 Section 7.2. Counters Modulo-5 Counter 3-Bit Down Counter with Load and Timeout Modulo-N Down Counter.
Counters Discussion D5.3 Example 33. Counters 3-Bit, Divide-by-8 Counter 3-Bit Behavioral Counter in Verilog Modulo-5 Counter An N-Bit Counter.
Codes and Code Converters
Code Converters Module M7.1 Section 6.5. Code Converters Binary-to-BCD Converters ABEL TRUTH_TABLE Command.
Arbitrary Waveforms Module M10.5 Section 7.2. CLK DQ !Q CLK DQ !Q CLK DQ !Q Q0Q0.D Q1 Q2 Q1.D Q2.D s s s s3 0 1.
Arithmetic Logic Unit (ALU) Lecture L7.5 Section 7.5.
Sequential Logic Design
Pulse-Width Modulated DAC Lecture 11.3 Section 11.5.
Multiplexers Module M6.1 Section 6.4. Multiplexers A 4-to-1 MUX TTL Multiplexer A 2-to-1 MUX.
Adders Lecture L7.1 Section 6.2 Section 10.4 (pp )
Shifters Lecture L7.4 Section 7.4. MODULE shift TITLE 'shifter' DECLARATIONS " INPUT PINS " D3..D0 PIN 11,7,6,5; D = [D3..D0]; s2..s0 PIN 3,2,1; S.
Arbitrary Waveform Discussion 12.2 Example 34. Recall Divide-by-8 Counter Use q2, q1, q0 as inputs to a combinational circuit to produce an arbitrary.
Flip-Flops Lecture L8.2 Section 8.1. Recall the !S-!R Latch !S !R Q !Q !S !R Q !Q X Y nand 1 0 Set 1 0.
Counters Discussion 12.1 Example 33. Counters 3-Bit, Divide-by-8 Counter 3-Bit Behavioral Counter in Verilog Modulo-5 Counter An N-Bit Counter.
Decoders Module M9.1 Section 6.3. Decoders TTL Decoders.
Arithmetic Logic Unit (ALU) Lecture L9.3 Lab 10. ALU CB = carry_borrow flag Z = zero flag (Z = 1 if Y = 0)
Shift Registers Lecture L6.6 Section Bit Shift Register.
Equality Detector Lecture L6.3 Section 6.1. Equality Detector XNOR X Y Z Z = !(X $ Y) X Y Z
7-Segment Displays Module M7.2 Section 6.5. Turning on an LED Common Anode.
Flip-Flops Lecture L8.2 Section 7.1 – Book Sect. 8.1– Handout.
ECE 331 – Digital System Design Counters (Lecture #19) The slides included herein were taken from the materials accompanying Fundamentals of Logic Design,
EET 1131 Unit 11 Counter Circuits  Read Kleitz, Chapter 12, skipping Sections and  Homework #11 and Lab #11 due next week.  Quiz next week.
Chapter 9 Counters.
Sequential Circuit - Counter -
2017/4/24 CHAPTER 6 Counters Chapter 5 (Sections )
Department of Communication Engineering, NCTU 1 Unit 2 Reviews on Logic Elements.
Traffic Lights Discussion D8.3a. Recall Divide-by-8 Counter Use Q2, Q1, Q0 as inputs to a combinational circuit to produce an arbitrary waveform. s0 0.
Counters - II. Outline  Synchronous (Parallel) Counters  Up/Down Synchronous Counters  Designing Synchronous Counters  Decoding A Counter  Counters.
A Greatest Common Divisor (GCD) Processor Lecture L10.3 Sections 10.4, 10.5.
Synchronous Counter with MSI Gates
EE121 John Wakerly Lecture #9
CSE 171 Lab 11 Digital Voltmeter.
Lecture No. 29 Sequential Logic.
Logiske funktioner i Peel. PEEL 18CV8 logic diagram.
Digital Logic & Design Dr. Waseem Ikram Lecture No. 35.
Counters as State Machines
FPGA Project I: Up/Down Counter w/ Async Reset
Shift Registers Lecture L8.6 Section 8.3.
CSE 171 Lab 11 Digital Voltmeter.
Designing Digital Circuits Using Hardware Description Languages (HDLs)
29-Nov-18 Counters Chapter 5 (Sections ).
Digital Logic & Design Dr. Waseem Ikram Lecture No. 31.
Analog-to-Digital Converters
Digital Logic & Design Dr. Waseem Ikram Lecture No. 36.
디 지 털 시 스 템 설 계 UP2 Kit를 이용한 카운터 설계
Presentation transcript:

Binary Counters Lecture L8.3 Section 8.2

Counters 3-Bit Up Counter 3-Bit Down Counter Up-Down Counter

CLK DQ !Q CLK DQ !Q CLK DQ !Q Q0Q0.D Q1 Q2 Q1.D Q2.D s s s s s s s s State Q2 Q1 Q0 Q2.D Q1.D Q0.D Divide-by-8 Counter

s s s s s s s s State Q2 Q1 Q0 Q2.D Q1.D Q0.D Divide-by-8 Counter Q2 Q1 Q Q2.D Q2.D = !Q2 & Q1 & Q0 # Q2 & !Q1 # Q2 & !Q0

s s s s s s s s State Q2 Q1 Q0 Q2.D Q1.D Q0.D Divide-by-8 Counter Q2 Q1 Q Q1.D Q1.D = !Q1 & Q0 # Q1 & !Q0

s s s s s s s s State Q2 Q1 Q0 Q2.D Q1.D Q0.D Divide-by-8 Counter Q2 Q1 Q Q0.D Q0.D = ! Q0

div8cnt.abl MODULE div8cnt TITLE 'Divide by 8 Counter' DECLARATIONS hex7seg interface([D3..D0] -> [a,b,c,d,e,f,g]); d7R FUNCTIONAL_BLOCK hex7seg; " INPUT PINS " CLK PIN 12; " 1 Hz clock (jumper) clear PIN 11;" switch 1 " OUTPUT PINS " Q2..Q0 PIN 41,43,44 ISTYPE 'reg'; " LED Q = [Q2..Q0]; " 3-bit output vector [a,b,c,d,e,f,g] PIN 15,18,23,21,19,14,17 ISTYPE 'com'; " Rightmost (units) 7-segment LED display

EQUATIONS Q.AR = clear; Q.C = CLK; Q2.D = !Q2 & Q1 & Q0 # Q2 & !Q1 # Q2 & !Q0; Q1.D = !Q1 & Q0 # Q1 & !Q0; Q0.D = !Q0; [a,b,c,d,e,f,g] = d7R.[a,b,c,d,e,f,g]; d7R.[D2..D0] = Q; d7R.D3 = 0; div8cnt.abl (cont’d) Clock Async clear

test_vectors(CLK -> Q).C. -> 1;.C. -> 2;.C. -> 3;.C. -> 4;.C. -> 5;.C. -> 6;.C. -> 7;.C. -> 0;.C. -> 1;.C. -> 2;.C. -> 3;.C. -> 4; END div8cnt.abl (cont’d)

div8cnt Simulation

Counters 3-Bit Up Counter 3-Bit Down Counter Up-Down Counter

CLK DQ !Q CLK DQ !Q CLK DQ !Q Q0Q0.D Q1 Q2 Q1.D Q2.D s s s s s s s s State Q2 Q1 Q0 Q2.D Q1.D Q0.D 3-Bit Down Counter

Q2 Q1 Q Q2.D Q2.D = !Q2 & !Q1 & !Q0 # Q2 & Q1 # Q2 & Q0 s s s s s s s s State Q2 Q1 Q0 Q2.D Q1.D Q0.D

3-Bit Down Counter Q2 Q1 Q Q1.D Q1.D = !Q1 & !Q0 # Q1 & Q0 s s s s s s s s State Q2 Q1 Q0 Q2.D Q1.D Q0.D

3-Bit Down Counter Q2 Q1 Q Q0.D Q0.D = ! Q0 s s s s s s s s State Q2 Q1 Q0 Q2.D Q1.D Q0.D

Counters 3-Bit Up Counter 3-Bit Down Counter Up-Down Counter

Up-Down Counter Q0 Q1 Q2 clock UD UD = 0: count up UD = 1: count down

Up-Down Counter UD Q2 Q1 Q0 Q2.D Q1.D Q0.D UD Q2 Q1 Q0 Q2.D Q1.D Q0.D Up-CounterDown-Counter

UD Q2 Q1 Q Up-Down Counter Make Karnaugh maps for Q2.D, Q1.D, and Q0.D