ECE 340/341 Microcontrollers and Lab (Fall 2015)


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. 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. These will be used to ensure that students are keeping up with the reading, the lectures, and the lab. In addition, a prelab will be required via e-mail submission by 8 am on the first Tuesday of each lab, starting with Lab 1.

  1. Sep 09. HW1
  2. Sep 16. HW2
  3. Sep 28.
  4. Oct 12. HW4. In addition
    1. Why do we need a handshake between the PMP and the LCD controller, whereas we don't use handshakes when accdssing PIC32 peripherals, such as Timer 1 (or the PMP)?
    2. Briefly describe two different methods of controlling the LCD from the PIC32
    3. Identify in detail the steps required to move the cursor to the middle of the second line, without changing the LCD display
  5. Oct 21. Puzzler of the Day - Is a square wave a valid RS232 signal? If so, what "information" is transmitted (be specific) and how would you test your answer?
  6. Oct 26. Clearly explain how a C program running on the PIC32 can recognize that it has reached the end of a physical page in the EEPROM while performing multi-byte writes, as shown in Figure 6-2 of the datasheet.
  7. Nov 11. Jim wants a PWM carrier frequency of 500 Hz. (a) If Timer 2 is clocked by the peripheral bus clock with a prescale of 1, what should he load into the period register and what is his resolution in bits? (b) What value should he load into OC3R if he wants the initial duty cycle to be 45%? (c) What changes if he instead uses a prescale value of two for the timer clock and leaves everything else the same? Please show all work to receive full credit. (as always!)  :-)

    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 18. Topic List
    2. Oct 16. Topic List
    3. Nov 16. Topics List
    4. Final Exam. Tues, Dec 15, 10 am - noon.


    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