ECE 340/341 Microcontrollers and Lab (Fall 2017)

Policies

All assignments are collected at the start of class on the specified due date. Each assignment should have your name, the course number, the date, and the assignment designation (e.g., HW1, etc.). Attendance is mandatory. Students who miss five or more class periods will receive a final grade of F for the course. (Arriving late or leaving early is considered absent.)

Course Description

The primary goal of this course is to give you the fundamental skills needed to understand, use, and design microcontroller-based systems. This includes the following: (1) What is a microcontroller? (2) What can it do (and not do)? (3) How does one design (and program) a microcontroller-based system? Note: In addition to the listed prerequisites, ECE 340/341 required junior-level standing in EE or CompE. (e.g., You must have passed both Digital Logic and Circuits II with a C or better.)

Text

Programming 32-bit Microcontrollers in C, Lucio Di Jasio, 2008. ISBN: 978-0-7506-8709-6. Author's web site  Text Errata

Reading Assignments

Please complete the reading assignments in a timely manner so that you may contribute in the class discussions. The following abbreviations are used below, with # identifying the chapter or section: LD - Day # from the class text by Lucio Di Jasio; FRM - PIC32 Family Reference Manual (separate PDF file per section); DS - PIC32MX Datasheet (single PDF file); PLIB - PIC32 Peripheral Library Guide; MX - MPLAB X User Guide ; and XC - XC32 Compiler User Guide.

Homework and Quizzes (20%)

There will be homework and quizzes, possibly unannounced, throughout the semester. 

  1. Aug 25 - HW1
  2. Sep 1 - HW2
  3. Sep 6 - (1) Write a short C program that uses the two methods shown on Slide 11 of the PIC32 IO PowerPoint and verify using the Disassembly window of MPLAB that using PORTAINV requires fewer processor instructions; (2) extend or modify your program to repeat the same comparison for shifting versus addition as a method of doubling the value of a C variable. Submit as a brief report with screenshots supporting your findings.
  4. Sep 25 - HW4
  5. Oct 2 - HW5
  6. Oct 11 - HW6
  7. Oct 30 - Screen captures of I2C single byte write and read using I2C triggering and waveform display - properly labeled and no black background!!. (Lab 8, Part I)
  8. Nov 1 - Compare and contrast in less than two pages RS232 and I2C
  9. Nov 3 - I2C Homework
  10. Nov 17 - Bring to class a neatly written/typed alternative to the idea of "measuring period by comparing timestamps" using PIC32 resources and ECE 340 concepts.
  11. Dec 1 - For each of the following PIC32 peripherals, determine whether configuring and enabling the peripheral also sets the required IO direction: UART, I2C, Output Compare, and Input Capture. (provide references to your source material)
  12. Dec 6 - In the lab, we are using Timer 3 with a clock prescale of 256 to measure the period of the SB signal using the Input Capture module as a means to determine the motor rotational speed. How would the resolution of our method change if we used Timer2 and 3 together to create a 32-bit timer? What if we combined the two timers and reduced the prescale of the timer clock? What if we then also used "Prescaled Capture Event" mode with a value of 16?

    Exams (80%)

    Each exam is worth 100 points and will be closed book, closed notes. Semester exams are 50 minutes long; the final exam will be two hours long and comprehensive. Please bring paper, calculator, pencil(s) and eraser to the exam.

    1. Sep 15. Topics
    2. Oct 13. Topics
    3. Nov 6. Topics
    4. Dec 14, Thurs, 7:30-9:30 am.

    Grading

    Grades (and other information) will be distributed electronically to student UI e-mail addresses periodically throughout the semester. Grades will be calculated using the traditional scale (90%=A, 80%=B, etc.).

    Reference Material