CP316: Microprocessor Systems and Interfacing

As of Friday, March 14, all in-person instruction at WLU has been suspended until the end of April, and students have been instructed that if they can go home, they are advised to do so.
For that reason I've revised the syllabus for CP316 as below. The project will only count for 10% of the final grade, and it will ONLY include the "design" portions, so you don't need to do anything more in the lab. (I also don't expect it to be finished, like it would be by the end of term, but you can work with what you have done to date.)
The revised project checklist is on the web page, and here: http://denethor.wlu.ca/cp316/project/cruisecheck_covid.pdf
Total (100%)
The deadline will be the last day of classes, as before, but you can submit anytime before then if you're done. -TS

Pages created and updated by Terry Sturtevant Date Posted: March 16, 2020

Week 1, Week 2, Week 3, Week 4, Week 5, Week 6, Week 7, Week 8, Week 9, Week 10, Week 11, Week 12


Development Environment

Target Hardware

Arduino based on AVR Microcontroller

Reference Material

Course Material

Week of ... Lab/Lecture Reference Material
[ white background indicates required reading;
gray background indicates optional reading]

Jan. 6  


Lecture: Lecture: Lecture:

Jan. 13   Lecture: Lecture: Lecture:

Jan. 20  


Lecture: Lecture: Lecture:

Jan. 27   Lecture:
  • UART [ Tuesday June 18, 2019 ]

  • SoftwareSerial uses PinChange interrupts
    AltSoftSerial uses Timer1

  • 2 -wire interface (TWI, a.k.a. I2C) [ Tuesday June 18, 2019 ]

  • SPI [ Tuesday June 18, 2019 ]

  • Display options: Shield, UART, SPI, TWI, (a.k.a. I2C)
  • ATmega328/Arduino pin mapping
Lecture: Lecture:

Feb. 3  


Lecture: Lecture: cancelled


Feb. 10   Lecture:
  • Dithering [ Monday February 10, 2020 ]

  • ALC exercise: pulsewidth to ultrasonic measurement

  • Copying volatile variables

    Consider the following:
    volatile somevar;

    // more stuff

    What is the potential problem in the above code?

  • ALC exercise: robot control options

  • Project ideas
    Prototype 2 different process diagram options to compare. (Maybe carry both to the end?)
    adaptive cruise control checklist (preliminary)

Lecture: Lecture: cancelled


Feb. 24  


  • Project update:
    Dual prototype options:
    The goal is to abstract the option details as close to the hardware as possible. There should be a single program, with a boolean that determines which is in operation.
    2 PWM options
    fixed/adaptive distance measurement
    open/closed loop straightness (1 or 2 sensors)
    ultrasonic or IR distance
    servo or DC motors
    revised adaptive cruise control project checklist
  • Lab prep: Motor control options
    What are the options for PWM motor control?
  • ALC exercise: Motor PWM parameters determination
Lecture: Lecture:

Mar. 3   No lectures: project work
  • Decide on option to pursue

Mar. 10   No lectures: project work
  • project work; try straight line movement?

Mar. 17  

revised adaptive cruise control project checklist
Without access to the labs, I've adjusted the project requirements to just the design portion. Obviously, without the ability to do testing, there's not really much point in generating a lot more code. Create the documentation as required based on your work done to date. (Cleaning up the code is still possible, such as removing magic numbers and so on.) Email me if you have any questions.

Mar. 24  
Labs cancelled

Mar. 31  
Labs cancelled
  • MyLearningSpace evaluation open March 30 to April 5

Creative Commons License

Information on this site which is produced by Terry Sturtevant is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Canada License.


To view pdf documents, you can download Adobe Acrobat Reader .
get Acrobat Reader
If you need to update a browser, you might try Firefox which is Get Firefox!
Since this page uses cascading style sheets for its layout, it will look best with a browser which supports the specifications as fully as possible.

If you are looking for an office package, with a word processor, spreadsheet, etc., you might try LibreOffice which is Get LibreOffice!

Go to the main page for the Department of Physics and Computer Science.

Valid XHTML 1.1

Valid CSS!

(Level AA)

Wilfrid Laurier University