Decimal Number (base 10) Binary Number (base 2)



Similar documents
CHAPTER 11: Flip Flops

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Counters and Decoders

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Upon completion of unit 1.1, students will be able to

Module 3: Floyd, Digital Fundamental

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

EXPERIMENT 8. Flip-Flops and Sequential Circuits

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

The components. E3: Digital electronics. Goals:

BINARY CODED DECIMAL: B.C.D.

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

So far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs.

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

Microprocessor & Assembly Language

Asynchronous counters, except for the first block, work independently from a system clock.

Electronics Merit Badge Class 3. 1/30/2014 Electronics Merit Badge Class 3 1

Copyright Peter R. Rony All rights reserved.

Digital Fundamentals. Lab 8 Asynchronous Counter Applications

Lecture 8: Synchronous Digital Systems

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

Chapter 9 Latches, Flip-Flops, and Timers

Wiki Lab Book. This week is practice for wiki usage during the project.

Digital circuits make up all computers and computer systems. The operation of digital circuits is based on

1.1 The 7493 consists of 4 flip-flops with J-K inputs unconnected. In a TTL chip, unconnected inputs

Lab 17: Building a 4-Digit 7-Segment LED Decoder

Interfacing Analog to Digital Data Converters

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Lesson 12 Sequential Circuits: Flip-Flops

plc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums

DATA SHEET. HEF40193B MSI 4-bit up/down binary counter. For a complete data sheet, please also download: INTEGRATED CIRCUITS

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

ECE380 Digital Logic

The 104 Duke_ACC Machine

Digital Logic Design Sequential circuits

Design: a mod-8 Counter

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

Contents COUNTER. Unit III- Counters

Operating Manual Ver.1.1

Registers & Counters

Lecture-3 MEMORY: Development of Memory:

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package.

ASYNCHRONOUS COUNTERS

Counters. Present State Next State A B A B

Lab 11 Digital Dice. Figure Digital Dice Circuit on NI ELVIS II Workstation

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

(Refer Slide Time: 00:01:16 min)

Digital Electronics Detailed Outline

A Digital Timer Implementation using 7 Segment Displays

Digital to Analog and Analog to Digital Conversion

PURDUE UNIVERSITY NORTH CENTRAL

Lecture N -1- PHYS Microcontrollers

Sequential Logic Design Principles.Latches and Flip-Flops

Fundamentals of Digital Electronics

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

Jianjian Song LogicWorks 4 Tutorials (5/15/03) Page 1 of 14

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-Flops and Sequential Circuit Design

DM Segment Decoder/Driver/Latch with Constant Current Source Outputs

Digital Controller for Pedestrian Crossing and Traffic Lights

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

HD44780U (LCD-II) (Dot Matrix Liquid Crystal Display Controller/Driver)

A Lesson on Digital Clocks, One Shots and Counters

A Lesson on Digital Clocks, One Shots and Counters

Asynchronous Counters. Asynchronous Counters

Sequential Logic: Clocks, Registers, etc.

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Electronic Circuits Spring 2007

Let s put together a Manual Processor

Cascaded Counters. Page 1 BYU

ENGI 241 Experiment 5 Basic Logic Gates

Seven-Segment LED Displays

DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION

GLOLAB Universal Telephone Hold

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package.

Systems I: Computer Organization and Architecture

Basic Logic Gates Richard E. Haskell

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Technical Aspects of Creating and Assessing a Learning Environment in Digital Electronics for High School Students

Flip-Flops, Registers, Counters, and a Simple Processor

Lecture 2. Binary and Hexadecimal Numbers

DEPARTMENT OF INFORMATION TECHNLOGY

3-Digit Counter and Display

Objectives: Part 1: Build a simple power supply. CS99S Laboratory 1

SN54/74LS192 SN54/74LS193

Figure 8-1 Four Possible Results of Adding Two Bits

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

Lab Unit 4: Oscillators, Timing and the Phase Locked Loop

EE360: Digital Design I Course Syllabus

AP-1 Application Note on Remote Control of UltraVolt HVPS

Transcription:

LECTURE 5. BINARY COUNTER 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. A computer does not recognize 0 or 1. It only works on voltage changes. What we call logic 0 to a computer is zero volts. What we call logic 1 is +5 volts. When a logic state changes from a zero to a one the voltage at the pin in question goes from zero volts to +5 volts. Likewise, when a logic state changes from a one to a zero the voltage is changing from +5 volts to zero volts. 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. DECIMAL TO BINARY CONVERSION Decimal Number (base 10) Binary Number (base 2) BINARY COUNTING 0 0 1 1 2 10 3 11 4 100 5 101 6 110 7 111 8 1000 9 1001 10 1010 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 are 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 The counter you will use in lab is the 74XX161, the XX determines what technology was implemented when the chip was built. It may either not be there at all, i.e., 74161 or it could have been made with Lower Power Schottky characteristics and be designated 74LS161. The data sheet used is for an MC14161 counter from Motorola. The MC14161 is no longer made, however, the data specifications are identical. 1 2 9 10 7 6 5 4 3 CL CLK LD TE PE P4 P3 P2 P1 14161 CO Q4 Q3 Q2 Q1 15 11 12 13 14 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.

PIN OUT DETAILS QA-QD 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 QA-QD The binary outputs are located at pins Q1 through Q4. Pins P1 through P4 are the program input pins. If your circuit needs to have a particular value at any time, these pins will be either connected to +5 volts or ground so that the correct number will be loaded at the output. The clock input, CLK, is an active high input. This means that when the clock signal goes from zero volts to +5 volts, the counter increments by one. The TE pin, counter enable, when high, + 5 volts, enables the counter to increment with every positive clock pulse. The PE pin, program enable, allows the number programmed with P1-P4, to be sent to Q1-Q4. The load pin, LD, is active low. The bar above the LD designation means active low. This means that when the signal on the LD pin goes from a low to a high, 0V to +5V, the data at P1-P4 is transferred to Q1-Q4. The clear pin, CL, is also an active low pin. The circle before the connection indicated active low. When the signal at the clear pin goes from +5 volts to zero volts, all the outputs, Q1-Q4, will go low, zero volts, regardless of the count or data on pins P1-P4. The carry over signal, CO, indicates that the counter has reached the maximum value it can count to and if higher numbers are still to be counted, this signal is connected to other counter chips to continue the process.

CIRCUIT IN THE LAB 5V 1 + - 1 2 9 10 7 6 5 4 3 CL CLK LD TE PE P4 P3 P2 P1 14161 CO Q4 Q3 Q2 Q1 2 15 11 12 13 14

COUNTER CIRCUIT The counter is comprised primarily of inverters, NAND gates, and D flip-flops.

TIMING DIAGRAMS This timing diagram is for a device that has only three outputs; the chip used in lab has four outputs. The diagram above shows that when the input signal goes low then the outputs change state as required. Each of the outputs is either dependent on the state of the input or the previous output. Q 0 is dependent on the input signal, Q 1 is dependent on Q 0, Q 2 is dependent on Q 1. Observing the input signal, the clock signal on the MC14161, when it goes low the Q 0 output changes state. This diagram shows that all outputs start at the zero state. When the first negative transition of the clock signal occurs, Q 0 goes from low to high. The remaining outputs stay at the same state. Note that Q 0 stays at its high state until the next negative transition of the clock signal. Q 0 will then go low. Since Q 0 was high and now has gone low, Q 1 senses this negative transition and then goes high. It is also important to note that since the outputs change only after every two clock pulses, the outputs are successively one-half the frequency of the previous output. If the input frequency was 1,000 Hz, the frequency at Q 0 = 500 Hz, the frequency at Q 1 = 250 Hz, and the frequency at Q 2 = 125 Hz. This is because each output is held high or low for twice the amount of time as the previous output.

The diagram below is a typical output from the MC14161.

COUNTING WITH PROGRAMMED INPUTS Note in this timing diagram all inputs are cleared to zero, the decimal number 12 is loaded using the P1-P4 inputs, and the counter counts up to 15 and then returns to zero.