A Lesson on Digital Clocks, One Shots and Counters



Similar documents
A Lesson on Digital Clocks, One Shots and Counters

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

Chapter 9 Latches, Flip-Flops, and Timers

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver

Designing With the SN54/74LS123. SDLA006A March 1997

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

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

css Custom Silicon Solutions, Inc.

TS555. Low-power single CMOS timer. Description. Features. The TS555 is a single CMOS timer with very low consumption:

CHAPTER 11: Flip Flops

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

LM555/NE555/SA555. Single Timer. Description. Features. Applications. Internal Block Diagram. Vcc GND. Trigger. Discharge. Output F/F.

The components. E3: Digital electronics. Goals:

Pulse Width Modulation (PWM) LED Dimmer Circuit. Using a 555 Timer Chip

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

css Custom Silicon Solutions, Inc.

Operational Amplifier as mono stable multi vibrator

A Digital Timer Implementation using 7 Segment Displays

MM74HC4538 Dual Retriggerable Monostable Multivibrator

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

Features. Applications

3-Digit Counter and Display

Fairchild Semiconductor Application Note July 1984 Revised May Definition

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

ARRL Morse Code Oscillator, How It Works By: Mark Spencer, WA8SME

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

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

EXPERIMENT 8. Flip-Flops and Sequential Circuits

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

Module 3: Floyd, Digital Fundamental

Digital Logic Elements, Clock, and Memory Elements

LAB4: Audio Synthesizer

Operating Manual Ver.1.1

PLL frequency synthesizer

Registers & Counters

Lesson 12 Sequential Circuits: Flip-Flops

VOLTAGE-TO-FREQUENCY CONVERTER

Cascaded Counters. Page 1 BYU

Fig1-1 2-bit asynchronous counter

Interfacing To Alphanumeric Displays

DM74121 One-Shot with Clear and Complementary Outputs

How to Read a Datasheet

Counters and Decoders

Sequential Logic Design Principles.Latches and Flip-Flops

NE555 SA555 - SE555. General-purpose single bipolar timers. Features. Description

LM139/LM239/LM339 A Quad of Independently Functioning Comparators

Counters. Present State Next State A B A B

HT9170 DTMF Receiver. Features. General Description. Selection Table

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

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

ICS379. Quad PLL with VCXO Quick Turn Clock. Description. Features. Block Diagram

CERAMIC RESONATOR PRINCIPLES

Programmable Single-/Dual-/Triple- Tone Gong SAE 800

NE555 SA555 - SE555. General-purpose single bipolar timers. Features. Description

Step Response of RC Circuits

MADR TR. Quad Driver for GaAs FET or PIN Diode Switches and Attenuators. Functional Schematic. Features. Description. Pin Configuration 2

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

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

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

INTEGRATED CIRCUITS. NE558 Quad timer. Product data Supersedes data of 2001 Aug Feb 14

On/Off Controller with Debounce and

1. Description. 2. Feature. 3. PIN Configuration

LM 358 Op Amp. If you have small signals and need a more useful reading we could amplify it using the op amp, this is commonly used in sensors.

Push-Pull FET Driver with Integrated Oscillator and Clock Output

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

AP331A XX G - 7. Lead Free G : Green. Packaging (Note 2)

HCC4541B HCF4541B PROGRAMMABLE TIMER

74LS193 Synchronous 4-Bit Binary Counter with Dual Clock

CD4027BMS. CMOS Dual J-K Master-Slave Flip-Flop. Pinout. Features. Functional Diagram. Applications. Description. December 1992

SN54/74LS192 SN54/74LS193

Sequential Logic: Clocks, Registers, etc.

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

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

Conversion Between Analog and Digital Signals

ASYNCHRONOUS COUNTERS

LOW POWER SPREAD SPECTRUM OSCILLATOR

Supply voltage Supervisor TL77xx Series. Author: Eilhard Haseloff

Memory Elements. Combinational logic cannot remember

Chapter 8. Sequential Circuits for Registers and Counters

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

Upon completion of unit 1.1, students will be able to

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

Cold-Junction-Compensated K-Thermocoupleto-Digital Converter (0 C to C)

GLOLAB Universal Telephone Hold

DS1307ZN. 64 x 8 Serial Real-Time Clock

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

Engr354: Digital Logic Circuits

Digital Fundamentals

A Trigger Circuit for the 555 Timer IC Scope

IEC ESD Immunity and Transient Current Capability for the SP72X Series Protection Arrays

Building an Auto-Ranging DMM with the ICL7103A/ICL8052A A/D Converter Pair

A simple RF/Microwave frequency counter

Physics 623 Transistor Characteristics and Single Transistor Amplifier Sept. 13, 2006

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

Flip-Flops and Sequential Circuit Design

Standart TTL, Serie Art.Gruppe

Digital to Analog Converter. Raghu Tumati

ICS Pentium/Pro TM System Clock Chip. Integrated Circuit Systems, Inc. General Description. Pin Configuration.

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

Transcription:

A Lesson on Digital Clocks, One Shots and Counters Topics Clocks & Oscillators LM 555 Timer IC Crystal Oscillators Selection of Variable Resistors Schmitt Gates Power-On Reset Circuits One Shots Counters Binary Counters Mod-n Counters Frequency Division Using Counters 1

Two Types of Digital Circuits Combinational: outputs at any instant of time are entirely dependent on the inputs present at that time Sequential: external outputs are a function of external inputs but also the present state Sequential Circuits Synchronous: system whose behavior is defined by its signals and states at discrete instances of time Asynchronous: system whose behavior depends upon the order in which its inout signals change and can be affected at any instance of time 2

What is a clock? A clock is a device with no inputs and one output, defined by: Frequency Duty Cycle Magnitude f = 1/T DC = +pw/t* 100 where: +pw is positive pulse width and T is period LM555 Timer IC The 555 is a multi-function device. Function depends on external configuration and components. Clock (Astable) One-Shot (Monostable) Pulse-Width Modulator And others... 3

LM555 Clock +V f = 1.44 / [ C1 * (Ra + 2Rb) ] range: 0.01 Hz to 1.00 MHz Ra 7 RESET* DISCH 4 Vcc 8 dc = 100 * { 1 - [Rb / (Ra + 2Rb) ] } range: 50 to 100 % Rb 6 2 LM555 THRES TRIG OUT 3 C1 CONT GND Magnitude = 0 V to +V range: 4.5 to 16V C2 5 1 0.01uF LM555 Clock Example Design a clock circuit using a 555 timer IC to produce a TTL clock with the given specs: f = 9600 Hz dc = 66.7 % Step 1: Select C1. Let C1 = 0.01 µf Step 2: Solve Ra vs. Rb ratio. 66.7 = 100 * {1 - [Rb / (Ra + 2Rb)]} 1.0 Rb = Ra Step 3: Solve for Exact Values 9600 Hz = 1.44 / [0.01 µf * (Ra + 2Rb)] 9600 Hz / 1.44 = 1 / [0.01 µf * (3.0*Rb)] Rb = 5000 Ω Ra = Rb = 5000 Ω 4

Crystal Oscillators Crystals: A crystal is made from a thinly cut piece of quartz sandwiched between two metal leads. Quarts crystals force oscillation at their natural (mechanical) frequency (or harmonics). The natural frequency is primarily a function of quartz thickness. Crystals stabilize the frequency of an oscillating circuit. They provide extremely good frequency stability (0.001 %). Crystal Oscillator Circuits R1 R1 R2 C1 X1 C1 R2 X1 R3 R1 = R2 = 1 k C1 = 0.1 uf CMOS Series Oscillator TTL Series Oscillator Equations for CMOS Series Oscillator: R1 = 5 MΩ * e-(10 * 10-6f) R2 = 0.12 * R1 R3 = R2 / (0.3 Vcc - 0.5) Use the TTL circuit for Lab 3 5

Selection Of Variable Resistors Variable resistors or potentiometers (pots) are used to provide variable: frequencies duty cycles pulse widths They are also used to fine tune circuits to exact values. Fixed resistors do not come in every value. Pots can be used to get any value. However pots should be used with a series resistor. Example: Design a clock that can produce a variable frequency output in the range 1200 to 9600 Hz. Step 1. Keeping C, and Ra the same, compute Rb for both frequencies. Assume 1200 Hz 9600 Hz Rb = 7.0K Ohms 2.7K Ohms Step 2. Use a combination of a fixed resistor in series with a pot for Rb such that: Rfixed < 2.7K Ohms Rfixed + Rpot > 7.0K Ohms Solution: Rfixed = 2.2K, Rpot = 5K 2.2K < Rb < 7.2K Keep the resistance of the pot large to have maximum variability. A small turn of the pot results in big change in frequency. Rb Rfixed Rpot 6

Example: A clock of frequency 9600 Hz +/- 0.1% is needed. Rb = 5000 Ohms - tolerance of resistors 20, 10, 5, 1% - tolerance of capacitors +80% to -20% Solution: Large fixed resistor in series with a small pot. Rfixed = 4700 Ohms, Rpot = 1K Ohms 4700 Ohms < Rb < 5700 Ohms Keep the fixed resistor value large compared to the pot to get best accuracy or maximum precision. CAUTION: Use pots sparingly: - cost: $pots > $fixed $ to adjust - mechanical: noisy, unreliable Schmitt Gates Schmitt Gate Characteristics Schmitt gates are essentially TTL inverters that treat inputs slightly different from normal CMOS or TTL. The input logic level is always defined. Schmitt-trigger inputs have different input threshold levels depending on the direction of the input signal. (Hysteresis ) Inputs going from a low to a high voltage affect the output at V t+ (positive threshold). Inputs going from a high to a low voltage affect the output at V t- (negative threshold). Vih = 3.15V Logic Symbol Vin Vil = 1.35V Logic 1 undefined Logic 0 4.4V Vout 0.1V Vt+ = 3.0V Vin Vt- = 1.5V 1.5V 3.0V Vin Logic 1 Last unambiguous logic level Logic 0 a) HC Inputs b) HC Schmitt Inputs 7

Schmitt Gates Schmitt Gate Applications Signal Conditioning: cleaning up noisy, or distorted digital signals Line Drivers & Receivers Clocks & Delay Circuits Vin 3.0V 1.5V Logic Input Logic Output 1 0 1 0 t Schmitt Inverter Clock R1 1k +5V R R C1 Vx 1uF 14 1 2 IC1 7 Vout IC# Part# Vcc GND 1 74HC14 14 7 Vout 4.4V Vin Vin 4.4V Vout C C a) Vin == Logic 0 b) Vin == Logic 1 Assume C1 discharged before power is applied. Then Vx = 0.0V. Since Vx = Vin = logic 0, when power is applied Vout goes high (logic 1). Vth+ Vin Vth- 1 Input 0 1 Output 0 1 f t RC ln 2. 26 8

One Shot -- Monostable Multi -vibrators A one-shot is a circuit that produces a stable output (logic 1 or 0) until a trigger (+ or - edge) occurs. The trigger will cause the one-shot to produce a quasi-stable output for a time period determined by the circuit configuration. After the specified period of time, the output returns to the stable state. The pulse width of the quasi-stable state is independent of external stimulus. Usually, the pulse with is a function of a RC time constant. One-Shot TRIG OUT Tw = f(r,c) = 0.7RC (for a 74LS221) TRIG OUT Tw Tw A retriggerable one-shot output B non-triggerable one-shot output B A Tw 74LS221 Dual One-Shot The 74LS221 is a dual version of the 74LS121 TTL one-shot. The '221 has either a positive or negative edge trigger, and an active-high, or active- low output. Tw = ln2 * RC range: 35 ns to 70 s for jitter free operation: C + 1Cext 1A 1B 1CLR* R 5 V 1Rext/Cext 74LS221 (1/2) 1Q 1Q* 10 pf C 10 µf 9

Counters Binary Counters 0000,0001,0010,,1110,1111,0000 BCD Counters 0000,0001,,1000,1001,0000 Mod-n Counters 0,1,,n-1 or 1,2,,n 74HC161: 4-bit Counter 74HC190 BCD up/down Counter Frequency Division Using Counters clk a b c d rco rco BCD Counter Timing Diagram Each bit on the output of a counter changes at a lower frequency than the previous bit. Freq d < Freq c < Freq b < Freq a < Freq clk How much of a difference are they? 10

Frequency Division Using Mod-n Counters f Mod-n clk counter F clk /n Experiment #3: One Shots, Clocks and Counters Goals: Learn about one-shot circuits as pulse generators. Learn about crystal oscillators, counters and Mod-N counters. Prelab: Design a one-shot to produce an active low pulse from a positive-edge trigger. The pulse width should be the 4 msd s of your student ID as xxx.x ms. Suggestion Use the 74HC221 (or 74HC121) for one-shots. Complete the schematic diagram for a crystal TTL oscillator. Use a 4MHz crystal or other available crystal (<20MHz). Design an 8-bit synchronous counter. Design a Mod-7 counter that counts the sequence: 1,2,3,4,5,6,7 repeat. *Note-Review Experiment procedure for other Prelab needs. 11

Experiment Procedure: Build and test your one-shot. Measure Vhigh,Vlow,pulse width and rise time. Look for ringing and noise. Build and test your crystal oscillator. Measure: Vhigh, Vlow, frequency, Duty Cycle, pulse width and rise time. Measure frequency using the logic analyzer. Look for ringing and noise. Do not disassemble your circuit. Build and test your 8-bit counter. First use the CADET s TTL clock for trigger input. Then use a logic switch. Then use the bounceless pushbutton with a pull- up resistor. Connect the crystal oscillator output to the counter s trigger input. Measure the frequency at each counter output. Build and test your Mod-7 counter. Connect the output to a 7- segment display circuit. 12