Microcontroller System Design


EE 347


Spring 2008

Announcements: 1. In HH 316 on Friday, 4/18


Instructor Dr. Robert S. Fourney
Email Robert.Fourney@ieee.org
Phone Office: 688-4016 (home number handed out in class)
Office 215 Harding Hall
Class Time MWF 1:00-1:50
Class Location Crothers Engineering Hall, room 351
Office hours TBD
Text MC68HC11:An Introduction, Software and Hardware Interfacing, 2nd Ed. by Han-Way Huang, published by Delmar Thompson Learning

You will want to consult your textbook and other references from your programming course(s)

These texts 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
To take this class, you must have earned at least a C in EE 245 and successfully completed either CSc 218 or CSc 250.
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.
 

Students are required to make a "good faith effort" on all assignments. Failure to do so will adversely effect the grade beyond the limits listed above. You must earn a grade of C or better in EE 347L this semester in order to pass this class

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 18 Introduction

Discuss Syllabus

Read Chapter 1

Homework # 1 assigned.

Jan 21 No Class -- MLK Day Holiday
2 Jan 23 CPU Registers, machine code, source code, assembly vs higher level language

Through Section 1.5

Look at textbook problems E1.1-1.9 and Read section 1.6 again prior to Monday's lecture

3 Jan 25 Addressing Modes Section 1.6
4 Jan 28 Sample instructions, hand assembly and dis-assembly using opcode maps in reference guide (not the table in your textbook)
Through Section 1.8.1

Homework # 2 assigned. Due on Wednesday, Jan 30

5 Jan 30 Bring your textbook to class today

program tracing, cycle-by-cycle analysis, assembler directives, and flowcharts.
Arithmetic, multiple precision addition, use of Carry Flag

For next time: Read Chapter 2 through section 2.5
re-read example 2.10

Homework # 3 assigned for Monday.

Homework 2 due today, at start of class

6 Feb 1 Arithmetic, multiple precision addition and subtraction, outline of double precision multiplication, Sim68 demo and discussion, introduce Relative Addressing and the BRA instruction

Chapter 2 through section 2.7 (except 2.6.5 and FDIV) (so skip top of page 60 to start of 2.7

Homework # 4 assigned, due Wednesday

Note the submission instructions!

7 Feb 4 conditional branching (based on the CCR), shift and rotate instructions, NOP and delay loops.
Sections 1.6.6 and 2.7-2.9
Introduce the stack, and the push and pull operations. Chapter 3 through 3.3
8 Feb 6
Discuss modular programming, subroutines, subroutine calls, storage of the return address, and parameter passing.
Sim68 demo of subroutines, stack, and parameter passing
Chapter 3 through 3.3

Homework 4 due

9 Feb 8 reentrant and recursive subroutines, examples, "Well behaved" subroutines.

Chapter 6: Interrupts (maskability, priority, "stacking registers") and Resets

10 Feb 11 Chapter 6: Interrupts (maskability, priority, "stacking registers") and Resets

Homework #5 assigned, due Friday.
Homework #6 assigned, due next Wednesday.
Homework #7 assigned, due next Thursday, before lab.

11 Feb 13 Parallel I/O: Brute Force, Strobed, and handshaking. general discussion (Read sections 7.4-7.7 and skim 7.7-7.11 for project hints)
12 Feb 15 MC68HC11 specific discussion of brute force and strobed I/O
Don't forget to Read sections 7.4-7.7 and skim 7.7-7.11 for project hints
Feb 18 No Scheduled Class -- President's Day Holiday
13 Feb 20 Handshaking on the 68HC11. Centronics printer handshaking example. Read Section 7.12 prior to class
Feb 20 Optional Evening Review Session in CEH 351 at 7pm

This is not a lecture, bring questions.

14 Feb 22 Exam #1
15 Feb 25 Discuss Exam issues,
Continue with handshaking on the 68HC11 and the Centronics printer handshaking example. (Still in section 7.12)

Homework # 8 assigned for Friday.

16 Feb 27 Discuss upcoming lab, stack and RTI issues, and
Discuss the Pulse Accumulator Subsystem (Section 8.10)
You should also browse 11.10-11.12 for project hints and ideas
17 Feb 29 Exam #1 "do over"

You may take this exam, or agree to accept your grade on the previous exam. I will not grade your previous exam unless you agree, in advance, to accept that grade. I will not grade both exams for any student. You pick which exam before it is graded.

18 Mar 3 Discuss on chip EEPROM. This is not covered in your textbook and there is no reading assignment prior to class.

Homework # 9 assigned for Monday

19 Mar 5 Discuss Exam. Briefly Discuss A to D subsystem
Mar 7 No Class. IEEE Industry Tour
20 Mar 10 Timer Functions (Free running main timer, TIC/TOC functions, Real time interrupts (Chapter 8-8.9)
21 Mar 12 Memory Decoding: Please read Chapter 5 through Section 5.6. Much of this is review, but some of it is new. Make sure you read Section 5.6.2 and the associated examples prior to class.

Homework 10 Assigned, due on Wednesday, March 26th

22 Pi Day Synchronous Serial communication and the SPI subsystem on the MC68HC11 (Chapter 10-10.5)

Homework # 11 assigned for over break and

Homework # 12 assigned for a week or so later.

Mar 17 No Class -- St. Patricks day
Mar 19 No Class -- Spring Break
Mar 21 No Class -- Spring Break
Mar 24 No Class -- Easter Monday
23 Mar 26 Begin talking about asynchronous serial communication (Chapter 9-9.3).

Rough project proposal due, via email, before class

Homework # 13 assigned for Monday

24 Mar 28 Continue to discuss asynchronous serial communication (Chapter 9-9.3). RS-232, connections and cables, flow control, and 68HC11 specifics.
25 Mar 31 Discuss homework on memory decoding and baud-rate mismatch. Discuss stepper motors, in preparation for lab this week.
26 Apr 2 Conclude discussion of asynchronous serial communication in the specific case of our 68HC11.

Homework # 14 assigned for Monday

27 Apr 4 We are meeting in HH 319

You might want to take a look at this program, and also this one.

28 Apr 7 We are meeting in HH 319

You should have the circuit for this program built already. We will run that program out of RAM, the on chip EEPROM and some EEPROM/Flash memory on our development boards in class today.

If you were in the group that doesn't have the circuit built yet or the group that was absent for the trip you might want to come a little early and get caught up before class. See me in my office for a key to the lab.

29 Apr 9 We are meeting in HH 319, where you will demo your SPI communication program suite from Homework # 12.

Apr 9 Optional evening review session starting at 7:10 pm in CEH 351

As usual, you should bring questions as I do not intend to lecture.

30 Apr 11 Exam II
31 Apr 14 Bus timing on the 68HC11. Skim Chapter 5 through 5.5 Read section 5.7 in detail Maybe even read it again You may want to reference the bus timing diagram and the memory timing diagram.
32 Apr 16 Continue with Bus timing and interfacing memory to the 68HC11. (Chapter 5 through 5.5, lots of emphasis on 5.7, this bus timing diagram, and this memory timing diagram.

Homework 15 assigned for Monday, April 21

33 Apr 18 Meet in Harding to demo your SPI programs and debug your SCI loopback tester.
34 Apr 21 In Crothers to discuss timing.

Homework 16 Assigned, for Friday

35 Apr 23 Selecting a microcontroller for your own projects, work assignments, and Senior Design.

Also please read this EDN article: Putting the Squeeze on 16 bit microprocessors

Apr 25 We will not meet. You will be given a nominal assignment to ensure your participation in the Engineering Expo
36 Apr 28 Current and Future trends in Microcontrollers. How Flash based micro help with time to market and decrease costs, system on a chip. This material is not in your book, but a quick google-search yielded the following three articles which seem to cover the current trends:

Memory options: flash may dominate from EDN (in general, EDN is an excellent resource)

A piece on the evolution of flash microcontrollers, and

a wikipedia article on System on a Chip

. . . . . . . . .
May 6 Final exam -- 2 pm on Tuesday, May 6th in Crothers 351