Bits and Bytes + Controlling 8 LED with 3 Pins Binary Counting and Shift Registers.

Slides:



Advertisements
Similar presentations
INPUT-OUTPUT ORGANIZATION
Advertisements

ECE 371 Unit 13 - Part 1 Serial Peripheral Interface (SPI)
 2002 Prentice Hall Hardware Basics: Inside The Box Chapter 2.
SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
Counters 4017 decade counter (1-of-10). What is a Counter? In digital logic and computing, a counter is a device which stores (and sometimes displays)
Hardware Basics: Inside the Box 2  2001 Prentice Hall2.2 Chapter Outline “There is no invention – only discovery.” Thomas J. Watson, Sr. What Computers.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
REGISTER A Register is a group of binary storage cells suitable for holding binary information. A group of flip-flops constitutes a register, since each.
Sequential Circuit  It is a type of logic circuit whose output depends not only on the present value of its input signals but on the past history of its.
Counters and Registers
Counters  A counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship.
SEQUENTIAL CIRCUITS USING TTL 74XX ICS
Data transmission refers to the movement of data in form of bits between two or more digital devices. This transfer of data takes place via some form.
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
Flip-Flop Applications
INPUT-OUTPUT ORGANIZATION
Registers and Counters
COMPONENTS OF THE SYSTEM UNIT
Overview What kind of LCD Interfacing the LCD Displaying Text and Numbers Common Issues.
331: STUDY DATA COMMUNICATIONS AND NETWORKS.  1. Discuss computer networks (5 hrs)  2. Discuss data communications (15 hrs)
Digital Outputs LCD Display
Digital Fundamentals Floyd Chapter 1 Tenth Edition
Lesson 3 — How a Computer Processes Data
Last Mod: March 2014  Paul R. Godin Shift Registers Registers 1.1.
Input/Output mechanisms
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
Rabie A. Ramadan Lecture 3
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
1 INFORMATION IN DIGITAL DEVICES. 2 Digital Devices Most computers today are composed of digital devices. –Process electrical signals. –Can only have.
Multiplexers 1 The output is equal to one of several input signals to the circuit The multiplexer selects which input signal to use as an output signal.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals with PLD Programming.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
© 2008 RoboRubik1 11 Technical Communication Skills Practicum Theory of Operation and Hardware Design Narrative.
8279 KEYBOARD AND DISPLAY INTERFACING
Lesson 3 — How a Computer Processes Data Unit 1 — Computer Basics.
Computer Organization - 1. INPUT PROCESS OUTPUT List different input devices Compare the use of voice recognition as opposed to the entry of data via.
Computer Science Binary. Binary Code Remember the power supply that is inside your computer and how it sends electricity to all of the components? That.
INTRODUCTION.  Upon completing this topic, you should be able to: Illustrate a basic elements of digital computer system and their functions, Depicts.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Floyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd © 2008 Pearson Education Chapter 1.
Last Mod: Jan 2015  Paul R. Godin Shift Registers : Technician Series Registers 1.1.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights Reserved Floyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
8279 KEYBOARD AND DISPLAY INTERFACING
Technology in Action Chapter 6 Behind the Scenes: A Closer Look at System Hardware.
Essentials of Communication This simple model requires many guarantees. Sender Receiver Communication Link Data.
The Computer System.
Basic LED Interface.
Serial Peripheral Interface SPI I2C (i-squared cee)
SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
Chapter Microcontroller
REGISTER TRANSFER LANGUAGE (RTL) INTRODUCTION TO REGISTER Registers1.
Serial Communication RS-232. In order to make two devices communicate, whether they are desktop computers, microcontrollers, or any other form of integrated.
Counters and registers Eng.Maha Alqubali. Registers Registers are groups of flip-flops, where each flip- flop is capable of storing one bit of information.
IC 3 BASICS, Internet and Computing Core Certification Computing Fundamentals Lesson 2 How Does a Computer Process Data?
Michael Rahaim, PhD Candidate Multimedia Communications Lab
EKT124 Digital Electronics 1 Introduction to Digital Electronics
REGISTER TRANSFER LANGUAGE (RTL)
UNIT – Microcontroller.
BITS & BYTES.
ARDUINO     What is an Arduino? Features 14 Digital I/O pins 6 Analogue inputs 6 PWM pins USB serial 16MHz Clock speed 32KB Flash memory 2KB SRAM.
Registers and Counters Register : A Group of Flip-Flops. N-Bit Register has N flip-flops. Each flip-flop stores 1-Bit Information. So N-Bit Register Stores.
Serial Communication Interface: Using 8251
AT28C17 EEPROM By: Ethan Peterson.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Registers.
Digital Fundamentals Floyd Chapter 1 Tenth Edition
Digital Logic Department of CNET Chapter-6
Digital Logic Department of CNET Chapter-6
Registers and Counters
Registers Today we’ll see some common sequential devices: counters and registers. They’re good examples of sequential analysis and design. They are also.
Presentation transcript:

Bits and Bytes + Controlling 8 LED with 3 Pins Binary Counting and Shift Registers

Decimal vs Binary In our everyday lives we use a base 10 systems. Every time we get to 10, we start counting again and basically we add all the “clumps” of 10 and anything less than 10, to designate a value so for instances the number, 11 = 10+1 or the number, 157 =

In a computer, we use a base 2 or binary system. Every time we get to 2, we start counting again and like with the decimal system, we add all the“clumps” of 2 and anything less than 10, to designate a value. Electrical signals can be high or low, on or off and binary with its number of 0 and 1, can easily be translated so a set of instructions can be transmitted to the various circuits of a computer.

Data and values are stored in bytes. A bit is a single part of a byte.

A bit is so small it can only have 2 values. 0 or 1

If a bit is 0, it is “on” If a bit is 1, it is “off”

A byte is made of up 8 individual bits. A byte is the unit most computers use to represent a character such as a letter, number, or typographic symbol (for example, "g", "5", or "?"). A byte can also hold a string of bits that need to be used in some larger unit for application purposes (for example, the stream of bits that constitute a visual image for a program that displays images or the string of bits that constitutes the machine code of a computer program). In some computer systems, four bytes constitute a word, a unit that a computer processor can be designed to handle efficiently as it reads and processes each instruction

By combining the bits in a byte and turning ones on or off, we can represent in a byte any number between 0 and 255.

By using multiple bytes or bits we can represent ever larger numbers.

Binary is the basis of how a microcontroller such as an communicates with its devices. Think about the Blink program and how it sends HIGH and LOW to turn an LED on and off. What if you ran out of inputs and outputs on the Arduino or want to use the I/O to control peripherals more Arduino’s 13 digital and 6 analog I/Os. You can use a chip called a shift register. The one we are using today is called the 74HC595, allows you to control 8 LEDs using only 3 pins on the Arduino. The 74HC595 is an 8 bit shit register meaning that it can receive 8 bits of information or a series of 8 0s and 1s that can be turned on or off. The 74HC595 is a series to parallel shift register meaning that is takes in a stream of 8 0s and 1s and then sends each values to one of the pins on the shift register. Let’s take a look at one and then understand how it works. SHIFT REGISTERS

Q0-Q7 are where each of the 8 bits of data are distributed. A stream of 8 zeros and ones comes into the chip as a group and then each zero or one is shunted to one of The Q pins—serial input, parallel output. And in the case of lighting an LED, each one of 8 can be controlled with the incoming 0 or 1. The pins are numbered counterclockwise starting from the upper left. The top of the chip usually has a notch in it. The process is initiated by the SH_CP, pin 11, or the shift register clock pin which pulse a signal. Simultaneously, the data is sent by pin 15, DS, or Serial data input. Each pulse of the clock denotes the beginning and the end of a bit. After 8 bits of data have been sent and “collected”, the latch pin or pin 12, the storage register clock pin, releases all 8 bits to populated Q0-Q7.

How this all works is through something called "synchronous serial communication," i.e. you can pulse one pin up and down thereby communicating a data byte to the register bit by bit. It's by pulsing second pin, the clock pin, that you delineate between bits. This is in contrast to using the "asynchronous serial communication" of the Serial.begin() function which relies on the sender and the receiver to be set independently to an agreed upon specified data rate. Once the whole byte is transmitted to the register the HIGH or LOW messages held in each bit get parceled out to each of the individual output pins. This is the "parallel output" part, having all the pins do what you want them to do all at once. Channel 2 is the clock. Channel 1 is the data. Channel 0 is the latch.

VCC is connected to 3.3 V as is pin 10, Master Reclear, Active Low. Pin 13 or OE or Output enable, active low and pin 8, GND goes to Ground. Pin 9 or Q7 (Serial Out) is not connected Because we are not sending anything out in this Case.