EE2361 "Intro to Microcontrollers"

This is the archive of the class EE2361 "Intro to Microcontrollers" taught by Kia Bazargan in the Fall 2014 semester at the University of Minnesota. Links to class videos are provided in the table below, along with supporting documents. Labs and discussion problems are provided after the video and documents table.

Syllabus

Download link: MPLABX (get both the IDE and XC16 compiler)

PIC24 Data Sheet

PIC24 Programmer's Manual

MPLABX IDE manual

MPLAB XC16 compiler, assembler and linker manual

Videos

Number Original Date Contents One-Pane Two-Pane Documents
1 September 3, 2014 Admin stuff, PIC24 architecture Watch |
Download (103 MB)
Watch |
Download (142 MB)
Intro slides
2 September 5, 2014 Architecture, pin diagram, MPLABX overview, watch variables Watch |
Download (102 MB)
Watch |
Download (170 MB)
template.s
asm1.s
3 September 8, 2014 Registers, status reg (SR), instruction set, 32-bit add Watch |
Download (143 MB)
Watch |
Download (215 MB)
.
4 September 10, 2014 Ports, pull-up resistor, LATB, TRISB, 24-bit add
mul a * 4, loop, pipeline bubble (why bra takes 1 cy or 2)
Watch |
Download (150 MB)
Watch |
Download (192 MB)
ports.s
4-a Recorded outside class Instruction Opcodes opcodes 1 (youtube) . .
4-b ~ ~ opcodes 2 (youtube) . .
4-c ~ ~ opcodes 3 (youtube) . .
5 September 12, 2014 Stopwatch, watch (variables), pipeline bubble
counting inst cycles in a prog, creating sw delays
debouncing a switch, loop examples
Watch |
Download (180 MB)
Watch |
Download (223 MB)
asm2_loops.s
HW1.pdf
6 September 15, 2014 Loops, mul inst, 32-bit mul, if statements in asm Watch |
Download (156 MB)
Watch |
Download (175 MB)
.
7 September 17, 2014 Data mem layout, indirect addresssing [Wn++],
copy array A[i]=B[i], sum A[i]
Watch |
Download (150 MB)
Watch |
Download (175 MB)
asm_indirect1.s
asm_indirect2.s
asm_indirect3.s
8 September 19, 2014 Signed, unsigned add, sum A[i] as byte, char string,
useful C operations
Watch |
Download (160 MB)
Watch |
Download (183 MB)
firstC.c
8-a Recorded outside class Strlen implementation in asm strlen (youtube) . strlenB.s
9 September 22, 2014 Useful C constructs, Timer 1, max delay w/ PRE=1 Watch |
Download (146 MB)
Watch |
Download (183 MB)
t1_first.c
10 September 26, 2014 Max delays PRE=x, range vs. resolution (concept)
loop overhead while(_T1IF==0);
Watch |
Download (153 MB)
Watch |
Download (180 MB)
t1_oneMin.c
11 September 29, 2014 Loop overhead, measure delay of key press
timer overflow counter (no int)
Watch |
Download (203 MB)
Watch |
Download (217 MB)
t1_measureKeyPressDelay_ms.c
12 October 1, 2014 Casting long int (ovflw var operations), stimulous (async),
T1 count T1CK pulses, 32-bit timers,
measure code exe using T1 (no interrupts)
Watch |
Download (161 MB)
Watch |
Download (174 MB)
Ref man: timers
t1_countT1CK.c
t1_countNumInsSinX.c
13 October 3, 2014 Interrupts, polling vs. int, INT0, static and volatile vars,
IPL bit in SR
Watch |
Download (148 MB)
Watch |
Download (180 MB)
int_first_t1.c
13-a Recorded outside class Range vs. Resolution Range vs Resolution (youtube) . t1_T1CK_rangeVsResolution.c
t1_T1CK_rangeVsResolution_notes.pdf
14 October 6, 2014 Disassembly listing of interrupts, call stack, RETFIE, polling vs interrupt overhead Watch |
Download (154 MB)
Watch |
Download (182 MB)
.
15 October 8, 2014 Emulating loops in interrupts, gated accumulation mode, frequency thresholding: int version Watch |
Download (139 MB)
Watch |
Download (172 MB)
int_t1T2_isFreqAboveX.c
HW2: asm string, timers 2361_F14_hw2_timers.pdf
16 October 10, 2014 Frequency thresholding: polling version, the problem of non-atomic operations such as 32-bit add interrupted in the middle of the operation. Watch |
Download (158 MB)
Watch |
Download (156 MB)
int_t1T2_isFreqAboveX.pdf (from a different semester)
17 October 13, 2014 High/low priority interrupt example. Timer prescalar > 1 and PR vs (PR+1). Timer polling loop overhead. Watch |
Download (158 MB)
Watch |
Download (187 MB)
18 October 15, 2014 Issues related to determining the duty-cycle of an external signal using INT0 and TMR to keep track of overflows. Watch |
Download (126 MB)
Watch |
Download (132 MB)
19 October 17, 2014 32-bit Timer. Input Capture. Watch |
Download (190 MB)
Watch |
Download (199 MB)
20 October 20, 2014 The interrupt attribute. Input Capture resolution. PPS. Midterm review. Watch |
Download (143 MB)
Watch |
Download (173 MB)
21 October 24, 2014 Midterm solutions. Intro to Output Compare. Watch |
Download (148 MB)
Watch |
Download (167 MB)
22 October 27, 2014 Intro to UART, baud rate. Output compare. Generating periodic signal with 400us high, 600us low. Watch |
Download (131 MB)
Watch |
Download (154 MB)
23 October 29, 2014 Rate of transmit vs. receive and buffer size. Buffers. Watch |
Download (50 MB)
Watch |
Download (46 MB)
24-a Recorded outside class Buffers Buffers (youtube)
24 October 31, 2014 Handshaking protocols (request / acknowledge). UART example: port extender. Watch |
Download (152 MB)
Watch |
Download (155 MB)
25 November 5, 2014 SPI. Input-only device, output-only device. SPI clock polarity. Two models for connecting N serial devices (from Huang's slides): connect in series, or connect in parallel. Watch |
Download (127 MB)
Watch |
Download (179 MB)
26 November 7, 2014 Bitwise manipulation (e.g., the keypad lab). SPI port extender, array of 7-seg LEDs example from Huang's slides. Tempearture sensor with SPI interface. Watch |
Download (127 MB)
Watch |
Download (174 MB)
26-a Recorded outside class SPI timer chip SPI timer chip (youtube)
26-b Recorded outside class Intro to A/D Intro to A/D (youtube)
27 November 10, 2014 Master / Client serial comm, SPI, buffers. A/D conversion (min 27). Watch |
Download (105 MB)
Watch |
Download (124 MB)
28 November 12, 2014 A/D mapping, voltage to digital conversion, resolution, Tad, Tsamp. Watch |
Download (136 MB)
Watch |
Download (162 MB)
29 November 14, 2014 Sample time calculations, SMMC. Watch |
Download (142 MB)
Watch |
Download (169 MB)
30 November 17, 2014 A/D buffering modes. Temperature sensor example. Watch |
Download (117 MB)
Watch |
Download (166 MB)
31 November 19, 2014 Temperature sensor example (A/D), stack. Watch |
Download (141 MB)
Watch |
Download (188 MB)
32 November 21, 2014 Stack, stack frame. Watch |
Download (130 MB)
Watch |
Download (162 MB)
33 November 24, 2014 Fixed point, floating point. Watch |
Download (153 MB)
Watch |
Download (204 MB)
34 November 26, 2014 Floating point add. How evaluate complex functions (e.g., the Newton Raphson method, lookup-table). Intro to CORDIC. Watch |
Download (137 MB)
Watch |
Download (193 MB)
35 December 1, 2014 CORDIC. Watch |
Download (96 MB)
Watch |
Download (172 MB)
36 December 3, 2014 CORDIC to calculate complex functions. Watch |
Download (90 MB)
Watch |
Download (139 MB)
37 December 5, 2014 CORDIC resolution, examples. PWM digital light dimming example. Watch |
Download (129 MB)
Watch |
Download (168 MB)
38 December 8, 2014 PWM motor control, HAL sensor (input capture). Change notification. Final exam review. Watch |
Download (125 MB)
Watch |
Download (175 MB)
39 December 10, 2014 Review. Watch |
Download (90 MB)
Watch |
Download (139 MB)

Supporting material: