樹德科技大學資訊工程系 Chapter 1: Digital Concepts Shi-Huang Chen Sept. 2010 1 Chapter Outline 1.1 Digital and Analog Quantities 1.2 Binary Digits, Logic Level, and Digital Waveform 1.3 Basic Logic Operations 1.4 Introduction to the System Concept 1.5 Fixed-Function Integrated Circuits 1.6 Test and Measurement Instruments 1.7 Introduction to Programmable Logic 2 1
Digital and Analog Quantities Analog quantities have continuous values Digital quantities have discrete sets of values 3 Sampled-value representation (quantization) of the analog quantity in Figure 1-1. Each value represented by a dot can be digitized by representing it as a digital code that consists of a series of 1s and 0s. 4 2
The Digital Advantage Data Processing Data Transmission Data Storage 5 A basic audio public address system 6 3
Digital and Analog Electronics Together 7 Binary Digits, Logic Levels, and Digital Waveforms The conventional numbering system uses ten digits: 0,1,2,3,4,5,6,7,8, and 9. The binary numbering system uses just two digits: 0 and 1. In binary, a single number is called a bit (for binary digit). A bit can have the value of either a 0 or a 1, depending on if the voltage is HIGH or LOW. 8 4
Binary Digits Positive Logic HIGH = 1 Low = 0 Or Negative logic High =0 Low =1 9 Digital Waveform Digital waveforms change between the LOW and HIGH levels. A positive going pulse is one that goes from a normally LOW logic level to a HIGH level and then back again. Digital waveforms are made up of a series of pulses. HIGH HIGH Rising or leading edge Falling or trailing edge Falling or leading edge Rising or trailing edge LOW LOW t 0 t 1 t 0 t 1 (a) Positive going pulse (b) Negative going pulse 10 5
Major parts of a digital pulse Actual pulses are not ideal but are described by the rise time, fall time, amplitude, and other characteristics. Amplitude 50% 90% Overshoot Ringing t W Pulse width Droop 10% Ringing Base line t r t f Undershoot Rise time Fall time 11 Period and Frequency Periodic pulse waveforms are composed of pulses that repeats in a fixed interval called the period ( 周期 ). The frequency ( 頻率 ) is the rate it repeats and is measured in hertz. f 1 = T T 1 = f The clock ( 時脈 ) is a basic timing signal that is an example of a periodic wave. What is the period of a repetitive wave if f = 3.2 GHz? T = 1 f = 1 3.2 GHz = 313 ps 12 6
Pulse Definitions In addition to frequency and period, repetitive pulse waveforms are described by the amplitude (A), pulse width (t W ) and duty cycle. Duty cycle is the ratio of t W to T. Volts Amplitude (A) Pulse width (t W ) Period, T Time 13 Period and Frequency 14 7
Pulse Width and Duty Cycle Duty cycle t w = 100% T 15 Timing Diagrams A timing diagram is used to show the relationship between two or more digital waveforms, Clock A B C A diagram like this can be observed directly on a logic analyzer. 16 8
Example of a clock waveform synchronized with a waveform representation of a sequence of bits 17 Example of a timing diagram 18 9
Illustration of serial transfer of binary data. Only the data lines are shown. 19 Illustration of parallel transfer of binary data. Only the data lines are shown. 20 10
Basic logic operations and symbols True only if all input conditions are true. True only if one or more input conditions are true. Indicates the opposite condition. 21 The NOT operation When the input is LOW, the output is HIGH When the input is HIGH, the output is LOW The output logic level is always opposite the input logic level. 22 11
The AND operation The AND operation When any input is LOW, the output is LOW When both inputs are HIGH, the output is HIGH 23 The OR operation The OR operation When any input is HIGH, the output is HIGH When both inputs are LOW, the output is LOW 24 12
Basic Logic Functions Comparison Function Arithmetic Functions Code conversion function Encoding function Decoding function Data selection function Data storage function Counting function 25 Comparison Function (1/2) 26 13
Comparison Function (2/2) 27 Arithmetic functions Perform the basic arithmetic operations on two binary values: Addition Subtraction of two values Multiplication Division 28 14
Arithmetic Function: The addition function 29 Arithmetic Function: The addition function 30 15
Code conversion function Converts, or translates, information from one code format to another Encoding function Converts non-binary information into a binary code Decoding function Converts binary-coded information into a nonbinary form 31 Encoding function An encoder used to encode a calculator keystroke into a binary code for storage or for calculation 32 16
Decoding function A decoder used to convert a special binary code into a 7-segment decimal readout. 33 Data selection function Multiplexer (mux) Switches digital data from any number of input sources to a single output line Demultiplexer (demux) switches digital data from a single input to any number of output lines 34 17
Data selection function Illustration of a basic multiplexing/demultiplexing application. 35 Data storage function Retains binary data for a period of time Flip-flops (bi-stable) Registers Semiconductor memories Magnetic-media memories Optical-media memories 36 18
Data storage function Example of the operation of a 4-bit serial shift register. Each block represents one storage cell or flip-flop. 37 Data storage function Example of the operation of a 4-bit parallel shift register 38 19
Counting function Generates sequences of digital pulse that represent numbers Illustration of basic counter operation 39 Fix-Function Integrated Circuits (IC) IC package styles Dual in-line package (DIP) Small-outline IC (SOIC) Flat pack (FP) Plastic-leaded chip carrier (PLCC) Leadless-ceramic chip carrier (LCCC) 40 20
Fix-Function Integrated Circuits (IC) Cutaway view of DIP (Dual-In-line Pins) chip: Chip Plastic case Pins 41 Fix-Function Integrated Circuits Pin 1 Dual in-line package Small outline IC (SOIC) The DIP is larger than the SOIC with the same number of leads. This particular DIP is approximately 0.785 in. long, and the SOIC is approximately 0.385 in. long. 42 21
Fix-Function Integrated Circuits Examples of SMT package configurations 43 Pin numbering 44 22
Integrated Circuit Technologies TTL ECL CMOS NMOS SSI and MSI use TTL or CMOS VLSI and ULSI use CMOS or NMOS 45 Programmable Logic Devices (PLDs) Programmable logic devices can replace fix-function logic - the major advantage is that the logic function of the PLD can be changed without rewiring. SPLDs (Simple Programmable Logic Devices) CPLDs (Complex Programmable Logic Devices) FPGA (Field-programmable gate arrays) 46 23
Programmable Logic Devices (PLDs) 47 Types of SPLDs PAL (Programmable Array Logic) GAL (Generic Array Logic) PLA (Programmable Logic Array) PROM (Programmable Read-only Memory) 48 24
Typical SPLD package 49 Types of CPLDs CPLDs are made using 2 to 64 SPLDs 50 25
General block diagram of a CPLD Logic array block (LAB) Programmable interconnection array (PIA) 51 Basic structure of an FPGA 52 26
Basic configuration for programming a PLD or FPGA 53 PLD programming Schematic Entry Text-Based Entry 54 27
Test Equipment Analog Oscilloscope Digital Oscilloscope Logic Analyzer Logic Probe, Pulser, and Current Probe DC Power Supply Function Generator Digital Multimeter 55 Typical oscilloscopes 56 28
A typical dual-channel digital oscilloscope. 57 Comparison of an un-triggered and a triggered waveform on an oscilloscope. 58 29
Displays of the same waveform having a dc component 59 Typical logic analyzers (Copyright Tektronix, Inc. All rights reserved. Reproduced by permission.) 60 30
Illustration of how a logic probe is used to detect various voltage conditions at a given point in a circuit. 61 Illustration of how a logic pulser and a current tracer can be used to apply a pulse to a given point and check for resulting current in another part of the circuit. 62 31
Typical test instruments 63 Digital System Application 64 32