9.2 Digital Logic, DIO and DAC why digital logic?

Slides:



Advertisements
Similar presentations
CT455: Computer Organization Logic gate
Advertisements

Computer Science 210 Computer Organization Introduction to Logic Circuits.
Programmable Logic Controllers.
Analog-to-Digital Converter (ADC) And
Digital Electronics Dan Simon Cleveland State University ESC 120 Revised December 30, 2010.
SUPLEMENTARY CHAPTER 1: An Introduction to Digital Logic The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Logic Circuits In today’s lesson we will look at: the symbols for NOT, AND, OR and EOR using truth tables to represent logic circuits two new operators.
Simple One and Two Input Logic Gates Truth Tables and Function Tables Based Upon 0 – 5 V.
1 Survey of Computer Science CSCI 110, Spring 2011 Lecture 16 Digital Circuits, binary Numbers.
Binary Numbers.
XOR and XNOR Logic Gates. XOR Function Output Y is TRUE if input A OR input B are TRUE Exclusively, else it is FALSE. Logic Symbol  Description  Truth.
SUPLEMENTARY CHAPTER 1: An Introduction to Digital Logic The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
Hardware Logic Diagrams - The Basics - Marshall Thomas CIS 21JA – Fall Quarter 2012.
4. Electrons and electronics 4.5 Digital electronics.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
Combination of logic gates  Logic gates can be combined to produce more complex functions.  They can also be combined to substitute one type of gate.
CHAPTER-2 Fundamentals of Digital Logic. Digital Logic Digital electronic circuits are used to build computer hardware as well as other products (digital.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
1 Ethics of Computing MONT 113G, Spring 2012 Session 5 Binary Addition.
1 Ethics of Computing MONT 113G, Spring 2012 Session 1 Digital Circuits, binary Numbers Course webpage:
COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES.
Minute Paper 4/4/04 Z=50+j86.7=100
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
 A transistor is the basic building block of electronic components.  The average computer may have millions of them within its circuits.  Essentially,
Logic Gates Learning Objectives Learn that there is a one-to-one relationship between logic gates and Boolean expressions Learn how logic gates are combined.
Instructor:Po-Yu Kuo 教師:郭柏佑
Creating logic gates with Minecraft
ECE 3130 Digital Electronics and Design
Digital-to-Analog Analog-to-Digital
What is a DAC? A digital to analog converter (DAC) converts a digital signal to an analog voltage or current output DAC.
ECE 3130 Digital Electronics and Design
Introductory Lecture on Digital Electronics
Digital-to-Analog Analog-to-Digital
Instructor:Po-Yu Kuo 教師:郭柏佑
Circuits Logic in Hardware.
ECE 331 – Digital System Design
Chapter 2.3 Binary Logic.
Basic Logical Operations (Fascinating)
KS4 Electricity – Electronic systems
KS4 Electricity – Electronic systems
Digital Signals Digital Signals have two basic states:
Summary Half-Adder Basic rules of binary addition are performed by a half adder, which has two binary inputs (A and B) and two binary outputs (Carry out.
XOR, XNOR, and Binary Adders
Digital Electronics, Software and Hardware
Practice #Digital Logic Mr. Burleson
Computer Science 210 Computer Organization
Fundamentals of Computer Science Part i2
Digital Logic Structures Logic gates & Boolean logic
XOR, XNOR, & Binary Adders
Number Systems Decimal (base 10) { }
Logic Gates.
JC Technology Logic Gates.
Boolean Algebra.
Week 7: Gates and Circuits: PART II
Instructor:Po-Yu Kuo 教師:郭柏佑
Digital Logic.
Logic Gates.
Logic Gates.
KS4 Electricity – Electronic systems
GCSE Computer Science – Logic Gates & Boolean Expressions
Digital Logic.
DIGITAL ELECTRONICS B.SC FY
Logic Gates.
XOR, XNOR, and Binary Adders
XOR Function Logic Symbol  Description  Truth Table 
Digital Circuits and Logic
XOR, XNOR, and Binary Adders
Logic Gates AIM: To know the different types of logic gate
Logically, the output will be 1
Presentation transcript:

9.2 Digital Logic, DIO and DAC why digital logic? truth tables for digital logic P NOT P AND P OR P XOR P NAND P NOR examples of logic circuits digital input and output (DIO) digital-to-analog conversion (DAC) 9.2 : 1/11

Why Digital Logic? High-voltage instruments are often interlocked to protect the user. Each access point is connected to a switch that has a binary output (0 closed, 1 open). The high voltage is shut down if any access point is opened. This is accomplished with OR logic. shut_off? = sw1 OR sw2 OR sw3 OR sw4 Before a spectrum is recorded it might be necessary for the user to click on a scan button, the monochromator be set to the starting wavelength, and the sample chamber door be shut. record? = scan AND startl AND door_shut These types of logic decisions can be made in hardware or software. The hardware option simplifies the computer program and reduces the number of bits of logic information that need to be input to the computer. 9.2 : 2/11

Logic Gates and Truth Tables (1) For electronics a 1 is taken as true and a 0 as false. The most common logic family is transistor-transistor logic (TTL) where +5 V = 1 and 0 V = 0. NOT gate: Q = NOT A also written as A Q 0 1 1 0 AND gate: Q = A AND B also written as AB A B Q 0 0 0 0 1 0 1 0 0 1 1 1 9.2 : 3/11

Logic Gates and Truth Tables (2) OR gate: Q = A OR B also written as A+B A B Q 0 0 0 0 1 1 1 0 1 1 1 1 XOR gate: Q = A XOR B also written as AB 1 1 0 note that OR and XOR differ when both inputs are 1 9.2 : 4/11

Logic Gates and Truth Tables (3) NAND gate: Q = A NAND B also written as A B Q 0 0 1 0 1 1 1 0 1 1 1 0 NOR gate: Q = A NOR B also written as 0 1 0 1 0 0 9.2 : 5/11

Example Logic Circuit (1) use OR, NAND and AND logic to create XOR logic A B (OR) (NAND) ()AND() 0 0 0 1 0 0 1 1 1 1 1 0 1 1 1 1 1 1 0 0 9.2 : 6/11

Example Logic Circuit (2) use XOR, AND and OR logic to create an adder with carry from the right and carry to the left: A + B + Cin = S + Cout the required truth table is given below (rotated 90) Cin 0 0 0 0 1 1 1 1 A 0 0 1 1 0 0 1 1 B 0 1 0 1 0 1 0 1 S 0 1 1 0 1 0 0 1 Cout 0 0 0 1 0 1 1 1 to see this circuit in action see: www.play-hookey.com 9.2 : 7/11

Digital Input & Output (DIO) binary output generated by external digital logic often needs to be communicated to a computer program similarly, a logic calculation performed by software often needs to be communicated to an external circuit the number of bits available for DIO depends upon the specific hardware with multiples of 8 being common for output the computer sets the bits and the register holds the values until they are read by the external circuit for input the external circuit sets the bits and the register holds the values until they are read by the computer program 9.2 : 8/11

DIO Continued besides the DIO registers, control bits (flags) are necessary For example, an "input ready" bit tells the computer that a new value is ready for reading. After the computer reads the DIO it might set an "input read" bit that tells the external circuit that it can provide updated information. This is called handshaking. A external circuit can "watch" an "output ready" control bit. With this approach the logic output will not be read until the computer has updated the DIO. if the experiment has voltages that might inadvertently damage the DIO circuitry (or worse get into the computer), the outputs can be optically isolated using light emitting diode/photodiode combinations when the external circuit uses high voltage or the instrument is in a corrosive environment, fiber optics couplers can transfer the digital logic information 9.2 : 9/11

Digital-to-Analog Conversion Often a digital value generated by a program needs to be converted into an external voltage. An example might be the generation of a voltage ramp in electrochemistry. In the DAC shown below individual bits control a transistor switch that provides current to the op-amp. The resistor ladder makes the current associated with each bit to be exactly 1/2 that of the bit to the left. The current from all bits is summed. The op-amp behaves as a current-to-voltage converter. 9.2 : 10/11

DAC Performance when all the binary combinations are output in order, the DAC output resembles a staircase commercial DACs have from 4 to 18 bits (16 to 262,144 steps) common output ranges might be 0 to 10 V or -5 to +5 V some DACs have software controlled voltage ranges most DACs can output new voltages every millisecond permitting the generation of arbitrarily-shaped waveforms 9.2 : 11/11