Syllabus

EET 363, Introduction to Microcontrollers
OIT Portland West, Fall 2010

9/30 Fundamentals

Reading: Microcontroller Overview, Binary Number Representation, The Central Processing Unit (CPU), and Development Tools. (All reading assignments from CD text. The text has references to other material)

Topics: Definition and uses of microcontrollers. Components of a microcontroller. Detailed description of the operation of the CPU. Review of binary numbers (unsigned, 2's complement, 1's complement, sign/magnitude), binary arithmetic, and radix conversion. Assembler, compilers, and interpreters. Simulators, evaluation boards, and in-circuit emulation.

10/7 68HCS12 Instructions

Reading: 68HCS12 Instruction Set Overview. Load, Store, and Move Instructions.

Topics: Classes of instructions (Load/Store/Move, Arithmetic, Compare/Test, Boolean, Shift/Rotate, Branch/Jump, Stack, and Other). Addressing modes in the 68HCS12 (Inherent, Direct, Extended, Relative, Immediate, Indexed). Basic instruction timing. Difference between load, store, move, and transfer instruction types. All such instructions in 68HCS12 are discussed.

10/14 Arithmetic Instructions, Branching, and Iteration

Reading: Arithmetic Instructions. Branching and Iteration.

Topics: Addition and subtraction. Multiple precision addition and subtraction. Multiplication and division. Multiple precision multiplication and division. Shifting instructions as an alternative to multiplication and division. Test and compare instructions. Condition codes. Conditional branches. Programming iteration. Use of flowcharts to describe iteration.

10/21 Tables, Arrays, Decision Trees, and Logic Instructions

Reading: Using Tables and Arrays. Decision Trees and Logic Instructions.

Topics: Definition of tables and arrays. Declaring tables and arrays. Sequential access of arrays. "Random", indexed access of tables and arrays. Use of the tbl instruction for interpolation in a table. Selection control structures. Boolean logic review. Bitwise boolean instructions. "Advanced" boolean instructions (bset, bclr, brset, brclr).

10/28 The Stack and Input/Output Overview

Reading: The Stack and Subroutines. Input/Output Overview, Electrical Characteristics

Topics: Definition and use of stacks. Stack instructions. Subroutine definition and use. Parameter passing. Memory mapped I/O and I/O instructions. I/O device registers. Input/Output in the 68HCS12. Polling. Interrupt driven I/O. Input and output in CMOS technology components.

11/4General Purpose and Parallel I/O

Reading: General Purpose I/O Pins, Parallel I/O Ports, System Clocks

Topics: Operation of general purpose I/O pins. Implementing parallel I/O. Handshaking techniques. Using the PLL for clock synthesis.

11/11 Interrupts - External, RTI, and COP

Reading: Interrupts, Traps, and Resets, External Interrupts, The RTI and COP Interrupts, and Time-Multiplexed Displays.

Topics: Definitions of interrupts, traps, and resets. How interrupts work. Writing interrupt handling routines. Software interrupts and traps. External interrupts (IRQ and XIRQ). Key wakeup.COP clock monitor. COP Failure. The Real Time Interrupt (RTI). Description of operation, configuration, and example of use of RTI driving a time multiplexed LED display (the 7-segment LEDs on the Dragon12-plus).

11/18 Timer Module - Input Capture and Output Compare

Reading: The Timer Module (Timer Count, Input Capture, and Output Compare sections)

Topics: Description of operation, configuration, and examples of use of the timer input capture and output compare.

11/25 Timer Module - Pulse Accumulator and Pulse Width Modulation

This lecture is on the CD.

Reading: The Timer Module (remainder), Pulse Width Modulation

Topics: Description of operation, configuration, and examples of use of the pulse accumulator. Description and use of pulse width modulation. Using the pulse width modulator module of the 68HCS12.

12/2 State Machines

Reading: Implementing State Machines

Topics: Walkthrough on implementing state machines as software interrupt routines. Course Review.