Digital Elecronics and Microprocessor PCC-EC202 By Dr. Usha Ramdas Kamble, Associate Professor and Head Dept. of E&TC , SGGSIE&T,Nanded 1 COURSE PLAN • Number Systems and Codes 03 • Boolean Algebra and Logic Gates- 03 • Simplification of Boolean Functions- 02 • Combinational Logic Design 08 • Sequential Logic Design 08 • Counters and Shift Registers08 • Semiconductor Memories – 06 • Introduction to VHDL/Verilog02 Total hours-40 Analog vs. Digital Signals The information carrying signals Analog Signal – Why Analog? Example: Telephone voice signal is analog Digital Signals Why Digital? • Consist of pulses or digits with discrete levels or values . • ExPhotoelectric cell output. Coded light output.-Fiber optics Analog and Digital waveforms Advantages of digital over analog • 1 -Ex- Analog meter Vs digital meter • 2 -Ex- Analog clock Vs Digital clock • 3 -EX-Analog audio Vs Digital audio • A-Digital systems are easier to design • B-Information storage is easy • C-Accuracy is greater • D-operation can be programmed • E-Less affected by noise • F -More digital circuitry can be fabricated on IC chips Integrated Circuit • SSI --- <12 gates- ex-Flip Flops • MSI --- 12 to 99- ex-encoders,decoders • LSI --- 100 to 9999- small memories and small microprocessors • VLSI --- 10,000 to 99,999-Large memories and large microprocessors • ULSI---- 100,000 9 10 Digital ICS • Bipolar ICs • Unipolar ICs Information representation • Bit- single • Byte-8 bits • Word• Nibble-4 bits • Half word • Double word Logic Positive Logic Negative Logic New Symbol •To distinguish between positive and negative logic Negative logic NAND (positive logic NOR) Motivation • Applications • Extension of the COURSE • VHDL-Is an acronym for VHSIC (Very High Speed Integrated Circuit Hardware Description Language ) Course Objectives To acquaint students with •1. Digital codes and Boolean Algebra used in digital design. •2. Real time problem implementation using Boolean functions. •3. Combinational and sequential logic design and basic digital design building block. 16 Content of course •Digital Codes, Boolean Algebra and Logic Families: BCD codes , binary codes , error detecting and correcting codes, reflective properties of codes, Unit distance codes, Theorems and properties of Boolean algebra, Boolean functions, Canonicals and standard forms, Other logic operations, Digital logic gates, Digital IC logic families, Logic design examples. 17 • Simplification of Boolean Functions: The K-map method: 2, 3, and 4 variable maps, five and six variable maps, Quine McCluskey method of simplification and NAND-NOR realization. 18 • Combinational Logic Design: Adders, Subtractors, Code converters, Binary parallel adders, Decimal adders, Magnitude comparators, Multiplexers, Demultiplexers, Decoders and Encoders, Signed magnitude numbers and their arithmetic implementation. 19 • Sequential Logic Design: Flip-flops: J-K, D, T, SR flip-flops, Excitation tables of flip-flops, Conversion of flip flops, Design of Flip Flops, Applications of Flip Flops. 20 • Counters and Shift Registers: Asynchronous counters, Synchronous counters, mod-3Counters, mod-5 counters, presettable counters, shift-counters, Up-down counters, Ripple counters, Shift registers, Serial in serial out, Serial in parallel out, Parallel in serial out, and Parallel in parallel out shift registers, Introduction to VHDL/Verilog. 21 • Microprocessors: What is Microprocessor? Princeton and Harvard Architecture, Overview of 8085 Microprocessor Architecture, Pin Description of 8085 microprocessor, Survey of 4/8/16/32 bit Microprocessors, Applications of microprocessors. 22 • Semiconductor Memories: Memory organization and operation, expanding memory size, classification and characteristics of memories, sequential memories, Read only memories, R/W memories, content addressable memories, CCD memories. 23 Course Outcomes (COs): • Upon successful completion of this course, the student will be able to: • Understand fundamentals concepts used in digital circuits. • Able to solve examples of any number system such as trinary, quinary etc and study of digital codes and Boolean algebra. • Able to Design code converter circuits such as binary to gray, Gray to binary, BCD to exess-3 and excess-3 to BCD etc.. • Able to understand and design combinational circuits such as (i) Multiplexers, Demultiplexers using Gates and ICS.(ii) encoders and decoders (iii) Parity generators (iv) Adders and subtractors (v) Logical design problems • Able to understand and design of sequential circuits such as flip flops, counters and registers etc. • Acquire fundamental knowledge of memories such as RAM, ROM, EPROM etc. 24 Text/Reference Books: 1. M. Morris Mano, Digital Logic and Computer Design, PHI Publication, New Delhi. 2. William I. Fletcher, An Engineering approach to Digital Design, PHI Publication, New Delhi. 3. Malvino and D. Leach, Digital Principles and Application, Mc Graw Hill Book Company. 4. R. P. Jain, Modern Digital Electronics, McGraw Hill Book Company. 5. Louis Nashelsky, Introduction to Digital Technology, John Wiley & Sons. 6. Williams H. Gothman, Digital Electronics, PHI Publication, New Delhi. 25 Course Outcomes •At the end of this course students will demonstrate the ability to •1. Digital codes and their applications, code conversions, Boolean functions implementation and simplification, Logic families. •2. Combinational logic circuits, Implementation of logical functions using MUX, DEMUX, Decoders and encoders. •3. Sequential logic circuits such as flip flops, counters and registers, Design of sequential logic circuits. •4. Implementation of small digital application •5. Microprocessors and semiconductor memories. 26 Analog vs digital : Analog and digital signals are used to transmit information, usually through electric signals. In both these technologies, the information, such as any audio or video, is transformed into electric signals. The difference between analog and digital technologies is that – In analog technology, information is translated into electric pulses of varying amplitude. In digital technology, translation of information is into binary format (zero or one) where each bit is representative of two distinct amplitudes. 27 Analog Vs Digital Representat ion Example Waves Analog signal is a continuous signal which represents physical measurements. Digital signals are discrete time signals generated by digital modulation. Uses continuous range of values to represent information Uses discrete or discontinuous values to represent information Human voice in air, analog electronic devices. Computers, CDs, DVDs, and other digital electronic devices Denoted by sine waves Denoted by square waves 28 Analog Vs Digital Analog technology records Technology waveforms as they are. Samples analog waveforms into a limited set of numbers and records them. Subjected to deterioration by noise Data during transmission and write/read transmission cycle. s Can be noise-immune without deterioration during transmission and write/read cycle. More likely to get affected reducing Response to accuracy Noise Less affected since noise response are analog in nature Analog hardware is not flexible. Digital hardware is flexible in implementation. flexibility Can be used in analog devices only. Uses Best suited for audio and video transmission. Best suited for Computing and digital electronics. 29 Analog Vs Digital pplications Thermometer PCs, PDAs Analog signal processing can be done in real time and consumes Bandwidth less bandwidth. There is no guarantee that digital signal processing can be done in real time and consumes more bandwidth to carry out the same information. Memory Stored in the form of wave signal Stored in the form of binary bit Analog instruments usually have a scale which is cramped at lower Errors end and give considerable observational errors. Digital instruments are free from observational errors like parallax and approximation errors. Analog instrument draws large Power power Digital instrument drawS only negligible power Low cost and portable Cost is high and not easily portable Cost 30 Positive and Negative Logic •The same physical gate has different logical meanings depending on interpretation of the signal levels. •Positive Logic •HIGH (more positive) signal levels represent Logic 1 •LOW (less positive) signal levels represent Logic 0 •Negative Logic •LOW (more negative) signal levels represent Logic 1 •HIGH (less negative) signal levels represent Logic 0 •A gate that implements a Positive Logic AND function will implement a Negative Logic OR function, and vice-versa. Positive and Negative Logic •Given this signal level table: Inpu tX Y L L L H H L H H •What logic function is implemented? Positiv (H = Logi (L = e 1) c 0 0) 0 0 1 1 1 1 1 0 Negativ Logi e c 1 1 0 0 1 (H = (L = 0) 1) 1 0 0 0 Outpu t L H H H Positive and Negative Logic (continued) • Rearranging the negative logic terms to the standard function table order: Positiv (H = Logi (L = e 1) c 0 0) 0 0 0 1 1 1 1 0 1 1 1 OR Negativ (H = Logi (L = e 0) c 0 1) 0 0 0 0 1 1 0 0 1 1 1 AND Logic Symbol Conventions •Use of polarity indicator to represent use of negative logic convention on gate inputs or outputs X Y X Y Positive Logic Z CK T Logic Circuit XY Z Z X Y Z Negative Logic LL LH HL HH L H H H Digital Logic • Digital logic is the representation of signals and sequences of a digital circuit through numbers. • It is the basis for digital computing and provides a fundamental understanding on how circuits and hardware communicate within a computer. 35 Logic Gate • A Digital Logic Gate is an electronic device that makes logical decisions based on the different combinations of digital signals present on its inputs. • Digital logic gates may have more than one input but generally only have one digital output. 36 Logic • a particular mode of reasoning viewed as valid or faulty 37 Graduate Aptitude Test in Engineering Syllabus 38 Linear Algebra: Matrix Algebra, Systems of linear equations, Eigen values andeigenvectors. Calculus: Mean value theorems, Theorems of integral calculus, Evaluation of definite and improper integrals, Partial Derivatives, Maxima and minima, Multiple integrals, Fourier series. Vector identities, Directional derivatives, Line, Surface and Volume integrals, Stokes, Gauss and Green's theorems 39 Differential equations: First order equation (linear and nonlinear), Higher order linear differential equations with constant coefficients, Method of variation of parameters, Cauchy's and Euler's equations, Initial and boundary value problems, Partial Differential Equations and variable separable method. Complex variables: Analytic functions, Cauchy's integral theorem and integral formula, Taylor's and Laurent' series, Residue theorem, solution integrals. 40 Probability and Statistics: Sampling theorems, Conditional probability, Mean, median, mode and standard deviation, Random variables, Discrete and continuous distributions, Poisson, Normal and Binomial distribution, Correlation and regression analysis. Numerical Methods: Solutions of non-linear algebraic equations, single and multi-step methods for differential equations. Transform Theory: Fourier transform,Z-transform. transform, Laplace 41 • GENERAL APTITUDE(GA): •Verbal Ability: English grammar, sentence completion, verbal analogies, word groups, instructions, critical reasoning and verbal deduction. 42 Electronics and Communication EngineeringNetworks: Network graphs: matrices associated with graphs; incidence, fundamental cut set and fundamental circuit matrices. Solution methods: nodal and mesh analysis. Network theorems: superposition, Thevenin and Norton's maximum power transfer, Wye-Delta transformation. Steady state sinusoidal analysis using phasors. Linear constant coefficient differential equations; time domain analysis of simple RLC circuits, Solution of network equations using Laplace transform: frequency domain analysis of RLC circuits. 2-port network parameters: driving point and transfer functions. State equations for networks 43 •Electronic Devices: Energy bands in silicon, intrinsic and extrinsic silicon. Carrier transport in silicon: diffusion current, drift current, mobility, and resistivity. Generation and recombination of carriers. p-n junction diode, Zener diode, tunnel diode, BJT, JFET, MOS capacitor, MOSFET, LED, p-I-n and avalanche photo diode, Basics of LASERs. Device technology: integrated circuits fabrication process, oxidation, diffusion, ion implantation, photolithography, n-tub, p-tub and twin-tub CMOS process. 44 Analog Circuits: Small Signal Equivalent circuits of diodes, BJTs, MOSFETs and analog CMOS. Simple diode circuits, clipping, clamping, rectifier. Biasing and bias stability of transistor and FET amplifiers. Amplifiers: single-and multi-stage, differential and operational, feedback, and power. Frequency response of amplifiers. Simple op-amp circuits. Filters. Sinusoidal oscillators; criterion for oscillation; single-transistor and op-amp configurations. Function generators and wave-shaping circuits, 555 Timers. Power supplies. 45 • Digital circuits: Boolean algebra, minimization of Boolean functions; logic GATEs; digital IC families (DTL, TTL, ECL, MOS, CMOS). Combinatorial circuits: arithmetic circuits, code converters, multiplexers, decoders, PROMs and PLAs. Sequential circuits: latches and flip-flops, counters and shift-registers. Sample and hold circuits, ADCs, DACs. Semiconductor memories. Microprocessor(8085): architecture, programming, memory and I/O interfacing. 46 • Signals and Systems: Definitions and properties of Laplace transform, continuous-time and discrete-time Fourier series, continuous-time and discrete-time Fourier Transform, DFT and FFT, z-transform. Sampling theorem. Linear Time-Invariant (LTI) Systems: definitions and properties; causality, stability, impulse response, convolution, poles and zeros, parallel and cascade structure, frequency response, group delay, phase delay. Signal transmission through LTI systems. 47 •Control Systems: Basic control system components; block diagrammatic description, reduction of block diagrams. Open loop and closed loop (feedback) systems and stability analysis of these systems. Signal flow graphs and their use in determining transfer functions of systems; transient and steady state analysis of LTI control systems and frequency response. Tools and techniques for LTI control system analysis: root loci, Routh-Hurwitz criterion, Bode and Nyquist plots. Control system compensators: elements of lead and lag compensation, elements of Proportional-Integral-Derivative (PID) control. State variable representation and solution of state equation of LTI control systems. 48 •Communications: Random signals and noise: probability, random variables, probability density function, autocorrelation, power spectral density. Analog communication systems: amplitude and angle modulation and demodulation systems, spectral analysis of these operations, superheterodyne receivers; elements of hardware, realizations of analog communication systems; signal-to-noise ratio (SNR) calculations for amplitude modulation (AM) and frequency modulation (FM) for low noise conditions. Fundamentals of information theory and channel capacity theorem. Digital communication systems: pulse code modulation (PCM), differential pulse code modulation (DPCM), digital modulation schemes: amplitude, phase and frequency shift keying schemes (ASK, PSK, FSK), matched filter receivers, bandwidth consideration and probability of error calculations for these schemes. Basics of TDMA, FDMA and CDMA and GSM. 49 •Electromagnetics: Elements of vector calculus: divergence and curl; Gauss' and Stokes' theorems, Maxwell's equations: differential and integral forms. Wave equation, Poynting vector. Plane waves: propagation through various media; reflection and refraction; phase and group velocity; skin depth. Transmission lines: characteristic impedance; impedance transformation; Smith chart; impedance matching; S parameters, pulse excitation. Waveguides: modes in rectangular waveguides; boundary conditions; cut-off frequencies; dispersion relations. Basics of propagation in dielectric waveguide and optical fibers. Basics of Antennas: Dipole antennas; radiation pattern; antenna gain. 50 IES : Indian Engineering Services •Digital Electronic Circuits – Digital electronics circuits correspond to signals by distinct bands of analog level. All levels inside a band symbolize the identical signal status. This includes Transistor as a switching element; Simplification of Boolean functions, Karnaguh map , Boolean algebra, and applications; IC logic families : DTL, ECL, TTL, NMOS, CMOS and PMOS gates and their comparison; Full adder , Half adder; IC Logic gates and their characteristics; Digital comparator; Multiplexer Demulti-plexer; Flip flops. J-K, R-S, T and D flip-flops; Combinational logic Circuits; Different types of registers and counters Waveform generators. Semiconductor memories.A/D and D/A converters. ROM an their applications. 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 Objectives • Describe the characteristics of an analog signal. • Describe the characteristics of a digital signal. • Explain the benefits of converting an analog voice signal into a digital signal. • Explain how analog signals are connected from a transmitter to a receiver. 94 Objectives (continued) • Explain how digital signals are coupled from a coder to a decoder. • Explain what Alternate Mark Inversion (AMI) is. • Explain what Manchester coding is. • Explain what differential Manchester coding is. 95 Objectives (continued) • Explain Non-Return to Zero Level (NRZ-L) and Non-Return to Zero Invert (NRI) signaling. • Explain the correlation between bandwidth and power loss over the local loop. 96 7.1 Communication Signals and Protocols •A communication protocol in telecommunications will specify: • What type of signal is to be used for communication. • How the signal is to be manipulated. • How the signal is to be placed on the transmission facility. •An analog signal is an electrical signal with continuously varying amplitude. •A digital signal is a signal that can assume one of several discrete states. 97 Sine Waves 98 Voice Signal Composed of Many Sine Waves 99 Digital Signal 100 7.2 Analog Signal •All electrical signals with varying amplitudes are called analog signals (analog is short for “analogous”). •The transceiver was a device that contained a coil of wire suspended inside a magnet. •The limitations of the transceiver were overcome by the development of the carbon granule transmitter. •Devices that convert a signal from one form of energy to another are called transducers. 101 Conversion of Airwaves into Electrical Waves 102 Electrical Power to the Transmitter 103 Telephone Receiver and Hybrid Network 104 7.3 Connecting the Telephone to the Central Exchange • The telephones at our residences and any small businesses connect via one pair of wires to a switching system called the local central office. • Since the switching system is located at the center of the hub, it is called the central office, central exchange, or central. • The pair of wires that connects the telephone to the central exchange is called the local loop. 105 Central Office Exchange Territory 106 Main Distributing Frame (MDF) 107 Cables from Main Distributing Frame to Line Equipment 108 Telephone Circuit 109 7.4 Analog Signal in the Local Loop •The telephone receives its power from the central exchange via the line circuit in the exchange. •When a telephone is taken off hook, electric current will flow. •The transmitter of a telephone and the electronic chip that provides the tones for a touchtone dial require about 8 V to function properly. •A varistor in the circuit limits current flow to a maximum of 60 mA because a current of more than 60 mA contributes to the possibility of crosstalk. 110 Varistor of Telephone 111 Twisted-Pair Wire • Twisting the wires that serve one telephone around each other eliminates crosstalk. • The tighter the twist, the higher-frequency signal it can carry. • Data grade (CAT-5) cable has many more twists per inch than voice grade (CAT-3) cable. 112 7.5 Coupling Analog Signals from One Circuit to Another • Transformers • Capacitor Coupling • Silicon Controlled Rectifiers (SCRs) 113 Coupling Analog Signals from One Circuit to Another •When the transmitter of the telephone converts a voice signal into an analog electrical signal, the analog signal is a continuously varying electrical signal. •The analog signal is a continuously varying dc signal. • Current flows in one direction only. • The signal looks like an ac signal that has a center point of 40 mA. •We can use transformers or capacitors to couple voice signals from one circuit to another while isolating the dc voltages of these circuits from each other. 114 Voice Signal in the Local Loop 115 Transformers Used to Couple Voice Signals •The 40 mA of current through the primary winding sets up a magnetic field of a certain strength. •When the local loop transports an analog electrical voice signal to the primary winding of the transformer, the analog signal causes the magnetic field established by the primary winding to vary. •Variations in the magnetic field cause an analog signal to be induced into the secondary winding and into the circuit connected to the secondary winding. 116 Transformers Used to Couple Voice Signals 117 Capacitor Coupling Voice Signals • In the capacitor-coupled circuit, the 40 mA of current in the local loop causes the capacitor to charge to a certain value. • When the local loop circuit transports an analog electrical voice signal, the analog signal causes the electric charge on the capacitor to vary in unison with the changes of the analog signal. • This changing charge on the capacitor is coupled to the next circuit. 118 Capacitor Coupling Voice Signals 119 Strowger Connector Switch 120 Silicon Controlled Rectifiers •Today, we do not use either transformer or inductive-capacitive battery feed circuits for coupling voice signals. •The line circuit that interfaces a local loop to the central exchange includes a codec chip and a hybrid network in the circuit. • The codec chip converts all analog signals received from the local loop to digital signals. • Since the analog voice signal is converted into a digital signal, we cannot use the same techniques to couple the signal from one circuit to another. 121 Silicon Controlled Rectifiers •The technique used to couple digital signals from one circuit to another is to gate them using silicon controlled rectifiers (SCRs). •Electronic gates are placed between two circuits and are turned on when we wish to connect signals from one circuit to another. • Voice signals at the telephone are converted into analog electrical signals at the telephone. • Analog electrical signals are converted to digital signals at the central exchange. • Digital signals are connected via the PSTN switching network to a receiver for decoding. 122 Coupling Voice Signals via Codecs 123 7.6 Conversion of Voice into Digital Signals •The standard used in the PSTN to convert analog voice signals into digital signals is pulse code modulation (PCM). •Other processes are available: • Adaptive Differential Pulse Code Modulation (ADPCM) • Predictive Pulse Code Modulation •Digital voice signals are connected from one point to another by connecting the coder portion of one codec via a transmission medium to the decoder portion of another codec. 124 7.7 Conversion of the PSTN into a Digital Network •Using digital signals to represent voice or data is much more efficient than using analog signals. •Analog signals can be carried only so far by a transmission medium before the signal gets so weak that it must be amplified. This introduces more noise into the signal. •Digital signal regenerators strip all noise out of a signal by regenerating crisp, clean, new 1s and 0s. •Although the circuitry between central exchanges is almost 100% digital, the circuitry that connects our telephone to the central exchange is mostly analog. 125 Effects of Noise 126 7.8 Digital Data over the Local Loop • Integrated Services Digital Network (ISDN) • Asymmetrical Digital Subscriber Line (ADSL) 127 Integrated Services Digital Network (ISDN) •Provides the ability to place digital data directly into the ISDN equipment on each end of the circuit. •Uses twisted-pair copper wire to connect equipment on the customer’s premises to the local exchange. • ISDN lines do not connect to regular line circuits at the central exchange; they connect to special line interface circuits called ISDN line circuits. • If an ISDN line is to be used for the transmission of a voice signal, The ISDN terminal equipment on the customer’s premises contains a codec, which converts the analog signal into a 64,000 bps digital signal. 128 Asymmetrical Digital Subscriber Line (ADSL) •This service is classified as a digital service, but in fact uses a modem, and the digital data on the customer’s premises will be used to modulate an analog signal transmitted to the central exchange. • Like ISDN, this ASDL service cannot be interfaced to the exchange using a regular line circuit. • ASDL lines are connected at the central exchange to another ASDL modem. • The ASDL modem in a central exchange is part of a device called a Digital Subscriber Line Access Multiplexer (DSLAM). •ADSL uses high-frequency analog signals, which are modulated by the digital data to be carried. 129 7.9 Digital Data Coding Techniques •Alternate Mark Inversion (AMI) •Non-Return to Zero – Level (NRZ-L) •Non-Return to Zero – Invert (NRZ-I or NRI) •Manchester •Differential Manchester 130 Alternate Mark Inversion Signal 131 NRZ-L Signal 132 NRI Signal 133 Manchester Signal 134 Differential Manchester 135 7.10 Bandwidth vs. Power Loss • Bandwidth describes the range of frequencies found within a band. • The bandwidth of a signal determines the information carrying capacity of the signal. • When we wish to transfer information over the local-loop twisted pair, we need high-frequency signals to transfer high data rates. 136 Bandwidth vs. Power Loss •The higher the frequency transmitted, the greater the power loss incurred due to: • Distributed capacitance that exists between the two wires of the local loop. • The inductance in the wire itself. •When a signal is carried by twisted-pair copper wire, it is especially susceptible to interference (noise) from signals in adjacent wire pairs. •It is important to maintain a high signal-to-noise ratio (SNR). 137 7.11 Summary • Telecommunications requires a transmitter, medium, and receiver. • To ensure accurate transmission and reception of signals: • The transmitter and receiver must use the same protocols. • Protocols specify the rules and procedures that must be followed to set up and maintain accurate, reliable communication. 138 Summary • The signals used in telecommunications are either analog or digital. • An analog signal is a signal with continuously varying amplitude. • A digital signal assumes one of a number of discrete voltage levels. • The transmitter of a telephone creates analog electrical signals. The local loop was designed to handle these signals efficiently. 139 Summary • Almost all central exchanges used in the PSTN are digital switching systems. • The line interface to these switching systems contains a codec. • Converts the analog voice signal into a 64,000 bps digital signal. • Uses PCM 140 Summary •The wider the bandwidth of an analog signal, the more information it is capable of carrying in a given timeframe. •The use of high-bandwidth signals also makes the data more susceptible to interference from noise. • Higher-frequency signals are needed to provide wider bandwidths. • Higher-frequency signals encounter higher power losses when transmitted over twisted-pair copper wire. 141