ECE 340/341 Microcontrollers and Lab (Fall 2016)
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.)
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
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
- Aug 22 - LD1 and MX3. (Review LD2-3 as needed)
- Aug 29 - FRM12 and PLIB10. (I/O)
- Sep 5 - LD4 and 7, FRM6 (Clocking)
- Sep 12 - LD2 (timer section), FRM14, PLIB11. (Timers)
- Sep 19 - FRM8, FRM12.4, PLIB7, and LD5. (Interrupts)
- Sep 26 - FRM13, PLIB17, LD6 (string portion), and LD10. (PMP)
- Oct 3 - Digilent LCD PMOD
- Oct 10 - FRM21, PLIB16, LD9. (RS232)
- Oct 17 - FRM24, PLIB15, LD8. (I2C)
- Oct 31 - FRM16, PLIB13, LD16. (Output Compare/PWM)
- Nov 14 - FRM15, PLIB12, LD12 (particularly pp. 290-291) (Input Capture)
Homework and Quizzes (20%)
There will be homework and quizzes, possibly
unannounced, throughout the semester.
- Aug 26 - HW1
- Sep 2 - HW2
- Sep 26 - HW3
24 - (1) What does the Digilent CerebotMX7 use as pull-ups on the I2C1 bus
and why? (2) What do "A2, A1, and A0" refer to in Figure 5-2 of the
EEPROM datasheet? (3) Neatly sketch the SDA and SCL waveforms
corresponding to writing of the control byte as shown in Figure 5-1.
- Oct 31 - Dr. J's Single Byte I2C Write & Read code
used IdleI2C2() from the peripheral library, but he was elusive as to
exactly what this function does. Using your skills to acquire new
information please answer the following: (a) What does the Peripheral Library Guide say about this function? (b) What does the function comments say? and (c) What does the code actually do? (i.e., study the source code under C:\Program Files (x86)\Microchip\xc32\v1.31\pic32-libs\peripheral\i2c\legacy and explain the result)
- Oct 31 - Screen capture of I2C single byte write/read
28 - For reach of the following PIC32 peripherals, determine if
enabling the peripheral also configures the necessary I/O pins and cite
the source of your information: UART, I2C, Output Compare, Input
- Nov 28 - Assume a timer frequency of 10 MHz and a measurement window of 10 ms. At what signal frequency does the "counting signal periods in a measurement window" method result in the same measurement resolution as the "measuring signal period using timer ticks" method?
2 - Consider changing the specs for Lab 10 to use "Prescaled Capture
Event" mode with a value of 16 rising edges before trigger: (a) How
does this affect the resolution of your motor speed estimate? (b) How
does this affect the range of motor speeds over which you can calculate
a valid estimate?
Each exam is worth 100 points and will be closed book, closed notes.
Semester exams are 50 minutes long; the final exam
two hours long and comprehensive. Please bring paper, calculator,
and eraser to the exam.
- Sep 16. Topic list
- Oct 12. Topic list
- Nov 11.
- Dec 14, Wed, 7:30-9:30 am.
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.).