Due date: Sunday, December 5 (midnight) Reading: HH section (pgs ), mbed tour

Similar documents
Lab experience 1: Introduction to LabView

Analog input and output

ME EN 363 ELEMENTARY INSTRUMENTATION Lab: Basic Lab Instruments and Data Acquisition

Spectrum Analyser Basics

TV Character Generator

Experiment # 4 Counters and Logic Analyzer

Analog Discovery Scope and Waveform Generator Edited 11/15/2016 by Eric Scotti & DGH

Lab 1 Introduction to the Software Development Environment and Signal Sampling

Lab 2: A/D, D/A, and Sampling Theorem

PB-507. Advanced Analog & Digital Electronic Design Workstation Instruction Manual. Revision: 2/2014

The Micropython Microcontroller

LabView Exercises: Part II

Analyzing and Saving a Signal

Session 1 Introduction to Data Acquisition and Real-Time Control

Table of Contents Introduction

Experiment 9 Analog/Digital Conversion

Digital input and output

SigPlay User s Guide

IRIG-B PTP Clock Converter Output Module Hardware Installation Manual

SWITCH: Microcontroller Touch-switch Design & Test (Part 2)

Basic LabVIEW Programming Amit J Nimunkar, Sara Karle, Michele Lorenz, Emily Maslonkowski

NanoGiant Oscilloscope/Function-Generator Program. Getting Started

Working with a Tektronix TDS 3012B Oscilloscope EE 310: ELECTRONIC CIRCUIT DESIGN I

The Measurement Tools and What They Do

MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM

PRELIMINARY INFORMATION. Professional Signal Generation and Monitoring Options for RIFEforLIFE Research Equipment

ET-REMOTE DISTANCE. Manual of ET-REMOTE DISTANCE

W0EB/W2CTX DSP Audio Filter Operating Manual V1.12

R5 RIC Quickstart R5 RIC. R5 RIC Quickstart. Saab TransponderTech AB. Appendices. Project designation. Document title. Page 1 (25)

Data Acquisition Using LabVIEW

Quick Reference Manual

Lab #10 Hexadecimal-to-Seven-Segment Decoder, 4-bit Adder-Subtractor and Shift Register. Fall 2017

Digital Signal Processing Laboratory 7: IIR Notch Filters Using the TMS320C6711

A 400MHz Direct Digital Synthesizer with the AD9912

TV Synchronism Generation with PIC Microcontroller

2 MHz Lock-In Amplifier

Burlington County College INSTRUCTION GUIDE. for the. Hewlett Packard. FUNCTION GENERATOR Model #33120A. and. Tektronix

Implementing a Rudimentary Oscilloscope

Getting Started with the LabVIEW Sound and Vibration Toolkit

E X P E R I M E N T 1

Rack-Mount Receiver Analyzer 101

ECE-320 Lab 5: Modeling and Controlling a Pendulum

Integration of Virtual Instrumentation into a Compressed Electricity and Electronic Curriculum

Application Note AN-708 Vibration Measurements with the Vibration Synchronization Module

medlab One Channel ECG OEM Module EG 01000

Introduction To LabVIEW and the DSP Board

Laboratory 10. Required Components: Objectives. Introduction. Digital Circuits - Logic and Latching (modified from lab text by Alciatore)

BER MEASUREMENT IN THE NOISY CHANNEL

Laboratory 9 Digital Circuits: Flip Flops, One-Shot, Shift Register, Ripple Counter

DIGITAL ELECTRONICS: LOGIC AND CLOCKS

Noise Detector ND-1 Operating Manual

Synchronous Sequential Logic

Installation / Set-up of Autoread Camera System to DS1000/DS1200 Inserters

Solutions to Embedded System Design Challenges Part II

SQTR-2M ADS-B Squitter Generator

Operating Instructions

VIDEO GRABBER. DisplayPort. User Manual

Writing Programs INTRODUCING THE BASIC STAMP EDITOR 2 SCRIBBLER HARDWARE PROGRAMMING CONNECTIONS 8 BLINKING THE LIGHTS WITH PROGRAM LOOPS 9

Auxiliary states devices

PulseCounter Neutron & Gamma Spectrometry Software Manual

SPI Serial Communication and Nokia 5110 LCD Screen

SC26 Magnetic Field Cancelling System

SREV1 Sampling Guide. An Introduction to Impulse-response Sampling with the SREV1 Sampling Reverberator

SXGA096 DESIGN REFERENCE BOARD

Decade Counters Mod-5 counter: Decade Counter:

Part No. ENC-LAB01 Users Manual Introduction EncoderLAB

4.9 BEAM BLANKING AND PULSING OPTIONS

Ocean Sensor Systems, Inc. Wave Staff, OSSI F, Water Level Sensor With 0-5V, RS232 & Alarm Outputs, 1 to 20 Meter Staff

with Carrier Board OSD-232+ TM Version 1.01 On-screen composite video character and graphic overlay Copyright 2010 Intuitive Circuits, LLC

DX-10 tm Digital Interface User s Guide

Experiment 7: Bit Error Rate (BER) Measurement in the Noisy Channel

Manual Supplement. This supplement contains information necessary to ensure the accuracy of the above manual.

User Guide & Reference Manual

Booya16 SDR Datasheet

NOTICE: This document is for use only at UNSW. No copies can be made of this document without the permission of the authors.

SUBSYSTEMS FOR DATA ACQUISITION #39. Analog-to-Digital Converter (ADC) Function Card

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

Choosing an Oscilloscope

Introduction to Digital Electronics

PQ-Box 100 Quick Start Instructions

Welch Allyn CardioPerfect Workstation Tango+ Interface Notes

Using the HDCV Data Acquisition Program

Digital Circuits I and II Nov. 17, 1999

Data Conversion and Lab (17.368) Fall Lecture Outline

Chapter 5 Flip-Flops and Related Devices

PLASMA MONITOR (PT20 UVVis) USER GUIDE

Oscilloscopes, logic analyzers ScopeLogicDAQ

Ultra 4K Tool Box. Version Release Note

Mortara X-Scribe Tango+ Interface Notes

DALHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED 2200

SignalTap Plus System Analyzer

SC24 Magnetic Field Cancelling System

Microcontrollers and Interfacing week 7 exercises

Manual of Operation for WaveNode Model WN-2m. Revision 1.0

Ocean Sensor Systems, Inc. Wave Staff III, OSSI With 0-5V & RS232 Output and A Self Grounding Coaxial Staff

KNX Dimmer RGBW - User Manual

imso-104 Manual Revised August 5, 2011

WaveMaker III Gartech Enterprises Inc. 12/17/2012

On-site reprogrammable beacon keyer

ADC Peripheral in Microcontrollers. Petr Cesak, Jan Fischer, Jaroslav Roztocil

Transcription:

13 Microcontroller Due date: Sunday, December 5 (midnight) Reading: HH section 10.01 (pgs. 673 678), mbed tour http://mbed.org/handbook/tour A microcontroller is a tiny computer system, complete with microprocessor, memory, and a variety of input/output channels including analog converters. The microcontroller is programmed using a high-level language like C or Basic, via a connection to a standard desktop or laptop computer. Microcontrollers are relatively inexpensive and can be a good solution to an electronics problem that would otherwise involve constructing a complex circuit. 13.1 The mbed Microcontroller There are a wide variety of microcontrollers available, with many different programming requirements. The mbed controller we will be exploring is based on the NXP LPC1768 chip. The emphasis of the mbed system is on ease of use. The controller attaches to a standard breadboard to provide electronic access, it receives power and programming via a USB cable to a host computer, and programs are written an compiled in a simple web-based interface. To set up the controller, carefully install it into your ELVIS breadboard. Make sure you place it so that you have access to the pins on both sides. The mbed board is large and somewhat delicate, so be careful to apply gentle and even pressure while inserting it. Plug the USB cable into the port on the mbed board and one of the ports on the side of your computer monitor. The Status LED on the mbed board should illuminate, another LED should blink, and your computer should interpret the controller as a flash drive (typically E:). To load a program into the controller, it is simply copied or saved onto the flash drive. When the controller is connected, or when the Reset button in the center of the board is pushed, the controller automatically runs the newest program in its memory. The E: drive should currently contain just one program, HelloWorld LPC1768, which is causing the LED to flash. The other file in the drive, MBED.HTM, can be used to set up an account for the web-based compiler. In this case, a generic account for your station has already been set up. To access it, point your web browser to http://mbed.org/, and go to the Login link at the top right. If your station number is X, enter the user name UVA3150X and password physics*x. After logging in, click on the Compiler link, also at the top right. This takes you to the compiler application. The mbed controller is programmed in C++, but the programs we will be writing won t involve any complicated language elements. The Program Workspace panel at the left shows the programs you have written. Right now, there should only be one, HelloWorld. Click on it and go to the main.cpp file. This shows the program listing, which should be fairly self-explanatory. Modify the code to use LED2 rather than LED1, and change the wait times to make the LED blink twice as fast. Compile the new code by pressing the Compile button in the center of the toolbar, and save the resulting file to the E: drive. Once compilation is complete and the Status light returns to steady illumination, push the Reset button. Describe the results in your report. Note that the DigitalOut variable type and the wait command are not standard C++, 75

but are included as part of the mbed library. The various special mbed functions are described in the Handbook section of the website. In a separate browser tab, find the Handbook and look up the wait command. What are the units of the wait time, and with what resolution can it be set? 13.2 Digital Inputs and Outputs The HelloWorld program shows one type of digital output, the LED displays. More generally, most of the controller pins can be used as either digital inputs or outputs. The possible uses for the various pins are summarized on the small card included in the controller box, or online under http://mbed.org/handbook/mbed-nxp-lpc1768. All of the blue pin numbers can be used as digital inputs or outputs. To configure pin 30 as an output, add the line DigitalOut q(p30); to the preamble section immediately prior to the int main declaration. This defines a variable q which is bound to the the stated pin. You can read about the DigitalOut declaration in the Handbook. In the main function of the program, toggle q high and low with the code q = 0; while(1) { q =!q; wait(5e-5); } Download and run the code, and observe the output of pin 30 on your scope. Do you observe a 10 khz square wave as expected? Try removing the wait statement. What is the resulting output period? How does it compare to the maximum speed of a typical TTL gate chip? In general, the main limitation of microcontrollers compared to conventional circuits is reduced speed. To configure a pin as a digital input, add the line DigitalIn fgen(p29); to your preamble. Implement a NOT gate with the simple code while(1) { q =!fgen; } Hook pin 29 up to the Sync output of your function generator, and observe both it and pin 30 on your scope. While you run the program, does pin 30 act as the inversion of pin 29? For a more complicated example, use the wait function to implement a triggered pulse generator: When a rising edge is detected on pin 29, wait 50 µs and then output a 100 µs-long pulse on pin 30. To test your program, set your function generator to 1 khz. What happens if you run at 10 khz and use a 5 µs delay with a 10 µs pulse? Multiple input and output bits can be controlled together with the BusIn and BusOut variables, which are again described in the Handbook. Add such a variable with the declaration 76

BusIn nibble(p22,p23,p24,p25); (A nibble is conventionally 4 bits, or half a byte.) Modify your program so that the duration of the triggered output pulse is set to be 10 µs times the decimal value of nibble. In other words, if nibble = 1001 bin = 9 dec, the output pulse should be 90 µs long. Attach pins 22 through 24 to the ELVIS Digital Writer outputs, and verify that you can control the pulse duration as intended. Which pin of the four nibble pins is the most significant bit, and which is the least significant? What do you observe when nibble = 0? This should give you a taste of the capabilities of the microcontroller for digital logic. As long as the speed is sufficient, microcontroller make digital design fairly trivial. Of course, your HelloWorld program no longer has a very appropriate name. In the Compiler, right click on the program and change its name to DigitalFun instead. 13.3 Arbitrary Waveform Generator The mbed microcontroller is also useful for analog applications. As a first example, you will implement an arbitrary waveform generator. This is a device like a function generator, except that the output waveform can be specified as desired. The required program consists of a loop in which the controller first calculates the desired output value according to a mathematical formula, and then outputs the value via the built in DAC. Start by creating a new program. Click the New button in the toolbar of the Compiler. Name the new program Waveform. When you go to the main.cpp listing, you will notice that the HelloWorld program is provided as a default skeleton to start from. The first thing we will need for the waveform generator is a DAC. As the mbed summary card indicates, only one pin can be used for an analog output signal, pin 18. To configure that pin, add the line AnalogOut signal(p18); in the preamble section. This defines a variable signal which is bound to the DAC function of pin 18. You can read about the AnalogOut declaration in the handbook. The AnalogOut variable works similarly to how the digital variables worked. For example, replace the contents of the main function with the line signal = 0.5; Compile and run your program, and monitor the voltage on pin 18 with your DMM. Use the GND pin (at the top left corner) as your ground reference. An AnalogOut variable can be assigned any floating-point value between 0 and 1, and produces a voltage output equal to the variable s value times a reference voltage of 3.3 V. Check and record the DAC output for several values of signal. Does it behave as expected? Is the smallest voltage increment you can produce consistent with the specified 10-bit resolution? Note that the simple code you have been writing masks a rather complicated process. In fact, the signal variable acts in many ways as a function. When you assign a value to signal, you are really calling a routine in the mbed library, which directs the DAC hardware on the chip to output the appropriate value. If you haven t seen this kind of thing before, it is an example of object-oriented programming, and it is what distinguishes C++ from C. 77

Properly, signal is an object of the class AnalogOut, and consists of a set of functions and variables that work together to implement the DAC conversion. When done correctly, this type of programming is transparent and easy to use, as you have hopefully seen here. For an arbitrary waveform generator, we wish to implement an output voltage V = f(t) for some specified function f of time t. This requires a way to track and determine the time more accurately that we can do with wait. The easiest way to achieve this is with the mbed Timer class. Declare a Timer object t by adding the line Timer t; to your progam s preamble. Look up the Timer functions in the handbook, and figure out how to start, reset, and read the timer. For your program, assume that the output is a periodic function and introduce a period variable that is assigned a value at the start of the program. A simple way to control the timing is to begin each period by resetting the timer to zero and then updating the output as quickly as possible until the time exceeds the period. This isn t perfect, since the actual period can vary by the time required for one output update, but this is acceptable if the period is long compared to the update time. Implement this scheme using control loops. Start with the simple function f(t) = t or signal = t.read()/period; enclosed in an appropriate while loop. Observe the DAC output on your scope. For convenience, implement a sync-type signal to serve as a trigger. Define pin 30 as a Digital Ouput object sync and toggle its value between high and low at the start of each time period. Set this up and trigger your scope from pin 30 of the controller. Once you have a working program, observe its performance for a range of periods. Does a period of 100 s seem to function correctly? (It might be easier to observe this with a voltmeter.) When you make the period short, you should be able to see discrete steps in the output on your scope. How long is the DAC update time? What is the discrepancy between the specified and actual waveform periods? Try some more complicated mathematical functions, bearing in mind that the signal value must be between zero and one. A list of functions available in the C math library can be found, for instance, at http://en.wikipedia.org/wiki/math.h. Both the Pre-C99 and C99 functions are available. Craft a few interesting waveforms and note them in your report. For each waveform, find the output update time and deduce the amount of time required to perform the mathematical calculation. You should see that for complex functions, the calculation time becomes a significant burden. Another interesting function is the random number generator rand(). Implement it using the code signal = rand()/(1.0*rand_max); which produces a random value between zero and one. Run this code and note your observations. A device that produces a random signal like this is called a noise generator, and finds a variety of applications. Note that the calculation time limit to the update speed can be remedied by precalculating the required values and storing them in an array. While running, the waveform generator 78

LCD pin mbed pin Function 1 GND Ground 2 Vu 5 V supply 3 1k resistor to GND Contrast control 4 p10 Register Select 5 GND R/W 6 p12 Enable... 11 p14 Data 12 p15 Data 13 p16 Data 14 p17 Data Table 1: Pin connections for LCD module. The first column gives the LCD pin number, the second column gives the mbed pin, and the third column describes the function. Pins 7 through 10 have no connection. can simply read the values from the array and thus run at its maximum rate. This technique can also be used to make the waveform period more precise. We won t bother to implement this here, however. 13.4 LCD Display The AnalogOut and DigitalOut objects are two ways for the microcontroller to generate output, but text output is also often convenient. Such output can either be displayed on an electronic display module or transmitted to the host computer. We shall investigate the display module first. A typical LCD module is included in the mbed controller box. It is manufactured by Lumex, part number S01602DTR. It can display 2 lines of text with 16 characters per line, and is therefore commonly referred to as a 16 2 display. Functions for handling the display interferace are not built into the mbed compiler. However, a great variety of special-purpose libraries are available through the mbed Cookbook, available through a link at the top of the mbed website. Go to the cookbook and find the Text LCD project. Click on it to find a description. We will modify the wiring setup slightly from that described on the web page. First, identify the pin numbers on the LCD module by looking at the back of the card. Numbers 1 and 14 indicate the corresponding pins. Insert the module into your breadboard and hook it up to the mbed controller as shown in Table 1. Given these pin connections, an LCD object must be declared with the parameters TextLCD lcd(p10, p12, p14, p15, p16, p17); In order to use the TextLCD routines, they must first be imported into your project. Start by creating a new program on the compiler page, and call it MyLCD. Click the Import button in the toolbar. Wait for the Programs tab to load, and then scroll down to the TextLCD project (authored by Simon Ford). Select it and click the Import button above the program list. This creates a new program, TextLCD, in your programs list on the 79

left pane. Open it and then drag the files TextLCD.cpp and TextLCD.h into your mylcd program. You can then delete the TextLCD program by selecting it and hitting the Delete key. In the main file of your mylcd program, set up a TextLCD object as described above, and use the cookbook example to display a message on your LCD module. Note that you can use the newline character \n to extend your message across both lines. Convince yourself that the display works as claimed, and describe your observations in your report. 13.5 Voltmeter You can use the LCD display along with the microcontroller s analog input capability to construct a simple digital voltmeter. Create a new program Voltmeter and import the TextLCD code just as you did above. In the preamble to your program, declare an analog input channel using AnalogIn vin(p20); You can read about AnalogIn in the Handbook. It works much like the AnalogOut class you encountered above. In the main routine, set up an infinite loop: while(1) { lcd.printf("v = %f\n\n",3.3*vin); wait(0.5); } This will continually display the measured voltage on the LCD. To test it, hook the pin 20 input up to the ELVIS VPS supply and monitor it with your voltmeter. Tie the ELVIS and mbed grounds together. Bear in mind that maximum readable voltage is 3.3 V, and to avoid damage don t let the input exceed 5 V. What do you observe on the LCD display? You may notice that the displayed voltage looks noisy. To see this more clearly, modify your program to display the digital value obtained from the ADC, rather than the corresponding voltage. The mbed ADC has 12 bits, meaning the range from 0 to 1 corresponds to 2 12 = 4096 different digital values. To display them, modify your code to say lcd.printf("v = %f\n\n",4095*vin); (Why do you multiply by 4095 rather than 4096?) Run your program, again using the VPS input. Describe the variations you see in the displayed value. It will be useful to know how long it takes to acquire an ADC sample. Modify your program to determine this by looping over 10,000 samples and measuring the elapsed time with a timer. Display the elapsed time on the LCD module. If you average all 10,000 samples and display the mean value, are the fluctuations reduced? Leave the LCD display set up, you will use it again below. 80

13.6 Communication with PC If you want to acquire a stream of data and save it on a computer, the LCD display is not adequate. Instead, the microcontroller can communicate with a computer through a RS-232 connection. Here RS-232 is a simple serial communications protocol that most computers support. In the mbed system, it has been conveniently implemented through the USB cable, but in general it would require a separate cable hooked up to the computer s serial port. To test the communication routines, create a new program called Communicate. In the preamble, insert a declaration Serial pc(usbtx, USBRX); This establishes serial communication channel pc implemented through the USB connection. Writing to the channel is accomplished with the pc.printf() command and reading from it with pc.scanf(), which behave like the ordinary C functions. Once again, you can find more details in the Handbook. For now, simply add a line pc.printf("hello World\n"); to your program. You also need to set up your computer to listen to the serial channel. This can be done with a variety of terminal programs. Here we will use TeraTerm. Find TeraTerm in the Start menu and run it. It should default to the correct configuration, with a serial connection to the mbed Serial Port (probably COM3). In the Setup Terminal menu, New Line should have Receive set to LF. When you run your program on the controller, does the message display on the TeraTerm terminal? To demonstrate communication from the pc to the controller, scan an input line via the commands char text[16];... pc.scanf("%s",text); and then display it on your LCD module using lcd.printf("%s\n\n",text). (You will of course need to set up a TextLCD object first.) Verify that you can type a line on the pc and have it display on the LCD. Note that the text will not display on the TeraTerm monitor unless you turn on the Local Echo setting in Setup Terminal. Also, the LCD display does not actually clear displayed characters, so if you write a long word followed by a short one, the end of the long word will still be present. This can be fixed by calling the lcd.cls() command prior to lcd.printf. Try writing a few messages, and discuss your observations in your report. This simple functionality can actually be quite convenient. It often occurs that a measurement device is needed for an experiment you are performing, but you need to see the measurement result from several different places around the apparatus as you are setting things up. If the device provides a serial output channel, a microcontroller can read it and echo the result to multiple display modules that can be placed where required. 81

5 V 1 8 220k FGEN 47 nf 5 V 2 3 7555 7 6 4 5 10k 1k 5 V 1 8 1k 5 V 2 3 LM311 7 6 Out 1k 4 5 Figure 1: Pulse generator circuit. Note that wires are drawn following the standard convention that two crossing lines do not indicate an electrical connection. Actual connections occur only at T-shaped intersections. 13.7 Multi-Channel Analyzer The final microcontroller project that we will implement is a multi-channel analyzer. This is a device commonly used in nuclear physics experiments in which a particle collision produces a pulse of electricity or light. The intensity of the pulse is related to the energy released in the collision. By analyzing the distribution of pulse intensities, information about the structure of the colliding particles can be obtained. The multichannel analyzer (MCA) facilitates this process. At the simplest level, an MCA is an analog-to-digital converter that constantly monitors its input signal. When it detects a significant input pulse, it measures the pulse amplitude and converts the amplitude to a digital value. It sorts the amplitudes into a set of bins, each corresponding to a narrow spread of values, and keeps count of how many pulses are observed for each bin. After running for some length of time, the number of counts per bin is output or displayed. Since we don t have a nuclear experiment to generate pulses, construct the pulse generator circuit seen in Fig. 1. Here the 7555 chip produces 250 µs pulses at a rate of about 330 Hz. How does this pulse duration compare to the sample time of the ADC? The comparator uses the signal from the function generator to set the amplitude of the pulses, so that various amplitude distributions can be achieved. Initially, set the function generator to a 1 Vpp amplitude sine wave with a 2 V dc offset, and a frequency of 40 Hz. On your scope, you should see the output (pin 3) of the 7555 timer consists of a high signal that periodically drops low. At the output of the comparator, you should see a low signal that periodically rises up to a fluctuating level. The pulse high should be approximately constant during an individual pulse. Once you verify that the circuit is working, measure the actual pulse duration and frequency. Briefly describe the signals you see for a square wave, triangle wave, sine wave, and constant (amplitude = 0) function generator signal. Can the sine wave and triangle wave signals be easily distinguished? 82

You have seen already all the tools needed to write an MCA program on the microcontroller. To start, define an array of 100 integer values, which will store the numbers of counts in each bin. Also set up an AnalogIn object bound to a convenient pin. The program should continuously check the input, but not do anything until the signal rises above a specified trigger level, which you can set to 0.2. When a trigger does occur, continue sampling the input until it drops below the trigger level, and compute an average pulse height. For instance, the code: sum = navg = 0; x = vin; while(x>0.2) { sum += x; ++navg; x = vin; } avg = sum/navg; will work. Note that the sample value is stored in the variable x so that a new sample isn t taken every time the value is used. After the pulse is complete, determine which amplitude bin it belongs to and increment the number of counts in that bin. The program should continue running until it receives a specified number of pulses. It will probably be convenient to turn on an LED while the program is acquiring data, and turn it off when acquistion is done. At first, acquire about 100 pulses so that the program runs quickly while debugging. After the run is complete, print out the bin values to the serial channel. It useful to also output a header line to the serial port so that you can find the begining of the data stream. On your computer, you can copy and paste the values into Excel to make a graph. Once you have everything working, increase the number of pulses to 2000, and plot the amplitude distributions you observe for a constant function generator signal, a sine wave, a triangle wave, and a square wave. Do the distibutions appear as you expect? How easy is it to distinguish the triangle and sine waves? 13.8 Wrap Up In addition to you lab report, your online programs will be checked, so make sure that the programs are all present in the online compiler directory. There should be six: DigitalFun, Waveform, MyLCD, Voltmeter, Communicate, and MCA. Comments in the program files are useful in places where you did anything interesting or tricky. To turn the mbed module off, just unplug the USB cable. Remove the LCD module, USB cable, and mbed card and put them back in the controller box. Be particularly careful when removing the mbed card to avoid stressing it. If necessary, ask the instructor for help. Since this is the final lab of the semester, make sure to clean up your station and put all electrical components away. 83