CMPE 401 - Computer Interfacing

Department of Electrical and Computer Engineering

University of Alberta


Announcements:


Instructor: Dr. Bruce F. Cockburn; Office: ECERF W2-044;
E-mail: cockburn

Lab Instructor: Nancy Minderman; Office: ECERF W2-054;
E-mail: nem

Electrical Stores Technician: Rick McGregor; Office: ETLC E3-012;
E-mail: rmcgreg

Teaching Assistants:

Lecture: Jiang Yu
Email: jiangyu
Lab D1 and D2: Jian Bing Li
Email: jbli
Lab D3 and D4: Adam Gobi
Email: gobia

Note that all email addresses are in the ece.ualberta.ca domain.

Lecture and Laboratory Sections:

Lec A1: Auto Reg.; Mondays, Wednesdays and Fridays 10:00 to 10:50 in ETLE2 002
Lab D1: Reg. No. 20698; Tuesdays 14:00 to 16:50 in ETLE5 002
Lab D2: Reg. No. 24496; Tuesdays 14:00 to 16:50 in ETLE5 002
Lab D3: Reg. No. 23905; Thursdays 14:00 to 16:50 in ETLE5 002
Lab D4: Reg. No. 24497; Thursdays 14:00 to 16:50 in ETLE5 002
Note: registering in one of the four laboratory sections will cause automatic registration in the one lecture section.

Calendar Course Description:

(either term, 3-0-3/2). The design and use of digital interfaces, including memory, serial, parallel, synchronous and asynchronous interfaces. Hardware implementations of interrupts, buses, input/output devices. Prerequisite: EE 380 or CMPUT 229.

Required Textbook:

Thomas L. Harman, The Motorola MC68332 Microcontroller: Program Design, Assembly Language Programming, and Interfacing, (Prentice Hall, 1991, ISBN 0-13-603127-7). Note: This is the same book that was required in EE 380.

Evaluation Scheme:

Midterm examination: 20% (Date: November 5th in the 50-minute lecture period)
Final examination: 50% (Date and Location: TBA)
Assignments: 10%
Laboratory Exercises: 20%
Note: Students will work in teams of two in the laboratory.

Official Course Outline:

click here The order and relative emphasis of the topics may vary in the actual course.

Detailed Topic Sequence: (Order and topics subject to change)

Review of the 68332 microcontroller: registers, instructions, addressing modes, the user & supervisor modes, interrupt handling
Embedded system software architecture: operating systems, real-time kernels, device drivers, MicroC/OS-II
The RS-232 serial interface, the 68681 Dual Asynchronous Receiver Transmitter (DUART) Interface Chip
Network interfaces: the OSI layered model, UDP/IP, TCP/IP, client-server interaction, the socket API, the lwIP stack
Digital-to-analog and analog-to-digital conversion
Interfacing to sensors, actuators, stepper motors, servos, the Motorola Time Processor Unit (TPU)
The 68000 System Bus: read cycles, write cycles, read-modify-write cycles, IACK cycles, direct memory access (DMA)
High-speed digital signals, transission lines, termination methods
Survey of Other Illustrative Serial Interfaces: RS-422, Ethernet, SCI, USB, Firewire
Survey of Microcomputer Interfaces: memory interfaces, Intel microprocessor buses, ISA, EISA, PCI, cPCI, Rambus
Survey of Other Illustrative Parallel Interfaces: IEEE-1284 printer port, IEEE-488 instrument bus, Unibus

Assignments:
Assignment #1, Model Solutions
Assignment #2, Model Solutions
Assignment #3, Model Solutions
Assignment #4, Model Solutions
Assignment #5, Model Solutions

Laboratory Exercises:
Lab Date(s) Report Due Date Demo Due Date
Topic Lab D1 Lab D2 Lab D3 Lab D4 Lab D1 Lab D2 Lab D3 Lab D4 Lab D1 Lab D2 Lab D3 Lab D4
Lab #1 Introduction to MicroC/OS-II Running on a 68332-based Microcomputer
(reports marked by Nancy Minderman)
Sept. 21 Sept. 28 Sept. 23 Sept. 30 Oct. 5 Oct. 12 Oct. 7 Oct. 14 Oct. 5 Oct. 12 Oct. 7 Oct. 14
Lab #2 Serial Interfacing Using the 68681 DUART
(reports marked by Nancy Minderman)
Oct. 5
Oct. 19
Oct. 12
Oct. 26
Oct. 7
Oct. 21
Oct. 14
Oct. 28
Nov. 1! Nov. 8! Nov. 3! Nov. 10! Nov. 1! Nov. 8! Nov. 3! Nov. 10!
Lab #3 Serial Interfacing Over SLIP to a TCP/IP Stack in an Embedded System
(reports marked by Nancy Minderman)
Nov. 2 Nov. 9 Nov. 4 Nov. 5* Nov. 16+ Nov. 23+ Nov. 18+ Nov. 19+ Nov. 16+ Nov. 23+ Nov. 18+ Nov. 19+
Lab #4 Stepper Motor Control Using the Motorola Time Processor Unit (TPU)
(reports marked by Nancy Minderman)
Nov. 16 Nov. 23 Nov. 18 Nov. 25 Dec. 3^ Dec. 6^ Dec. 3^ Dec. 8^ Dec. 3^ Dec. 6^ Dec. 3^ Dec. 8^

! Due to Remembrance Day (November 11) demo and report due dates for lab #2 have been reduced by one day.
* Due to Remembrance Day (November 11) , students in lab section D4 can choose to attend another lab section subject to space limitations. However, they are encouraged to attend a rescheduled lab section D4 on Friday, November 5 if at all possible. The report and demo deadline for students in lab section D4 will be 14 days after their rescheduled lab session. This is the same rule used to determine the report due date for the other three lab sections.
+ Due to the Remembrance Day holiday, demo due dates coincide with the report due dates for lab #3 only. Note that due to various issues, demo due dates and report due dates now coincide for all labs.
^ University regulations do not allow course work deadlines to extend beyond the end of the semester. Consequently, demo and report due dates have been reduced by one day.

Laboratory Documentation:

Lab Download and Setup Instructions
A List of Useful MicroC/OS-II Functions
Datasheets for the New Micros NMIX-0332-OEM 68332-based Microcomputer
Schematics for the New Micros NMIX-0332-OEM 68332-based Microcomputer
An Introduction to the MC68331 and MC68332 (56-page tutorial)
MC68332 User's Manual (265 pages)
CPU32 Reference Manual (330 pages)
MC68HC681 DUART User's Manual (88 pages)
TPU Reference Manual (142 pages)
Lab libc documentation


Code of Student Behaviour:

It is the student's responsibility to be familiar with, and to adhere to, the terms of the University of Alberta's Code of Student Behaviour. Included in the Code are descriptions of unacceptable behaviour for students attending the University, the sanctions for the commission of academic offences, and explanations of the complete discipline and appeal procedures. In particular, please note the definitions of plagiarism in section 30.3.2(1), of cheating in section 30.3.2(2), of misrepresentation of facts in section 30.3.6(4), and of participation in an offence in section 30.3.6(5). For example, cheating includes the submitting of the words, ideas, images, or data (including computer programs) of another person as the student's own in any academic writing, essay, thesis, research project or assignment in a course or program of study. Penalties for academic offences range from a written reprimand up to expulsion from the University.


Supplementary Reference Materials:

Please do not feel obligated to buy copies of any of these books. They are not required for the course, but you might find some of these titles useful to supplement the lecture and laboratory material. Limited numbers of the book on MicroC/OS-II by Jean Labrosse are available in the University bookstore. This book would be a useful reference for the laboratory exercises, and might be useful later on for project courses.

  1. Don Anderson and Dave Dzatko, Universal Serial Bus System Architecture, 2nd ed., (Addison Wesley, 2001), ISBN 0-201-30975-0.
  2. Behrouz A. Forouzan, TCP/IP Protocol Suite, (McGraw-Hill, 2003), ISBN 0-07-119962-4.
  3. Jean J. Labrosse, MicroC/OS-II - The Real-Time Kernel, 2nd ed., (CMP Books, 2002), ISBN 1-57820-103-9.
  4. Jane W. S. Liu, Real-Time Systems (Prentice Hall, 2000), ISBN 0-13099651-3.
  5. Hans-Peter Messmer, The Indispensable PC Hardware Book, 4th ed., (Addison Wesley, 2001), ISBN 0-201-59616-4.
  6. Tom Shanley and Don Anderson, PCI System Architecture, 4th ed., (Addison Wesley, 1999), ISBN 0-201-30974-2.
  7. David E. Simon, An Embedded Software Primer , (Addison Wesley, 1999), ISBN 0-201-61569-X.

Useful WWW Links:

Overview of Motorola's 32-bit Microcontroller Families
Motorola MC68332 User's Manual
Motorola MC68340 User's Manual
Home page of Micrium Inc., the distributor of MicroC/OS-II
TCP/IP Tutorial and Technical Overview
Homepage of the Lightweight TCP/IP (lwIP) Project
Homepage of the uIP project, for small 8 and 16-bit microcomputers
Sockets Tutorial
GPIB Tutorial
A Tutorial Introduction to HPIB


Last Modified January 10, 2005