Microcontroller System Design


EE 347


Spring 2005

Announcements:

1. Our review session is at 5 pm on Monday, May 2nd. It will take place in Crothers 351. Bring questions...

2. What to expect on the final exam.


Instructor Dr. Robert S. Fourney
Email Robert.Fourney@sdstate.edu
Phone 688-4016
Office 215 Harding Hall
Class Time MWF 8:00-8:50
Class Location Crothers Engineering Hall, room 351
Office hours MWF 10-11, Tu 12-1, Th 12:30- 1:30
Please do not disturb MWF 7-8 or 11-12
Other times by available by appointment
Text MC68HC11:An Introduction, Software and Hardware Interfacing, 2nd Ed. by Han-Way Huang, published by Delmar Thompson Learning

The text will be supplemented with additional reference materials which will be linked from this page and/or handed out in class as they are assigned.



Prerequisites
EE 245 (formerly known as EE 345)
Corequisites
EE 347L -- Microcontroller System Design Lab
Course Description
This course serves as an introduction to microcontrollers, using the MC68HC11 as an example.
Course Work

Unless otherwise specified, all work that you submit in this course must be your own; unauthorized collaboration is considered academic dishonesty. Please save us both a lot of trouble by realizing that I will pursue any such transgressions to the fullest extent possible.

As a rule, late assigments are not generally accepted (e.g., attempting to hand in an assigment after the start of class on the due date will result in a grade of 0 for that assignment).

Late assignments will only be accepted under exceptional circumstances AND with prior arrangement. A penalty may apply.

Grading Policy
 Final grades will be determined via the following breakdown:

 
Exam #1 20%
Exam #2 20%
Homework and Quizzes 10%
Class Participation (and quizzes) 5%
Design Lab Practical(s) 10%
Lab Project and PDR 15%
Comprehensive Final Exam 20%

Your class participation grade will be determined by your on time attendance to class as well as your participation in classroom discussions. Pop quizzes, when given, will cover material previously covered in class, previous homework assignments, and/or simple questions on the current days reading assignment.
 

Please read Making the Grade by Kurt Wiesenfeld and keep his views (which I share) in mind when deciding how much effort to invest in your coursework.

Schedule of Upcoming Classes
No. Date Topic, Reading, and Assignment
1 Jan 12 Introduction

Discuss Syllabus

Read Chapter 1

Homework # 1 assigned.

2 Jan 14 CPU Registers, machine code, source code, assembly vs higher level language

Through Section 1.5

Read section 1.6 again

Homework # 2 assigned. Due on Wednesday, January 19th

Jan 17 No Class -- Martin Luther King Jr. Day Holiday
3 Jan 19 Addressing Modes Section 1.6
4 Jan 21 Sample instructions, hand assembly, program tracing, cycle-by-cycle analysis
Through Section 1.8.1 (plus some bonus material not found in your textbook)

Homework # 3 assigned. Due on Monday, January 24

5 Jan 24 Dis-assembly using opcode maps, flowcharts Chapter 2 through 2,5
Sections 1.8.2-1.9, 2.5, 2.6 through the bottom of page 59

Homework # 4 assigned.

Homework 3 due before class

6 Jan 26 Read sections 2.6 except 2.6.5 and FDIV (skip top of page 60 to start of 2.7
re-read example 2.10

Arithmetic

Homework # 4 due before class

7 Jan 28 Double precision multiplication, Sim68 demo and discussion. Homework # 5 assigned, due on Monday at 5:00 pm
8 Jan 31 Relative addressing, Branching, loops, and more on the CCR
Sections 1.6.6 and 2.7-2.9
9 Feb 2 Loops, Delay loops, shift and rotate instructions.
The stack. Push and pull operations
Through section 2.9, skipping (for now) 2.7.5. Skim 2.10, concentrating on the parts that are relevant to the axiom Eval boards.
10 Feb 4 Modularity, subroutines, parameter passing

Homework # 6 assigned.

11 Feb 7 More on subroutines, reentrant and recursive subroutines
12 Feb 9 Interrupts, maskability, priority, "interrupt vector", "stacking registers"
13 Feb 11 Discuss/demo tpm subroutine using stack for parameter passing and local variables
More on Interrupts: Buffalo Monitor JMP table, local and global enables and masks

Test will include all aspects of subroutines, but not interrupts

14 Feb 14 Finish with interrupts, discuss Resets (very similar to interrupts)

Homework # 7 assigned.

Interrupts will not be on the test, but you should read ALL of chapter 6 (Interrupts and Resets) while this material is still fresh. Interrupts will be featured in labs and on future exams.

Feb 14 Optional afternoon Review Session at 4:00 pm, in CEH 351
15 Feb 16 Exam # 1
16 Feb 18 Return Exams. memory map and memory decoding. Chapter 5 through Section 5.6

Homework 7 Due

Read Section 5.7 for next time

Homework # 8 and Homework # 9 assigned. Both due on Wednesday, 2/23.

Feb 21 No Class. President's Day Holiday
17 Feb 23 Basic I/O concepts. Dedicated (or isolated) vs memory mapped I/O.
The A-to-D subsystem on the 68HC11
18 Feb 25 Questions/Clarification on A-to-D subsystem
Timing Diagrams, review general conventions
Memory timing requirements in general: set-up and hold times
Detailed timing analysis of 68HC11 (Section 5.7)
19 Feb 28 MC 68HC11 Bus Timing Diagrams. Memory timing diagrams.
Interfacing memory to the MC 68HC11

Homework # 10 assigned.

20 Mar 2 General Purpose I/O, I/O pins and parallel I/O on the 68HC11, review memory mapped I/O, introduce PIOC and DDR_ registers. Discuss brute force, strobed, and handshake I/O
21 Mar 4 Discuss timing some more, hand out solutions to HW # 10, assign Homework # 11 (due Monday March 14th)
Mar 7 No Class, Spring Break
Mar 9 No Class, Spring Break
Mar 11 No Class, Spring Break
22 Mar 14 Using built in subsystems to implement various handshake protocols (through Section 7.7)
Homework 11 Due before class starts

Homework # 12 assigned, due Wednesday

Read section 7.12 for next class

23 Mar 16 Using built in I/O subsystem to interface 68HC11 to a printer using the Centronics printer interface.

Homework # 13 assigned, due Monday, but fair game on Wednesday's exam (so look at it early)

24 Mar 18 Continue with Centronics interface, this time setting up our MCU to act as the printer. Discuss Pulse Accumulator subsystem (Section 8.10)

For next time, read Chapter 8

25 Mar 21 Timer Functions (Free running main timer, TIC/TOC functions, Real time interrupts (Chapter 8-8.9)
Mar 21 Optional Evening Review Session
5:00 pm in Crothers 351
26 Mar 26 Second Exam
Mar 25 No Class -- Easter Recess
Mar 28 No Class -- Easter Recess
27 Mar 30 Finish up with timing subsystems: RTI, Forced compares, OC1 controlling multiple pins, etc.

Homework 14 handed out in class Due Friday

28 Apr 1 Handed back exams. Discussed on-chip EEPROM, using on-chip EEPROM under program control.

Homework # 15 assigned. Due Monday

29 Apr 4 Basics of asynchronous serial communication, RS-232

Read Chapter 9 through 9.5 (skip 9.3.4 for now)

30 Apr 6 Protocol, Flow control, Basics of asynchronous serial communication subsystem on the 68HC11,
31 Apr 8 Details of SCI subsystem on the 68HC11, SCI registers, sample programs (polling)
32 Apr 11 Details of SCI subsystem on the 68HC11, timing details, maximum clock skew calculations, SCI registers, sample program (polling)
33 Apr 13 Finish with SCI subsystem on the 68HC11, using reference guide tables to calculate value in BAUD register, another sample program (polling), MAX-232 details.

Introduce Synchronous serial communication (read chapter 10-10.5)

34 Apr 15 Synchronous serial communication and the SPI subsystem on the 68HC11
Chapter 10 through 10.5

After today, we will start holding some classes in HH319 at both Noon and 1:00 PM. Check your email and this web page prior to each class so that you'll know when and where to go (don't forget to hit "reload" or "refresh"

35 Apr 18 In HH319 at both Noon and 1:00 PM I would like all 9 people who volunteered (by signing the sign up sheet) to show up at 1:00. The rest of you, please come at Noon.

There is no assignment, but bring some way to transfer files from the lab computers to your home. (web-based email, floppy, USB stick known to work in the lab, etc).

I will give you a program, and a circuit description. You will build the circuit and we will experiment with loading the S19 file in RAM (as usual), the on-chip EEPROM, and the on-board flash. We will then be able to run w/out being tied to the PC (and, in the case of the on-chip EEPROM, in single-chip mode on the axiom boards.

36 Apr 20 In HH319 at both Noon and 1:00 PM

We'll be working with writing to the on-chip EEPROM under program control. We'll start with this program and modify it as we go along.

Bring a calculator, your notes on the on-chip EEPROM, and your notes on the serial comm. subsystems. Also bring your homework regarding the "minute meter" and the bottle counter.

Homework # 16 assigned. Due Friday

37 Apr 22 In HH319 at both Noon and 1:00 PM

Come to class prepared, with a soft-copy of your solutions to Homework # 16

Homework # 17 assigned

38 Apr 25 In CEH 351 at Noon ONLY
39 Apr 27 In HH319 at both Noon and 1:00 PM

Come to class prepared, with a soft-copy of your working solutions to Homework # 16 and a soft copy of your solution (and circuit diagram for Homework # 17

40 Apr 29 In HH319 at both Noon and 1:00 PM

Last chance to win some pies! First group to get the in class assignment done gets to split 3 pies. My turn at the pie toss is from 2-2:30....

May 02 Optional Review Session at 5 pm in Crothers 351.
May 4 Final exam -- 2 pm -- Crothers 351 (Wednesday, May 4)