EENG 348/CPSC 338: Digital Systems
Yale University


Home
Discussions
Lectures
Labs
Handouts
Policies
Calendar
Canvas
 

Handouts

 Sample Midterm

 Background Info

 Assembly language programming

  • AVR-specific information
    • Datasheet for the ATmega328P, the micocontroller used by the Arduino Uno board. Page 429 has a summary of the instruction set.
    • AVR ISA manual, which contains a detailed description of each instruction, its encoding, and how it works.
    • Arduino Uno schematic, showing how the Atmel AVR chip is wired up on the Uno board.
  • On Holy Wars and a Plea for Peace by Danny Cohen (1980). This is the Internet Engineering Task Force (IETF) note that coined the phrase "Endianness."
  • For those looking for additional/supplemental reading material on assembly language programming: "Computer Organization and Design: The Hardware/Software Interface" by David Patterson and John Hennessy (Morgan-Kaufmann) has a good introduction. The chapter of interest is Chapter 2 (or 3, depends on the edition) called "Instructions: Language of the Machine". (Dave Patterson's group developed what became the SPARC ISA, and more recently also helped develop the RISC-V ISA. John Hennessy's group developed the MIPS ISA.)

 Component datasheets

  • Breadboard: if you are not familiar with a breadboard, there is a nice tutorial on sparkfun's web site.
  • Jumper wires (75): These are just wires to be used to build a circuit.
  • 5x7 LED matrix.
    • On the component I tested, pin 1 can be identified as follows:
      • Orient the component so that the markings on the side of the display are on the right hand side with the pins facing away.
      • In this orientation, pin 1 is the top left pin.
    • The terminals of a diode are called an anode and a cathode; the anode of the device is where the higher (more positive) voltage is to be applied relative to the cathode if you want current to flow through the diode.
  • RGB LED (warning: the LED we have been sent appears to have the anode and cathode switched compared to the datasheet. Please check this on your own LED.)
  • Photo cells
  • Shift register (2)
  • Push button (2)
  • Rotary encoder
  • Ultrasonic sensor
  • Resistors: 330 Ohm (10), 10 KOhm (2). Resistor values can be read off the color coded bands on the resistor

 Case Studies and Ethical Conduct
It is extremely important that embedded software be correct, robust, and take its embedded context into account. Below are some real-world scenarios that illustrate the consequences of mistakes in the design of embedded systems and software. Given that it is challenging to test all possible scenarios when embedded systems interact with the physical world, ethical considerations come into play especially if a safer system can be attained only at higher monetary cost. Some of the articles below discuss these issues in a real-world context.

  • Parliamentary elections:
       Debora Weber-Wulff. Rounding error changes Parliament makeup. The Risks Digest, Vol. 13, Issue 37, April 1992.
  • Science missions:
       Mars Climate Orbiter Mishap Investigation Board Phase 1 Report, November 1999.
       Mars Pathfinder Mission "software glitch". The Risks Digest, Vol. 19, Issue 49, December 1997.
  • National defense:
       General Accounting Office report on a patriot missile mishap, February 1992.
  • Satellite launches:
       Ariane 5 Flight 501 failure. Report by the Inquiry Board, 1996.
  • Medical instrumentation:
       Nancy G. Leveson and Clark Turner. An investigation of the Therac-25 accidents. IEEE Computer, 1993 (pdf)
  • Airplanes:
       Boeing 737MAX incident analysis/lessons (pdf), 2020
       Boeing 737MAX summary of changes (text file)
  • Cars
       Toyota firmware incident: unintended acceleration article, 2013
The two main professional organizations related to what we're covering this semester are the IEEE and ACM. Both have a code of ethics.

 
  
Yale