Computer Sensing and Control How is binary related to what we are trying to accomplish in electronics? The PC GadgetMaster II uses binary to communicate.

Slides:



Advertisements
Similar presentations
System Integration and Performance
Advertisements

Introduction to Micro-controllers Anurag Dwivedi.
Combinational Circuits
M. Mateen Yaqoob The University of Lahore Spring 2014.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
Bits and Bytes + Controlling 8 LED with 3 Pins Binary Counting and Shift Registers.
CS-334: Computer Architecture
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 3: Input/output and co-processors dr.ir. A.C. Verschueren.
Advanced Topics Object-Oriented Programming Using C++ Second Edition 13.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
1 Programming & Programming Languages Overview l Machine operations and machine language. l Example of machine language. l Different types of processor.
OTHER COMBINATIONAL LOGIC CIRCUITS
Group 7 Jhonathan Briceño Reginal Etienne Christian Kruger Felix Martinez Dane Minott Immer S Rivera Ander Sahonero.
PC 232 Serial Ports Ports –Connectors at back of PC –Plus related internal electronics to send/receive PC 232 Serial Port –Follows EIA/TIA 232 standards.
Binary “There are 10 types of people in the world… those that understand binary and those that don’t.”
Parallel Ports of PC Methods of interfacing Examples.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Copyright CCNA 1 Chapter 1 Introduction to Networking By Your Name.
Introduction to Interfacing Projects Nareen Khan.
How Computers Work Dr. John P. Abraham Professor UTPA.
ABCDNumber = Off 1 = On Binary Coded Decimal (BCD)
Chapter 1: Introduction to Computers and Programming.
Week 2 - Monday.  What did we talk about last time?  Software development  Lab 1.
Interrupts and DMA CSCI The Role of the Operating System in Performing I/O Two main jobs of a computer are: –Processing –Performing I/O manage and.
Memory Layout and SLC500 System Addresses. Processor Memory Division An SLC 500 processor's memory is divided into two storage areas. Like two drawers.
Binary Numbers. Why Binary? Maximal distinction among values  minimal corruption from noise Imagine taking the same physical attribute of a circuit,
PHY 201 (Blum) 1 Multiplexing and Demultiplexing In some sense, Multiplexing and Demultiplexing is just a special case of the truth tables we have been.
Logic Gates It’s Only Logical. Logic Gates Are the switches that computers and similar devices use. They hold their state until something changes. Are.
Number Systems Revision of conversations What is a register Addition Complementation.
Basic Electricity and Electronics Module Two Basic Electronics Copyright © Texas Education Agency, All rights reserved.
PHY 202 (Blum)1 Combinations of Resistors Series, Parallel.
CO UNIT-I. 2 Multiplexers: A multiplexer selects information from an input line and directs the information to an output line A typical multiplexer has.
Computers and Math Binary, Hex, and Decimal Oh My Copyright © Texas Education Agency, All rights reserved.1.
Programming Fundamentals. Overview of Previous Lecture Phases of C++ Environment Program statement Vs Preprocessor directive Whitespaces Comments.
Computer operation is of how the different parts of a computer system work together to perform a task.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
Binary Logic Derrington KCL CPD/SKE Binary We’ve seen how data of all different sorts and kinds can be represented as binary bits… 0s and 1s 1 is.
Basic Electricity and Electronics Module Two Basic Electronics Copyright © Texas Education Agency, All rights reserved.
Windows Programming Lecture 06. Data Types Classification Data types are classified in two categories that is, – those data types which stores decimal.
Programming PIC 16F84A in Assembly. PIC16F84 pin-out and required external components.
Computer Basics CHAPTER 1. What is a computer?  A computer is a machine that changes information from one form into another by performing four basic.
Programmable Logic Controller
Binary Representation in Text
Binary Representation in Text
Week 2 - Wednesday CS 121.
Basics of Logic gates - Part 1
Logic Gates Binary Day 3 PEOPLE 2016.
Basic Computer Organization and Design
Operating Systems (CS 340 D)
Chapter 10 © 2011, The McGraw-Hill Companies, Inc.
Instructions at the Lowest Level
Topic 3: Data Binary Arithmetic.
Instruction cycle Instruction: A command given to the microprocessor to perform an operation Program : A set of instructions given in a sequential.
Digital Logic Structures Logic gates & Boolean logic
CS101 Parts of a Computer.
REGISTER TRANSFER LANGUAGE
The centronics port Interfacing to a PC.
JC Technology Logic Gates.
13 Digital Logic Circuits.
CS 206D Computer Organization
ECE 352 Digital System Fundamentals
Review: The whole processor
Binary Numbers Material on Data Representation can be found in Chapter 2 of Computer Architecture (Nicholas Carter) CSIT 301 (Blum)
Chapter 1 Introduction to Networking
Digital Circuits and Logic
Technology 3 Bits & Bytes.
Presentation transcript:

Computer Sensing and Control How is binary related to what we are trying to accomplish in electronics? The PC GadgetMaster II uses binary to communicate with the world. We can represent a binary value in a couple of manners. It can be a one or zero, and it can also be represented by the presence or absence of voltage.

Register A physical location that can hold a certain amount of data Lots of them so each has an address How much data a register can hold is measured in bits or bytes (8 bits = 1 byte)

PC Gadget Master II Parallel port has three 8 bit registers which are used with the PC Gadget –Output 888 and 890 –Input 889 With switch in the B position: –12 Output lines, 4 Input lines With switch in the A position: –11 Output lines, 8 Input lines

Computer Sensing and Control

To get output, we issue a command in Visual Basic called OUT. If we wish to have the value (voltage) issued on a pin, we issue the corresponding binary value with the out command.

OUT 888, 128

Output Commands Out Register Address, Register Contents OUT 888, 128 turns on pin 1 OUT 888, 1 turns on pin 8 OUT 888, turns on pin 2 and 3 To turn off the voltage, we issue??

OUT 888, 0

PC Gadget: Input

Input Commands INP Register Address INP 889 checks the state of the inputs Input returns a binary number where a 1 corresponds to a high state on a pin. How do we know if a pin is high?

N = Inp(889) If (N and 64) = 64 then (Do something here!) End if What are we trying to do with the N and 64 = 64??

Masking Boolean operators are used to MASK values in decision making operations. We can “filter” an input for a specific value to ensure that we can detect its existence

AND Truth Table 1 AND 1 =

Bitwise AND AND =

Review Gadgetmaster II has Input register (memory area) and an Output register. Each register has an address: Input is 889. Output has two: 888 and 890. Output has twelve lines on which voltage can be sent. Each line corresponds to a binary number. If we wish to send voltage through a particular line, we use the OUT command, the port number, and the value of the line which on which we wish to have voltage. For example: OUT 888, 128 places voltage or a high state on pin 1. OUT 888, 8 places voltage on pin 5. OUT 888, 96 places voltage on two pins: 2 & 3.

If we wish to use the other four pins (9 – 12) we must use a separate address which is 890. These four pins have a special arrangement with pin 9 and eleven switching values so that the four pins have decimal 2, 4, 8, 1. Remember, each pin is addressed by us in decimal but actually corresponds to a binary value on the pin!! Input works a little differently than output but has similarities. The input register is similar to the output in that it has an address which is 889. It is similar to the output register in that each pin has a binary value which corresponds to a high state on the pin. We use the decimal equivalent to address the pin. Review

To get the value of a pin on the input register we have to look at all values on the register at the same time. We then examine the number returned to us from the register and it will inform us as to which pin has voltage. We use the INP command to get the value in the input register. For example: intRegVal = INP (889) tells us the value that is in the register. It is placed in a variable called intRegVal which we declare and then examine. There is a jumper which is set to B by default which controls the number of lines which are active at any time. There are eight lines but only four are active with the jumper is this position.