Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Pulse-width modulation wikipedia , lookup
Integrating ADC wikipedia , lookup
Analog-to-digital converter wikipedia , lookup
Immunity-aware programming wikipedia , lookup
Crossbar switch wikipedia , lookup
Buck converter wikipedia , lookup
Switched-mode power supply wikipedia , lookup
Schmitt trigger wikipedia , lookup
Opto-isolator wikipedia , lookup
ES210L, Digital Circuits and Logic Design Lab Reporter Name: Date: Partner Names Group No.: Lab 9: Ripple Counter * A. Objectives Examine the Ripple Counter and its operation using flip-flops. Learn how the Ripple Counter can count decimal digits. Practice reading the IC datasheets of the logical gates and other ICs for designing digital systems. B. Introduction A binary counter is a digital circuit that counts the number of pulses applied to its input. An n-bit binary counter consists of n flip‐ flops and can count in binary from 0 through 2^n - 1. In a ripple counter the output of each flip-flop is connected to the input of the next higher order. The flip-flop holding the least significant bit (LSB) receives the incoming count pulses. A complementing flip‐ flop can be obtained from a JK flip‐ flop with the J and K inputs tied together or a T flip‐ flop (see sections 5.4 and 6.3 of textbook by Mano). The truth table of JK and T flip-flops are shown below. Clk or CK are the clock pulses applied to the flip-flop to count up. Q(t) and Q’(t+1) are the current and the next states of the flip-flop. J K Q(t+1) Note 0 0 Q(t) No Change 0 1 0 Reset 1 0 1 Set 1 1 Q’(t) Complement T Q(t+1) Note 0 Q(t) No Change 1 Q’(t) Complement The triangle at clock input means trigger by positive edge of the clock, and with a bubble for negative edge. In this experiment, we want to build first a 2-bit binary counter followed by a BCD ripple counter that counts and displays 0-9. C. Parts needed A Digital Multimeter A +5 V power supply A breadboard/protoboard and wires Datasheets of ICs from dept. website or the Internet One 47 Ohm resistor One 74LS47 BCD-to-7-segment decoders/drivers One 74LS76 Dual JK-type flip-flops gates One 74LS90 Binary and decade counter One 7730/MAN72 D. Procedure - Each student is expected to build the circuit, write and run the Verilog programs with the waveform. Please make sure to get the instructor’s initials for paragraphs 2, 4, 5, & 6 in your logbook and include a picture of the page at the end of your report for grading. 1. Design and draw in (a) a 2-bit binary counter similar to Fig. 6.8a (Four‐ bit binary ripple counter) in Mano textbook to count binary numbers from Q1Q0=00 to Q1Q0=11 using T flip-flops (7476 IC). Use 74LS76 datasheet and Mano ed. 5, Fig 9.12 (IC type 7476 dual JK master–slave flip‐ flops) to answer the questions below for 74LS76. a. DRAW a 2-bit binary Counter b. How many flip-flops are required? c. What are the binary numbers? d. How do you make a T-FF from a JK-FF? Dr. Ali Kujoory 5/12/2017 1 e. What is 74LS76 and what does it do? f. What are the min, max, and typical Vcc voltages? g. What is the meaning and value of Input High voltage? h. What is the meaning and value of Input Low voltage? i. What is the meaning and typical value of Output High voltage? j. What is the meaning and typical value of Output Low voltage? k. What are the pin numbers for J and K inputs in each FF? l. What is the pin number for Load/Preset inputs in each FF. m. To toggle what should be the status of Load/Preset input? n. What is the pin number for the Clear input in each FF. o. To clear what should be the status of the Clear input? p. What is the pin number for the Clock input in each FF. q. Is this FF triggered on the positive or negative edge of the clock pulses? r. What is the Maximum Clock Frequency of this IC? 2. Connect the 2-bit binary counter you designed above on the protoboard. Set T=J=K= high logic. Connect an LED (LED1) to a switch (or a push button) to see the status of the switch. Use the switch to apply pulses to the clock input of the first stage with Q0 output (LSB) connected to LED2 and the second stage with Q1 (MSB) connected to LED3 to display the output bits. For the flip-flops to toggle, set the Preset and Clear inputs of both flip-flips to high logic (Mano Fig 9.12). Complete the table below for the counter by applying the clock pulses to the first stage and watching the LEDs. Let the instructor check and initial the diagram in your logbook. Complete the table below. ON/OFF Counts (LED1) 1 2 3 4 Q0 LED2 Q1 LED3 3. In your logbook, design and draw a circuit to count and display from decimal 0 to 9 using a 74LS90 BCD ripple counter, a 74LS47 BCD-to-7-segment decoder/driver, and a 7730 (or MAN72) 7-segment display IC as shown below. Before connecting the circuit, answer the following questions. Input pulses 74LS90 BCD Counter 74LS47 BCD-to-7-segment decoders/drivers Question 7730/MAN72 7-Segment display Answer a. What is 74LS90 IC and what does it do? b. How many flip-flops are in 7490 IC? c. How many outputs does 7490 have for the BCD digits. d. Which output of 7490 is LSB and which one is MSB? e. What is 7447 IC and what does it do? f. How many inputs does 7447 have for the BCD digits? g. How many outputs does 7447 have for the BCD digits? h. How many LEDs does 7730 / MAN70A have for the BCD digits? Dr. Ali Kujoory 5/12/2017 2 i. Which segments are used to display digit 0? j. Which segments are used to display digit 4? k. Which segments are used to display digit 9? 4. Before you connect the above diagram, do the following points: Make a complete diagram in your logbook and include all pin numbers and their connections on the three ICs. Show a switch to mimic the input pulses and connect it to an LED to display the switch status. Include a switch to reset the counter to zero. The input at pin 14 (and pin 3) of 7730/Man72 is the common anode (CA) for all the LED segments. A 47Ω resistor to Vcc is needed in order to supply the proper current to the selected LED segments. Show this on your diagram. Make sure to let the instructor check your diagram and initial your logbook. 5. Next, start with the 7490 IC, connect and test each IC on the protoboard separately before connecting it to the next stage. Use the truth table of 7490 to check your wiring for the reset inputs. You can connect the 4 outputs of 7490 to the LEDs on the protoboard to check the counting. Also check the reset switch operation. Then connect all the ICs as in the diagram above and answer the following. Does the 7-segment IC display digits from 0 to 9 as you push the switch 10 times? Does the 7-segment IC reset to zero as you hit the reset switch? Which pin is the Cathode for Decimal Point? Apply +5V to it via a switch to see if it lights up. Let the instructor check your operational circuit and initial your logbook for this step. 6. Next, set the switch on the waveform generator on the protoboard to TTL and the frequency to 1 Hz, connect the signal to the BCD counter, and read the 7-segment display. Let the instructor check and initial your logbook for this. Does the 7-segment IC display show digits 0 to 9 back to 0 to 9 continuously? Do not disassemble the circuit from your breadboard since you may need it for the next experiment. E. Feedback/Comments (your comments will help improving this lab) Was the instruction clear enough? Any error? How difficult was it for you? Do you have any observations to make? F. Report Report the answers in the tables above and include a picture of the instructor’s initials at the end of your report. (*) The author acknowledges Mr. S. Marivani and as some of the sections come from his work. Dr. Ali Kujoory 5/12/2017 3