Shift-Registers and Push Button Debounce

Slides:



Advertisements
Similar presentations
MC542 Organização de Computadores Teoria e Prática
Advertisements

arquitectura – implementação
Phase 2 -- Logic Implementation & Simulation Switching & Logic Design Project.
ASIC 121: Practical VHDL Digital Design for FPGAs Tutorial 2 October 4, 2006.
L23 – Adder Architectures. Adders  Carry Lookahead adder  Carry select adder (staged)  Carry Multiplexed Adder  Ref: text Unit 15 9/2/2012 – ECE 3561.
VHDL in digital circuit synthesis (tutorial) dr inż. Miron Kłosowski EA 309
Modulo-N Counters Module M10.4 Section 7.2.
VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
CMSC 611: Advanced Computer Architecture
Lecture 23: Registers and Counters (2)
VHDL Programming in CprE 381 Zhao Zhang CprE 381, Fall 2013 Iowa State University Last update: 9/15/2013.
Shift Registers Module M11.1 Section 7.3.
ECE C03 Lecture 131 Lecture 13 VHDL Structural Modeling Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Lecture #28 Page 1 ECE 4110– Sequential Logic Design Lecture #28 Agenda 1.Counters Announcements 1.HW #13 assigned 2.Next: Test #2 Review.
© 1998, Peter J. AshendenVHDL Quick Start1 Basic VHDL Concepts Interfaces Behavior Structure Test Benches Analysis, elaboration, simulation Synthesis.
Multiplexers Section 3-7 Mano & Kime. Multiplexers & Demultiplexers Multiplexers (Selectors) Lab 1 – Behavioral VHDL -- Multiplexers MUX as a Universal.
Digital Logic with VHDL EE 230 Digital Systems Fall 2006 (10/17/2006)
1 EE24C Digital Electronics Project Theory: Sequential Logic (part 2)
Floating-Point Arithmetic ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
VHDL Structural Architecture ENG241 Week #5 1. Fall 2012ENG241/Digital Design2 VHDL Design Styles Components and interconnects structural VHDL Design.
1 VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi.
VHDL revision 15a1 VHDL revision. VHDL revision 15a2 Q1 A clocked 4-to-2-bit encoder circuit (with synchronous reset) has the following interfaces: RESET:
Registers VHDL Tutorial R. E. Haskell and D. M. Hanna T2: Sequential Logic Circuits.
RS-232 Port Discussion D7.1. Loop feedback RS-232 voltage levels: +5.5 V (logic 0) -5.5 V (logic 1)
Simple Sequential Circuits in VHDL. Contents Sequential circuit examples: - SR latch in dataflow style - D flip-flop in behavioral style - shift register.
Structural VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T3: ALU Design.
© Bob York Gates +5 V 1 kΩ Out +5 V A B Out In 1 kΩ +5 V A B Out
Kazi Fall 2006 EEGN 4941 EEGN-494 HDL Design Principles for VLSI/FPGAs Khurram Kazi Some of the slides were taken from K Gaj’s lecture slides from GMU’s.
7-Segment Displays VHDL Tutorial R. E. Haskell and D. M. Hanna T4: Xilinx LogiBLOX.
Capacitance Sensor Project
Introduction to VHDL (part 2)
ECE 448: Spring 12 Lab Midterm Exam Review. Part 1: Detailed discussion of a selected midterm from Spring Part 2: Review & discussion of common.
VHDL Project I: Introduction to Testbench Design Matthew Murach Slides Available at:
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
BYU ECEn 320 Lab 4 UART Transmitter. BYU ECEn 320 UART Transmimtter Specification VGA Serial A1 Expansion Connector PS2 A2 Expansion Connector B1 Expansion.
ECE 448: Spring 11 Lab 3 Part 1 Sequential Logic for Synthesis.
ENG241 Digital Design Week #8 Registers and Counters.
Reaction Timer Project
11/17/2007DSD,USIT,GGSIPU1 RTL Systems References: 1.Introduction to Digital System by Milos Ercegovac,Tomas Lang, Jaime H. Moreno; wiley publisher 2.Digital.
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
BR 1/991 Dice Game (Chapter 22) The dice game in Chapter 22 is a good example of a Finite State Machine controlling a Datapath. –The combined FSM/Datapath.
Working “Control any electrical device with your T.V remote(any brand)” wizardelectronics.weebly.com.
2/10/07DSD,USIT,GGSIPU1 BCD adder KB3B2B1B0CD3D2D1D
 Seattle Pacific University EE Logic System DesignCounters-1 Shift Registers DQ clk DQ DQ ShiftIn Q3Q3 Q2Q2 DQ Q1Q1 Q0Q0 A shift register shifts.
CEC 220 Digital Circuit Design Latches and Flip-Flops Monday, March 03 CEC 220 Digital Circuit Design Slide 1 of 19.
VHDL Project I: Serial Adder Matthew Murach Slides Available at:
Introduction to the DE0 Board Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Computer Logic Design.
LAB #6 Sequential Logic Design (Flip Flops, Shift Registers)
Class Exercise 1B.
Part II A workshop by Dr. Junaid Ahmed Zubairi
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Maj Jeffrey Falkinburg Room 2E46E
COMP211 Computer Logic Design Introduction to the DE2 Board
ECE 4110–5110 Digital System Design
LIBRARY IEEE; Include Libraries for standard logic data types USE IEEE.STD_LOGIC_1164.ALL; -- Entity name normally the same as file name.
Interrupts, Tasks and Timers
LIBRARY IEEE; Include Libraries for standard logic data types USE IEEE.STD_LOGIC_1164.ALL; -- Entity name normally the same as file name.
Shift Registers Lecture L8.6 Section 8.3.
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Developing More Advanced Testbenches
VHDL (VHSIC Hardware Description Language)
Founded in Silicon Valley in 1984
ECE 331 – Digital System Design
Figure 8.1. The general form of a sequential circuit.
Switching Theory and Logic Design Chapter 5:
RS-232 Port Discussion D12.1.
CprE / ComS 583 Reconfigurable Computing
Sequntial-Circuit Building Blocks
High-Low Guessing Game
System Controller Approach
Presentation transcript:

Shift-Registers and Push Button Debounce Switching and Logic Lab Standard Laboratory Exercises

Suggestions and Warnings Read for detail and comprehension Should be able to complete within normal laboratory period. Make sure you program unused pins as tri-state inputs or you may burnout EPM7128S device on PLDT-2.

Shift Registers Riding without training wheels Riding with training wheels Project 1 -- Basic Component Shift Register as Behavioral VHDL Follow standard steps from project creation to exercise of device Project 2 – Push Button Debounce Count and display debounced presses Count and display non debounced presses Never let inputs float!

Shift Register Entity ENTITY ShftRgstr IS PORT ( Dp : IN BIT_VECTOR(7 DOWNTO 0); Ld,Ds, CLK : IN BIT; Q : BUFFER BIT_VECTOR(7 DOWNTO 0)); END ShftRgstr;

Shift Register Architecture ARCHITECTURE Behavioral OF ShftRgstr IS BEGIN PROCESS WAIT UNTIL Clk'event AND Clk = '1'; IF Ld = '1' THEN --parallel load Q <= Dp;

Shift Register Architecture ELSE --shift right LSb first Q(0) <= Q(1); --Serial Data Out Q(1) <= Q(2); --Continue Shift Q(2) <= Q(3); Q(3) <= Q(4); Q(4) <= Q(5); Q(5) <= Q(6); Q(6) <= Q(7); Q(7) <= Ds; --Serial Data In END IF; END PROCESS; END Behavioral;

Vector Waveform Format File Editing Tool Arbitrary Value Overwrite Clock

Add Push Button Jumper Wires

Bounce on Release

Cross-Coupled NAND gates Requires Two I/O pins Two resistors Double pole switch Output changes on first contact closure

Project 2 – Non Debounce Parallel In from DIP Switches and Debounced Switches Serial Out nPb_in (Active-HIGH) 5 VDC Pb_out (Active-HIGH) pb_in (Active-LOW)

Project 2 -- Debounce pb_in (Active-LOW) nPb_in (Active-HIGH) 4MHz 1KHz Pb_out (Active-HIGH)

Debouncer Shift Register nPb_in != Load PB_IN CLK Pb_out nPb_in = Pb_out  Parallel Load nPb_in != Pb_out  Shift

Bounce on Press != nPb_in Load PB_IN CLK Pb_out SR4 0…0 0 0 1 0 1 0 1 1 1 1 1 1 1 1…1 0…0 0 0 0 0 0 0 0 0 0 1 1 1 1 1…1 1…1 1 1 0 1 0 1 0 0 0 1 1 1 1 1…1 0…0 0 0 1 0 1 0 1 3 7 F F F F F…F

Bounce on Release != nPb_in Load PB_IN CLK Pb_out SR4 1…1 1 1 0 1 0 1 0 0 0 0 0 0 0 0…0 1…1 1 1 1 1 1 1 1 1 1 0 0 0 0 0…0 1…1 1 1 0 1 0 1 0 0 0 1 1 1 1 1…1 F…F F F E F E F E C 8 0 0 0 0 0…0

8 Steps to Success Create Project Capture Logic Analysis and Synthesis Pin Assignments Full Compile Timing Simulation Programming Exercise circuit

Unused Pins as Tri-State Inputs Select “Assignments” Select “Device” Select “Device & Pin Options” Select “Unused Pins” Tab Select “As inputs, tri-stated” OK