Slide design: Dr. Mark L. Hornick SE3910 2/23/2019 SE3910 Week 3, Class 1 Today ??? Week 3 Tuesday Lab Lab 3 was up over weekend – hopefully you downloaded the VERY BIG files. You should have running before start of lab Debian install (preferably on virtual machine) Freshly flashed microSD card Freshly flashed Beaglebone that you can ssh into A coding assignment may be added to lab before tomorrow. SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder Dr. Josiah Yoder
Equipment (Reminder) Last week: Purchase 4GB or greater micro SD card 2/23/2019 Equipment (Reminder) Last week: Purchase 4GB or greater micro SD card Used Lab 3 (Optional) Tools – e.g. needle-noise pliers Check out short-term Kit (breakout board, breadboard cape, LCD cape, USB Oscilloscope) Small parts (also may desire to purchase) SE-2811 Dr.Yoder Dr. Josiah Yoder
Exercise Select all that are real-time systems Video Game CS2852 2/23/2019 Exercise Select all that are real-time systems Video Game Aircraft Autopilot Refinery Process Control Cash Register Smartphone Discussion: Why do we pick these options? Are there any proceses that are not real-time? Why does the book re-define real-time systems? What are the practical implications? SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling Dr. Yoder
Exercise Select all that are embedded systems Video Game CS2852 2/23/2019 Exercise Select all that are embedded systems Video Game Aircraft Autopilot Refinery Process Control Cash Register Smartphone Discussion: What is the key difference between an embedded system and a non-embedded system? Does this clarify our answers? SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling Dr. Yoder
Ex: What is the resistance of this resistor? CS2852 2/23/2019 Ex: What is the resistance of this resistor? And what is the tolerance? Dr. Yoder
Ex: What is the voltage across R2? SE3910 2/23/2019 Ex: What is the voltage across R2? SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling Dr. Josiah Yoder
Ex: What’s wrong with this simple circuit’s input? CS2852 2/23/2019 Ex: What’s wrong with this simple circuit’s input? Work through making this input better SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling Dr. Yoder
C, Java, C#, … unary operators CS2852 2/23/2019 C, Java, C#, … unary operators Increment: ++x, x++ Decrement: −−x, x−− Address: &x Indirection: *x Positive: +x Negative: −x One's complement: ~x Logical negation: !x Sizeof: sizeof x, sizeof(type-name) Cast: (type-name) cast-expression Wiki: Unary_operation Dr. Yoder
Exercise: Which of the following is correct? CS2852 2/23/2019 Exercise: Which of the following is correct? void foo(struct bar2* b); … struct bar b; And then…. foo((struct bar2*) b*) foo((bar2*) *b) foo((bar2*) b&) foo((struct bar2*) &b) This problem AGAIN has an error. b is a pointer, and yet we don’t need to de-reference it. It should just be passed straight through: foo((struct bar2*) b) SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling Dr. Yoder
CS2852 2/23/2019 Exercise How do you get a reference (pointer) to the first element in an array? int x[5] = {1,2,3,4,5} boolean foo(int *ip); foo(&x); foo(&x[0]); foo(x); foo(x[0]); SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling Dr. Yoder
CS2852 2/23/2019 Exercise How do you get a reference (pointer) to the second element in an array? int x[5] = {1,2,3,4,5} boolean foo(int *ip); foo(&x+1); foo(&x[0]); foo(x+1); foo(x[0]); foo(&(x+1)); SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling Dr. Yoder
Conditional Compilation SE3910 2/23/2019 Conditional Compilation #define DEBUG #ifdef DEBUG #endif #define LEVEL 5 #if LEVEL > 0 SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling Dr. Josiah Yoder
Waveform Terminology Amplitude Peak-to-peak voltage SE3910 2/23/2019 Waveform Terminology Amplitude Peak-to-peak voltage Peak voltage (alternative defs) Period Frequency (review) SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling Dr. Josiah Yoder
CS2852 2/23/2019 An Oscilloscope In tomorrow’s lab, we will read time differences on an oscilloscope… SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling Dr. Yoder
Exercise: What is the time delay between the two falling edges? 2/23/2019 Exercise: What is the time delay between the two falling edges? SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling Dr. Josiah Yoder
Exercise: What is the time delay between the two falling edges? 2/23/2019 Exercise: What is the time delay between the two falling edges? 5 ms / Div SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling Dr. Josiah Yoder
Exercise: What is the rise-time of this signal? CS2852 2/23/2019 Exercise: What is the rise-time of this signal? 1 Volt/div 1 ms/div SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling Dr. Yoder
Sketching Waveforms Sine wave Square wave Sawtooth wave(s) Random wave CS2852 2/23/2019 Sketching Waveforms Sine wave Square wave Sawtooth wave(s) Random wave Effect of changing Amplitude Frequency Phase (time shift) SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling Dr. Yoder
[Did not go beyond here in 2-3 class] SE-2811 Dr. Yoder
Technical Goals How does one control the speed of a motor? SE3910 2/23/2019 Technical Goals How does one control the speed of a motor? How does one change the brightness of a light-bulb? SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling Dr. Josiah Yoder
Pulse-Width-Modulation … in traffic CS2852 2/23/2019 Pulse-Width-Modulation … in traffic SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling Dr. Yoder
Pulse-width modulation terminology Determine the duty cycle (D) Multiply the duty cycle by the peak voltage (Vp) SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling
In-class exercise How can you control the brightness of an LED, using tools we have discussed so far? How would you accomplish this if you went into lab right now? SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling
Advantages of Pulse-Width Modulation Click to add text SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling
CS2852 2/23/2019 Muddiest Point Wait for the slides, or follow this link to answer both questions at once: http://bit.ly/1Mow5a3 SE-2811 Dr.Yoder Dr. Josiah Yoder
https://www.polleverywhere.com/multiple_choice_polls/Tgsho9KFq8cPvBg CS2852 2/23/2019 http://bit.ly/1Mow5a3 Today, the professor made the course material clear and understandable? SE-2811 Dr. Josiah Yoder Dr. Josiah Yoder
https://www.polleverywhere.com/free_text_polls/5ecaTmFuFeJ65hY CS2852 2/23/2019 http://bit.ly/1Mow5a3 What was the muddiest point? SE-2811 Dr. Josiah Yoder Dr. Josiah Yoder
Slide design: Dr. Mark L. Hornick References EB: Derek Malloy, Exploring Beaglebone, Wiley, 2015 SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder