Lab 6. Binary Counter

Similar documents
Lab 5. Binary Counter

Lab 8. Stepper Motor Controller

Exercise 1: AND/NAND Logic Functions

Java Bread Board Introductory Digital Electronics Exercise 2, Page 1

Schmitt Trigger Inputs, Decoders

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC 180A DIGITAL SYSTEMS I Winter 2015

Name EET 1131 Lab #2 Oscilloscope and Multisim

11 Counters and Oscillators

Analog-to-Digital Conversion

ENGR 210 Lab 12: Analog to Digital Conversion

3.1 There are three basic logic functions from which all circuits can be designed: NOT (invert), OR, and

Experiment 5: Basic Digital Logic Circuits

Electronic Instrumentation

Microprocessor & Interfacing Lecture Programmable Interval Timer

Laboratory Assignment Number 3 for Mech 143. Pre-Lab: Part 1 Interfacing to a DC Motor and Potentiometer

EE283 Electrical Measurement Laboratory Laboratory Exercise #7: Digital Counter

LABORATORY 6 v3 TIME DOMAIN

PHYSICS 536 Experiment 14: Basic Logic Circuits

Dedan Kimathi University of technology. Department of Electrical and Electronic Engineering. EEE2406: Instrumentation. Lab 2

TCSS 372 Laboratory Project 2 RS 232 Serial I/O Interface

Technical Information Manual

Digital Logic Troubleshooting

RC Filters and Basic Timer Functionality

ANALOG TO DIGITAL CONVERTER

Exercise 2: OR/NOR Logic Functions

Experiment # 1 Introduction to Lab Equipment

University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 3157 Electrical Engineering Design II Fall 2013

Digital Electronics 1 (ET181) Laboratory Manual

Digital Debug With Oscilloscopes Lab Experiment

Physics 335 Lab 1 Intro to Digital Logic

Lab 2: Combinational Circuits Design

VCC. Digital 16 Frequency Divider Digital-to-Analog Converter Butterworth Active Filter Sample-and-Hold Amplifier (part 2) Last Update: 03/19/14

1.) If a 3 input NOR gate has eight input possibilities, how many of those possibilities result in a HIGH output? (a.) 1 (b.) 2 (c.) 3 (d.) 7 (e.

EECS 270: Lab 7. Real-World Interfacing with an Ultrasonic Sensor and a Servo

Project 3 Build a 555-Timer

Page 1/10 Digilent Analog Discovery (DAD) Tutorial 6-Aug-15. Figure 2: DAD pin configuration

Lecture 2. Digital Basics

PreLab 6 PWM Design for H-bridge Driver (due Oct 23)

Asst. Prof. Thavatchai Tayjasanant, PhD. Power System Research Lab 12 th Floor, Building 4 Tel: (02)

EXPERIMENT 12: DIGITAL LOGIC CIRCUITS

Lab 5 Timer Module PWM ReadMeFirst

Model 305 Synchronous Countdown System

ECE 220 Laboratory 3 Thevenin Equivalent Circuits, Constant Current Source, and Inverting Amplifier

EXPERIMENT 1 PRELIMINARY MATERIAL

Cornerstone Electronics Technology and Robotics Week 21 Electricity & Electronics Section 10.5, Oscilloscope

Analog-to-Digital Converter. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name

). The THRESHOLD works in exactly the opposite way; whenever the THRESHOLD input is above 2/3V CC

Lab Exercise 6: Digital/Analog conversion

University of California at Berkeley Donald A. Glaser Physics 111A Instrumentation Laboratory

PRODUCT TEST MANUAL 2SY110K28 SYNCHRONISM CHECK RELAY

EE 210 Lab Exercise #4 D/A & A/D Converters

Name: Class: Date: 1. As more electronic systems have been designed using digital technology, devices have become smaller and less powerful.

Sirindhorn International Institute of Technology Thammasat University at Rangsit

Logic 0 Logic To provide an output load (or two) 5 Voltage Measurement Point V CC +5 74LS00 GND

Module -18 Flip flops

8253 functions ( General overview )

ME 461 Laboratory #3 Analog-to-Digital Conversion

Precalculations Individual Portion Introductory Lab: Basic Operation of Common Laboratory Instruments

Use the fixed 5 volt supplies for your power in digital circuits, rather than the variable outputs.

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

Data Logger by Carsten Kristiansen Napier University. November 2004

Introduction to Oscilloscopes Instructor s Guide

University of California at Berkeley. College of Engineering. J. Wawrzynek and N. Weaver. Lab 7

Spec. Instructor: Center

PC-OSCILLOSCOPE PCS500. Analog and digital circuit sections. Description of the operation

Integrators, differentiators, and simple filters

EE 308 Lab Spring 2009

FET Driver, Load, and Switch Circuits

K1EL Granite State Crystal Matcher GS XTAL

1. The decimal number 62 is represented in hexadecimal (base 16) and binary (base 2) respectively as

Lab 7 (Hands-On Experiment): CMOS Inverter, NAND Gate, and NOR Gate

Section 1. Fundamentals of DDS Technology

DEPARTMENT OF ELECTRICAL ENGINEERING LAB WORK EE301 ELECTRONIC CIRCUITS

CS61c: Introduction to Synchronous Digital Systems

Lab Project #2: Small-Scale Integration Logic Circuits

Lab Exercise 9: Stepper and Servo Motors

1 Second Time Base From Crystal Oscillator

Intro To Engineering II for ECE: Lab 7 The Op Amp Erin Webster and Dr. Jay Weitzen, c 2014 All rights reserved.

EE2304 Implementation of a Stepper Motor using CMOS Devices Fall 2004 WEEK -2-

LABORATORY 6 v2 TIMERS AND OSCILLATORS

EE 308 Spring S12 SUBSYSTEMS: PULSE WIDTH MODULATION, A/D CONVERTER, AND SYNCHRONOUS SERIAN INTERFACE

ENGINEERING TRIPOS PART II A ELECTRICAL AND INFORMATION ENGINEERING TEACHING LABORATORY EXPERIMENT 3B2-B DIGITAL INTEGRATED CIRCUITS

Sept 13 Pre-lab due Sept 12; Lab memo due Sept 19 at the START of lab time, 1:10pm

ME 461 Laboratory #2 Timers and Pulse-Width Modulation

CHAPTER 6 DIGITAL INSTRUMENTS

SE311: Design of Digital Systems Lecture 1: Introduction to Digital Systems

Yaskawa Electric America Unit Troubleshooting Manual Section Two: Power Checks GPD 506/P5 and GPD 515/G5 (0.4 ~ 160kW)

DELD MODEL ANSWER DEC 2018

EE 210 Lab Exercise #3 Introduction to PSPICE

An Analog Phase-Locked Loop

Assembly Manual for VFO Board 2 August 2018

Lab 12: Timing sequencer (Version 1.3)

TECH 3232 Fall 2010 Lab #1 Into To Digital Circuits. To review basic logic gates and digital logic circuit construction and testing.

Digital Fundamentals

Chapter 1: Digital logic

Due date: Sunday, November 8 (midnight) Reading: HH sections , (pgs , )

Combinational logic: Breadboard adders

Introduction to Electronic Equipment

ENGR 1110: Introduction to Engineering Lab 7 Pulse Width Modulation (PWM)

B.E. SEMESTER III (ELECTRICAL) SUBJECT CODE: X30902 Subject Name: Analog & Digital Electronics

Transcription:

Lab 6. Binary Counter Overview of this Session In this laboratory, you will learn: Continue to use the scope to characterize frequencies How to count in binary How to use an MC14161 or CD40161BE counter Introduction The TA will show you the MC14161 or CD40161BE counter and the MC14012 quad input NAND gate. Oscilloscope Measurements 6.1 Connect the signal from the function generator to the oscilloscope and determine the type of signal present, the frequency, amplitude, and the DC offset. Draw a picture of the signal on your answer sheet. Show all calculations for amplitude, period, frequency, and DC offset. Background Counting: Before starting with counters there is some vital information that needs to be understood. The most important is the fact that since the outputs of a digital chip can only be in one of two states, it must use a different counting system than you are accustomed to. Normally we use a decimal counting system; meaning each digit in a number is represented by one of 10 characters (0-9). In a binary system, there can only be two characters, 0 and 1. When counting up in a decimal system, we start with the first digit. When that digit overflows, i.e. gets above 9, we set it to 0 and add one to the next digit over. The same goes for a binary system. When the count goes above 1 we add one to the next digit over and set the first digit to 0. Here is an example. 1

Decimal Binary 0 0 1 1 2 10 3 11 4 100 To convert a binary number to a decimal, we use a simple system. Each digit, or bit of the binary number represents a power of two. All you need to do to convert from binary to decimal is add up the applicable powers of 2. In the example below, we find that the binary number 10110111 is equal to 183. The diagram also shows that eight bits make up what is called a byte. Nibbles are the upper or lower four bits of that byte. Referring to nibbles and bytes is useful when dealing with other number systems such as hexadecimal, which is base 16. Byte Upper Nibble Lower Nibble 7 6 5 4 1 0 1 1 0 1 1 1 3 2 1 0 Binary number 7 6 5 4 3 2 1 0 + =183 2 + 2 2 + 2 + 2 + 2 + 2 + 2 128 + 0 + 32 + 16 + 0 + 4 + 2 + 1 = 183 6.2 What are the binary number representations for the numbers 5 through 10? 2

THE COUNTER: Many digital circuits need to be able to count. The most basic element to every single microprocessor, from the one inside your watch to a Pentium 4, is a counter. So let s see how to use one. Below is a schematic of the MC14161 or CD40161BE counter. Q1-Q4 P1-P4 CLK CO TE, PE CL LD = Outputs = Program Input = Clock = Carry out = Counter and program enable = Clear (Master Reset) = Load P1-P4 value onto Q1-Q4 Hook up the following circuit. Then set the function generator to output a square wave of 1Hz with a peak-to-peak voltage of 5 volts. However, the DC offset must be set so that the output goes from 0 volts to 5 volts, that is, the negative portion of the square wave does not go below zero volts. Have the TA verify that you have created this signal correctly before connecting it to the counter circuit. Use the scope to show the waveform. 3

Some very important things should be noticed about this diagram. First, the pins on the chip diagram are not presented in their actual order! This is a common practice to keep the schematic as neat as possible. Be sure to hook up the pins correctly on the actual circuit! Remember, to locate Pin 1, orient the chip so that the divot is up, pin1 will be in the upper left corner. Subsequent pins go in a counter clockwise fashion. Second, the CL (clear) pin has a little bubble on it and the LD (load) pin has a line over the label. Both of these mean that this function is activated when this pin goes low (to ground). This is called negative logic. Third, Power (+Vcc) and Ground (GND) are not shown on the chip in this schematic. It is common practice to leave them out since all chips need to be powered. Most logic chips (these included) have power (+Vcc) at the highest pin number (upper right side, pin 16 in this case) and ground attached to the halfway pin (lower left, pin 8 in this case). Be sure you power your chips or they will not work! Before you power the circuit, verify that your clock signal has an amplitude of 5 volts and a DC offset of 2.5 volts. It should oscillate between 0 and 5 volts. 6.3 Does the circuit count input pulses from the Function Generator? 6.4 What number does it count to? 4

6.5 What is the frequency of the waveforms that come out of each of the Q pins relative to the frequency of the function generator (you may find it easier to increase the frequency of the function generator so that the lower frequency outputs are easier to see on the scope)? Is this what you expect? Why? Use the timing diagram above to help with your answer. 6.6 Find another group that has completed this much. Attach the Carry out of one circuit to the CLK of another. What number can you count to now? 5

COUNTING TO A SPECFIC NUMBER What if you only want to count to a specified number? How can we make the circuit above count from 0 to 9 and then restart at 0? For this we will need a logic gate. We need a chip to monitor the output of the counter. When it sees that a 9 is there, it needs to set the counter to 0. Build the following circuit (don t forget the power and ground pins for both chips!): Examine this circuit closely. Here, the counter will increment as before. However, when the number 9 (1001) is on the outputs, all the inputs to the 4-input NAND gate will be high (1). Therefore the output of the NAND gate will go low, thereby, loading the outputs of the counter with the number present at the inputs (P1-P4), which, in this case is the number 0. At the next clock cycle, the counter will set the outputs to 0. Assemble the circuit and answer the following questions. Start with the clock at a low frequency, around 2 Hz to verify that the circuit is actually counting from 0 to 9. 6.7 Why are the 1C and 1D pins of the NAND gate tied to 5 volts? 6.8 How can we get the counter to count from 0-5? (Hint: you only need to adjust the wires from the output of the counter to the NAND gate) 6.9 How can we get the counter to count from 1 to 6? (Hint: The wires between the counter output and the NAND gate need to be changed again, and so does the number on the counter load inputs (P1-P4). 6

LAB 6 DATA SHEETS The 74xx161 has the same pin out as the MC14161, which is no longer made. 7

Answer Sheet Lab 6. Binary Counter Name: TA init: Section Number: Date 6.1 Draw the waveform shown on the oscilloscope. What is the name of this waveform? What is the amplitude, frequency, and DC offset? Show all your calculations. 6.2 What are the binary number representations of 5 through 10? 6.3 Does the circuit count input pulses from the Function Generator? 6.4 What number does the circuit count to? 6.5 What frequency comes out of each of the output pins? Why are these the expected values? 6.6 What is the maximum number that two circuits can count to? 6.7 Why are the 1C and 1D pins of the NAND gate tied to 5 volts? 6.8 How can we get the counter to count from 0-5? 6.9 How can we get the counter to count from 1 to 6? 8