ECE 340/341 Microcontrollers and Lab (Spring 2014)


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.)


Programming 32-bit Microcontrollers in C, Lucio Di Jasio, 2008. ISBN: 978-0-7506-8709-6

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 approximately 50 points worth of homework and quizzes, possibly unannounced, throughout the semester. These will be used to ensure that students are keeping up with the reading, the lectures, and the lab.

  1. Due Jan 27. HW1
  2. Due Jan 31. HW2
  3. Due Feb 5. HW3
  4. Due Feb 21. HW4
  5. Due Apr 23. Assuming a timer clock frequency of 10 MHz, estimate the frequency of an input signal with a period of 299, 300, and 301 timer increments (or cycles). Calculate the frequency resolution by computing the difference between the first two estimates (e.g., 299 and 300) and the last two estimates (e.g., 300 and 301). How do the results compare to those caculated by counting edges, assuming a measurement window of 10 ms and edge counts of [299-301]? Which method is "better" for this particular input signal?
  6. Due Apr 30. The lab handout for Lab 10 discusses configuring the pins associated with the SA and SB signals as inputs. This leads Dr. J to wonder whether enabling a peripheral configures the direction of pins associated with the peripheral. Answer this question for the UART, the I2C peripheral, and the Input Capture peripheral.

Exams (80%)

Each exam is worth 100 points and will be closed book, open 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. Feb 7. Topics List
  2. Mar 7. Topics List
  3. Apr 11. Topics List
  4. Final Exam. Wed, May 14, 10 am  - noon. Topics List


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