CS 362 - Computer Design Spring 2019

Midterm Exam:



  • Coding : https://www.arduino.cc/reference/en/
  • setup : https://www.arduino.cc/reference/en/language/structure/sketch/setup/
  • loop : https://www.arduino.cc/reference/en/language/structure/sketch/loop/
  • blink : https://www.arduino.cc/en/Tutorial/Blink
  • Brooklyn Debounce Code - http://www.ladyada.net/learn/arduino/lesson5.html

    Here is the important, new section of code we added:

      • void loop(){
        val = digitalRead(switchPin); // read input value and store it in val
        delay(10); // 10 milliseconds is a good amount of time
        val2 = digitalRead(switchPin); // read the input again to check for bounces
        if (val = val2) { // make sure we got 2 consistant readings!
        if (val
        buttonState) { // the button state has changed!

        Now we have used a delay() procedure call to space out our input readings. We take two readings and compare them to make sure that the switch has settled on whatever value we read. If there's a bounce, it'll get filtered out by our delay. Try it out and see if it helps make your bike light more reliable.

        Note that this line

         buttonState = val; // save the new state in our variable 

        is in the if statement that makes sure the two input reads are the same. You should not consider the val variable to hold valid information unless you've verified it against the second read, val2. Otherwise you will get strange performance

zyBook and Homework Material

  • Binary Representation
  • Two's Complement
  • Overflow
  • Parallel Circuits
  • Series Circuits
  • Ohm's Law: V = IR
  • Resistance in Series
  • Resistance in Parallel
  • Boolean Logic
  • CMOS representation of a Gate
  • Circuit Diagram using:
    • AND gates
    • OR gates
    • NOT gates
    • NAND gates
    • NOR gates
    • XOR gates
    • XNOR gates
  • Truth Tables for the Boolean Operators
    • AND gates
    • OR gates
    • NOT gates
    • NAND gates
    • NOR gates
    • XOR gates
    • XNOR gates
  • Boolean Properties
    • Distributive
    • Commutative
    • Associative
    • Complement
    • Indentity
    • Null Elements
    • Idempotent
    • Involution
    • DeMorgan 's Law
  • Simplification of Binary Expressions using Boolean Algebra Properties
  • Sum of Minterms
  • Sum of Products
  • Products of Sums
  • Simplification of Binary Expressions using K-Maps
  • Universal Gates
  • Decoders
  • Multiplexors


Copyright 2016 The Board of Trustees
of the University of Illinois.webmaster@cs.uic.edu
Helping Women Faculty Advance
Funded by NSF