Lab Assignments


   NDSU – ECE   .      

   Dr. Jake Glower   .  

   ECE 376   .

 


Fall 2007

Labs are due the week after you do the lab (Friday 4PM)

Lab revisions are due 2 weeks later (Friday 4PM).

 

(If you lost points in your lab report, revise the sections you lost points and resubmit with the old report)

 

 

Lab Assignment

Grading 
Criteria

 

Lab Description

Main Routine

ZIP of all files

 

 

 

Lab #1
Binary I/O

Lab1.C

Lab1.zip

 

 Current vs F

Current vs V

Sample Lab Report

Lab #2

Stepper Motors

Stepper.C

Stepper.zip

 

 Help on PIC C

compiler

.

Lab#3
Digital Thermometer

Thermistor.C

Thermistor.zip

 

 

.misc

Lab #4

Iambic Paddle

Iambic.C

Iambic.zip

 

 

.

Lab #5
Digital Filter

Filter.C

Filter.zip

 

Sample Result 

 Six filters

to select from

Lab #6
Motor Speed Contro
l

Lab6.C

Lab6.zip

 

 

Sample Data


 

Other Labs (from previous semesters)

Lab Description

Main Routine

ZIP of all files

 

Chess Clock

Chess.C

Chess.zip

 

LED Flashlight

LED.C

LED.zip

 

Digital Thermostat

Temperature.C

Temperature.zip

 

Coffee Cup

Coffee.C

Coffee.zip

 

 

 

 

 

l

 

 

 


 

 


note on lab write ups:  Your results should argue whether you did or did not meet the requirements and support your argument.  For example

Requirements:

Requirement:  Debounce a switch:

 

We were able to debounce a switch by using a wait loop after detecting the button was pressed.  After adding this wait loop, we did not detect a double count when we pressed the RB0 button throughout the lab.

 

Conclusions:

Conclusions should be what you conclude (not what you did) and support your statement.  For example,

 

We built an LED flashlight with 4 functions in one hour.  (what you did – not a conclusion)

 

With a little reorganization, you can make this a conclusion.  Some possible conclusions along with supporting statements could be:

 

It was easy to build an LED flashlight using a PIC.  Using only three LEDs and three resistors tied to a PIC, we were able to turn on LED’s using the PIC.  Using a short C program, we were also able to get the lights to turn on and off with four different modes of operation.

 

A PIC can do much more than drive a 4-funciton LED flashlight.  The entire program we developed in this lab took 154 words of program memory, which is only 1.9% of available ROM.  There is LOTS of space for more functions.

 

Top-down programming using C is a good way to write small programs.  In this lab, for example, we were able to develop the code for a 4-function LED flashlight in less than one hour by writing our code in C and by developing the code using top-down programming techniques.

 

 

If you don’t trust your results, this is a good place to put your engineering judgement.  For example, if you measure current vs. clock frequency and got no change, you might conclude:

 

The data and results of this lab are suspect and should not be trusted.  In this lab, we found that the current consumption of a PIC microcontroller is not affected by the clock frequency.  This does not make sense to us, however, since the harder the processor works (i.e. the higher the clock frequency) the more energy it should take.

 

Statements like this are OK and can actually be good.  They’re a warning to your boss that he/she shouldn’t make million dollar decisions based upon this data.

 

 


 

 

 

 

 

Maintained by: Jake Glower