* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Module 1- Introduction to Digital Concepts
Survey
Document related concepts
Electronic engineering wikipedia , lookup
Alternating current wikipedia , lookup
Voltage optimisation wikipedia , lookup
Time-to-digital converter wikipedia , lookup
Resistive opto-isolator wikipedia , lookup
Immunity-aware programming wikipedia , lookup
Flip-flop (electronics) wikipedia , lookup
Switched-mode power supply wikipedia , lookup
Mains electricity wikipedia , lookup
Buck converter wikipedia , lookup
Tektronix analog oscilloscopes wikipedia , lookup
Oscilloscope types wikipedia , lookup
Rectiverter wikipedia , lookup
Analog-to-digital converter wikipedia , lookup
Pulse-width modulation wikipedia , lookup
Transcript
Introduction to Digital Electronics, Module 1: Intro to Digital Concepts 1 Module 1- Introduction to Digital Concepts Introduction: Any measurement that has a range of values, such as temperature or pressure, is an analog quantity. A digital value has either an ON state (higher voltage level) or an OFF state (zero voltage level). Analog values are contaminated by small variations in voltage levels that naturally occur in electronic circuits. These small voltage variations, called noise, do not affect digital systems because they read only an ON and an OFF state. This section explores how data is sent, received, and recorded using binary as opposed to analog voltage levels. Concept 1-1: Analog quantities use voltage or current levels to represent a measured quantity that has a range of values. Digital quantities are sequences of high or low voltage levels that represent an analog value. Digital signals are affected less by electrical noise than analog signals. An analog quantity can be represented by a voltage level, a temperature, or some graduated value on a scale that can have multiple levels or values. A digital quantity will always be represented by a binary sequence of bits, where each bit will only have a high or a low voltage level. This makes the digital signal easier to distinguish from a noise voltage that might be present. The actual value must be converted from binary to decimal before we can understand what the number represents. Definition 1.1: Binary Binary means two levels, high or low. Typically a voltage level below 0.5 volts is considered a low level, or a logical 0. A voltage level from 1.5 volts to 5 volts is considered a high level, or a logical 1. Definition 1.2: Digital Digital refers to systems that use binary numbers to represent numeric values. Each digit in a binary number is weighted according to its position in the number, allowing combinations of 1’s and 0’s, or binary digits, to represent larger values. Each digit position in a decimal number is worth ten times the value of the digit to its right; each digit in a binary number is worth twice the value of the digit to its right. Definition 1.3: Bit Each digit in a binary number is called a bit. Introduction to Digital Electronics, Module 1: Intro to Digital Concepts 2 Concept 1-2: Analog values can be represented by a series of binary digits, logic levels, and digital waveforms. The key to reading a binary value is that it can have only a count of one before a carry is generated. When the count reaches two, a carry is generated. By comparison with the more familiar decimal system, a carry is generated when a count of 10 is reached. Decimal has ten digits, counting from 0 through 9. Binary has only two counting digits, 0 and 1. One number above a count of 9 in decimal is the number ten. One number above the count of 1 in binary is the binary number 1 0, or two. This gives rise to the decimal weighting of 10 for each number position, and the binary weighting of 2 for each number position. In decimal, each progressive number position is worth 10 times that of the previous number; 1, 10, 100, 1000, .... . In binary, each progressive bit position from Least Significant Bit (LSB), which is the right most position, to Most Significant Bit (MSB), furthest to the left in the number, is worth 2 times the previous bit position; 1, 2, 4, 8, 16, 32, 64, ..... . Mathematically, for any based number system, the position weight, or value, is equal to the base number (10 for decimal, 2 for binary) raised to the power of its position from 0 to n. For example, the binary number: 1 0 0 1 = 1 * 2^3 + 0 * 2^2 + 0 * 2^1 + 1 * 2^0 = 9. Digital sequences can be physically realized by bringing out one wire for each bit, assigning each wire to a bit position, and looking for a high = 1 or a low = 0 voltage on each wire. This is how a parallel binary number is sent from one circuit to another. A single wire can be used to send the same binary data, but one bit must follow the next until the entire sequence of bits is sent. This is called serial binary data transmission. When serial data is sent, it gives rise to a binary waveform, or the electrical sequence of ones and zeros being sent. Ideally, this sequence should be a perfect square wave, but it is not. The textbook explains the electrical properties of this electrical sequence of pulses. Be sure you understand the concepts of rise time, fall time, pulse width, period, frequency, duty cycle, ringing, overshoot, noise, synchronous clocking and asynchronous data. Introduction to Digital Electronics, Module 1: Intro to Digital Concepts 3 Definition 1.4: Bus In a parallel binary system, each bit has its own wire to send it from one circuit to another. The individual wires taken together are called a bus. Definition 1.5: Parallel data When each bit of a binary number is brought out electrically on its own wire, the binary data is parallel data. Definition 1.6: Serial data When a binary value is sent from one electronic circuit to another over a single wire, each bit must be sent in a sequence of serial ones and zeros until each bit is sent. This sequence of binary changes on a single wire represents a number of binary bits and is said to be a serial data stream or simply, “serial data”. Definition 1.7: Byte An eight bit binary number is also called a byte. Definition 1.8: Periodic A waveform can be either periodic or non-periodic. Periodic means that the waveform repeats itself every cycle, or every low-to-high-tolow transition. A clock signal that repeats itself every cycle is an example of a periodic waveform. Definition 1.9: Non-periodic Non-periodic waveforms go high-to-low-to-high in a non-predictable sequence, and stay high or low for a non-predictable length of time. A serial data sequence may generate a non-periodic waveform. Definition 1.10: Rise time (tr) In nature, nothing can happen instantaneously. Even though a binary electrical waveform can go from a low state to a high very rapidly, it still requires a finite amount of time for this transition to happen. The time required for a waveform to go from a 10% low to 90% high is called the rise time. Definition 1.11: Fall time (tf) The time required for a waveform to go from 90% high to 10% low. Introduction to Digital Electronics, Module 1: Intro to Digital Concepts 4 Definition 1.12: Pulse width (PWL and PWH) The time a pulse is either in a low state or in a high state is called the pulse width. It is measured on the waveform at the 50% level. If a low pulse is being measured, it is called the “pulse width low” or PWL. If a high pulse is being measured, it is called the “pulse width high” or PWH. SERIAL DATA WAVEFORM tr PWH 90% 50% 10% tf PWL tr = rise time or time from 10% to 90% of the waveform. tf = fall time or time from 90% to 10% of the waveform. PWH = pulse width high taken at the 50% line on the high pulse PWL = pulse width low taken at the 50% line on the low pulse 1 0 1 0 0 1 1 The same data used to send out the serial data sequence 1 0 1 0 0 1 1. Definition 1.13: Period (seconds, s) Period implies that the waveform is periodic or repeats itself each cycle, or low to high to low transition. The time required for this complete cycle is called the period. It is measured from the 50% point on the first transition to the 50% point on the next. The period of a waveform is measured in seconds or smaller divisions of seconds such as milliseconds (ms) - thousands of a second, microseconds (us) – millionths of a second, or picoseconds (ps) – billionths of a second. Introduction to Digital Electronics, Module 1: Intro to Digital Concepts 5 Definition 1.14: Frequency (Hertz or cycles per second, Hz) The number of cycles or transitions per second is called the frequency. Frequency is measured in units call Hertz or Hz. The frequency of a waveform can be calculated by measuring the period, and then taking the mathematical inverse. f = 1/T where T is the period in seconds or fractions of a second. Definition 1.15: Overshoot and ringing As the voltage of a waveform rises, it tends to overshoot, or rise above, its normal high level for a very short time, then it will drop below its norm high level. It will continue to do this for several transitions, with each one getting closer to its normal high level until it finally reaches the correct high level. The initial voltage that goes too high is called the overshoot. The process of going above and below the final normal high level for a period of time at the beginning of a low to high transition is called ringing. Its electrical signature is similar to that of the audio waveform of a bell or chime. Definition 1.16: Noise Any electrical disturbance that causes an unwanted change in a voltage level or a waveform in an electronic circuit is called noise. Noise can originate from automobile ignitions, lightning, or from within the circuit itself. When a switch opens or closes, it causes a burst of electrical noise. Definition 1.17: Synchronous clocking Synchronous means periodic, or an event that repeats itself in a nonvarying, uniform way. In digital electronics, a synchronous signal or periodic clock signal is used to keep data-passing events in step. This is called synchronous clocking. An example of synchronous clocking is the keyboard on a typical computer. It sends out a stream of serial data that represents each key that is pressed, and a synchronous clock signal that goes high at each time a data bit is ready to be read. Introduction to Digital Electronics, Module 1: Intro to Digital Concepts 6 Definition 1.18: Asynchronous data If serial data is sent out without an accompanying clock signal to show where each bit of the serial data is to be read, the data is said to be asynchronous. Asynchronous data uses clever methods of burying the clock in the data stream so it does not require a separate clock wire. This concept will be studied in some depth in the module on data transmission. Definition 1.19: Duty cycle The duty cycle is the percentage of time the waveform is high as compared to the period of the waveform. It is calculated by dividing the PWH or pulse width high time by the period of the waveform, and then multiplying by 100 to get percentage. Duty Cycle = [(PWH)/(period)] x 100% Concept 1.3: There are three basic logic operations and logical functions. All operations that manipulate binary 1’s and 0’s and use them to control computers and electronic equipment reduce down to three simple operations: AND, OR and INVERT. A logic gate is a device that will input two or more binary bits at a time, and either AND them, OR them, or INVERT them to accomplish higher mathematics and control functions. We will start by learning what the AND, OR and INVERT functions do, and how the accompanying gates work. The expanded NAND, NOR and XOR gates combine traditional AND, OR and INVERT functions for additional capabilities. Introduction to Digital Electronics, Module 1: Intro to Digital Concepts An INVERTER is the simplest of all gates. It outputs the opposite binary level that it inputs. A logical "1" becomes a logical "0", and a logical "0" becomes a logical "1". It does nothing else to the data. An AND gate has two or more input lines for parallel binary bits, and one output bit. The rule is that if all inputs are a high, or a logical "1", then the output is a high, or a logical "1". The output is a logical "0" for any other binary combination of ones and zeros on the input lines. An OR gate has two or more input lines for parallel binary bits, and one output bit. The rule is that if any of the inputs are a high or a logical "1", then the output is a high or a logical "1". The only time that the output is a low or a logical "0" is when all inputs are low or at logical "0". 7 Introduction to Digital Electronics, Module 1: Intro to Digital Concepts 8 A NAND gate is produced by inverting the output of an AND gate, or by inverting all of the inputs to an OR gate. The rule simply becomes the inverse of the AND gate, or if all inputs to the NAND gate are high, or at a logical "1", then the output is low, or at a logical "0". The output is high or at logical "1" for all other input combinations. A NOR gate is produced by inverting the output of an OR gate, or inverting all of the inputs to an AND gate. The output becomes the inverse of the OR gate, and the rule is the inverse of the OR gate as well. If any of the inputs to the NOR gate are at a high or a logical "1", then the output becomes a low or a logical "0". The output will only be at a high or logical "1" state if all inputs to the NOR gate are at low, or logical "0" states. Introduction to Digital Electronics, Module 1: Intro to Digital Concepts 9 The last gate considered here is the EXCLUSIVE OR, or XOR gate. The XOR gate has the rule that if all of the inputs are the same, either at a high, or logical "1", or all low, or at a logical "0", then the output is at a low or logical "0". If any of the inputs differ from any of the other inputs, the output becomes a high, or a logical "1". The XOR is often called the "binary comparator gate". Introduction to Digital Electronics, Module 1: Intro to Digital Concepts 10 Concept 1-4: Complex digital logic circuits are integrated into single device packages. Modern technology has developed ways of putting millions of gates on a single piece of silicone less than 1 mm square. These small “chips” of silicone are packaged in plastic cases with small electrical connections going from the silicone to the leads on the case. The cases come in a variety of sizes, shapes and pin configurations. One of the most common is to have a case with two rows of parallel pins running down the sides. This is called a dual inline parallel package (DIP). For this course we will use mostly DIP type integrated circuits (IC's). Concept 1.5: Familiarize yourself with laboratory testing and troubleshooting equipment. You should understand how to adjust and use the following equipment: 1. digital voltmeter - to measure resistance, continuity, voltage, and current. 2. oscilloscope - to observe voltage waveforms. 3. frequency counter - to measure oscillator clock frequencies. 4. logic probe - to observe the logical state of a binary signal ("1" or "0"), or to inject a test pulse into a logic circuit. 5. laboratory power supply - to generate the regulated +5 volts power and to set up the current limiting feature of the power supply to protect your circuit under test. 6. function generator - to generate a 5 Vp square wave function that can drive a logic circuit being tested.