C I S  5 1 0   -   C O M P U T E R  I N T E R F A C I N G

CATALOG DESCRIPTION: This course covers fundamentals of
Computer interfacing to the external world through the
following: parallel, serial, and analog interfaces. The
roles of timers and interrupts are discussed. UART and
DUART programming aspects are emphasized. Prerequisite(s):
CIS 310 and knowledge of an assembly language.


T Y P I C A L  S Y L L A B U S
(lab will follow lecture when applicable)

INSTRUCTOR:
Kiumi Akingbehin, Ph.D.
Phone: 313-436-9144 (office), 248-443-0829 (home)
E-Mail: kiumi@umich.edu
Office: 2221 EC

COURSE OBJECTIVES:  To study the basic concepts and techniques 
used in interfacing a CPU to other system devices and components, 
using a lab-oriented approach.  The MC68332 microcontroller and 
Pentium PC are used for laboratory experiments.  Students are 
required to work individually or in teams.

REQUIRED TEXTS
1. Lipovski, G. J., "Single and Multi-Chip Microcontroller 
    Interfacing", Academic Press, 1999
2. Harman, T. L., "The Motorola MC68332 Microcontroller", 
    Prentice-Hall, 1991
3. CPU32 Central Processor Unit Reference Manual, Motorola Inc., 
    1990 (free from Motorola)

OPTIONAL TEXTS
1. Buchanan, W, "PC Interfacing, Communications, and Windows 
    Programming", Addison-Wesley, 1999
2. Mano, M., "Computer System Architecture", 3rd Edition, Prentice-
    Hall, 1993 OR any good text on computer architecture

DAILY COURSE SYLLABUS
In the following, "L1" means Lipovsky Chapter 1,  "H1" means 
Harman Chapter 1,  "C1" means CPU32 Reference Manual Chapter 
1, and so on.

Week	     Chapter		Topics, Assignments, Reports, Exams

1/4             --		Overview of Course

1/11	   L1, H1, H2		Review of Basic Von Neumann Concepts
				MC68332 Microcontroller, Real-Time
				and Embedded Systems

MARTIN LUTHER KING HOLIDAY - Monday, 1/17/00 (No Regular Classes)

1/18	    M1, M2		Hardware Considerations
				Digital Logic/Devices, Memory, 
				Addressing/Decoding, Addr/Data Bus

1/25    L1-L2, H3, M3		Programming Considerations
				Number Systems, Assemblers, Languages, 
				Development Tools

2/1	  H4-H9, C1-C4		Programming Considerations (Cont'd)
				MC 68332 Instruction Set & Programming
				Lab 1
	
2/8	  L4, L9, H12		Serial Interfacing and Communications
				UART, QSM, Serial Ports

2/15	   L4, H14		Parallel Interfacing
				PIA, SIM, Parallel Ports
				Lab 2

2/22	L3-L6, H10-H11  	Interrupts, Busses, System Control
	    C5-C6		Mid-Term Exam

2/29          L7		Analog Interfacing
				D/A, A/D

SPRING RECESS - Sunday 3/5/00 to Sunday 3/12/00 (No Classes)

3/14	    L8, H15		Counters and Timers
				Lab 3

3/21	  H15, handout		Process Control, Data Acquisition
				Real-Time Interfacing/Programming

3/28	 B27, B34, B37		Device Drivers for Operating Systems
				(e.g. Windows NT)
				Lab 4

4/4	    L9-L10		Miscellaneous Interfacing Topics
				eg. Video, Graphics, ADB, Mouse, Keyboard

4/11	    L9-L10		Miscellaneous Interfacing Topics (Cont'd)
				Review for Final Exam
					
Last class is on Tuesday 4/11/00.
Final exam will cover the entire course and will be on Tuesday 
4/25/00, 7:30-10:30 pm.

GRADING
Four Labs (or Assignments) --------	 40	A 90-100	This scale may
Mid-Term Exam ---------------------	 30	B 80-90		be relaxed but
Final Exam  -----------------------	 30	C 70-80		will not be
                                        ----	D  60-70	raised.
			Total --------  100	E  0-60

IMPORTANT NOTES ABOUT THE CLASS

1.  Due Dates:  Lab reports (or assignments) are due as indicated 
on handout and should be turned in during class.  Late reports 
can be turned in to the CIS secretary in 114 ELB.  Such reports 
must be initialed by the secretary and the date and time when 
received must be written on the report by the secretary.  If this 
is not done, instructor will use the date when picked up by the 
instructor.  Since instructor does not pick up mail everyday, 
this date may be several days after the report is turned in.  
Penalty for late reports is -5% per weekday (-50% max).

2.  Computer Access:  Dial-up access to the campus computing 
facilities is available through Merit/Michnet.  Direct-wired 
access and several workstations and PC's are available at various 
labs on campus.

3.  E-Mail:  Students may use electronic mail to communicate with 
the instructor.

4.  Comments in Programs:  It is good programming practice to put 
lots of comments in programming assignments.  It is required to 
include your name, course number, and instructor's name as 
comments in all programming assignments.

5.  Laboratories:  Lab experiments will be performed using a 
MC68332 development board.  You will work in pairs in the 
laboratory.  The instructor and a student assistant will be 
available to help with the labs.  Both members of a pair are 
expected to participate in the lab.

6.  Cheating Policy:  The work submitted must be that of the team 
or individual student.  The minimum penalty for cheating will be 
a zero for the plagiarized work.

7.  Attendance Policy:  You are responsible for all activities that 
transpire in all classes.  This includes exams, assignments, 
announcements, and so on.  If you miss a class, you should obtain 
notes from a classmate.

8.  Exams  are based on class notes/discussions.  The texts provide 
background reading.  Make-up exams are only given in exceptional 
cases.  Such cases must be properly documented and the instructor 
must be notified in advance.


T Y P I C A L  A S S I G N M E N T  1					

NAME: __________________________________________

This assignment replaces lab 1.  It consists of 3 questions from the 
Lipovski text and 13 questions from the Harman text.  Give only the 
final answer in all cases.  If you wish, you may attach your 
detailed solution as additional pages.  Answers that do not 
terminate should be given correct to five decimal places unless 
otherwise specified.  The additional information/instructions in 
italic for each question is important.  In case of any conflict, the 
additional instructions on this sheet take precedence over the 
instructions in the texts.

LIPOVSKI, PAGE 115, #4    A 74HC133 chip being unavailable, use a 
drawing to show how to implement such a chip's function using the 
least number of 74HC04s and 74HC20s (see Figure 3.10).  Note that 
the 74HC04 consists of six inverters in one package (one chip), and 
the 74HC20 consists of two 4-input NAND gates in one package.

	-- attach your drawing to this sheet

LIPOVSKI, PAGE 116, #5A    A decoder chip being unavailable, use a 
drawing to show how to implement such a chip's function using the 
least number  of SSI gates as indicated (see Figure 3.10).
	a.  Implement a 74HC138 using 74HC04s and 74HC20s
Note that the 74HC138 is a 3-to-8 decoder.  Do not include the 
enable inputs, E1, E2, and E3, in your implementation.  Just assume 
the chip is always enabled.

	-- attach your drawing to this sheet

LIPOVSKI, PAGE 117, #10    Draw the block diagram of a completely 
specified decoder using arbitrarily large AND gates with appropriate 
bubble inputs and outputs, like Figure 3.9, for Table 3.3's memory 
map.  Include R/W and E control signals in each decoder as needed.   
Note that this question only asks for a block diagram.

	-- attach your drawing to this sheet

HARMAN, PAGE 40, #2.2.3    The MC 68332 CPU can address byte (8 
bits), word (16 bits), or longword (32 bits) operands.  For each 
operand length, draw a diagram showing the logical organization of 
an eight-byte buffer in memory starting at location 1000.  Label the 
bit positions and addresses.  A buffer is an area in memory that 
holds data temporarily during I/O transfers.   Just draw the 
diagrams.  Do not describe the differences.

	-- attach your drawing to this sheet

HARMAN, PAGE 40, #2.2.4    How many bits (address lines) are 
necessary to address a memory with:

	(a)  4096 locations
	(b)  65,536 locations
	(c)  16,777,216 locations

HARMAN, PAGE 40, #2.2.5    What is the largest program (in bytes) 
for a microcontroller with:

	(a)  16 address lines
	(b)  20 address lines
	(c)  24 address lines
	(d) 32 address lines

HARMAN, PAGE 56, #2.3.5    What are the general advantages and 
disadvantages of including a real-time operating system in a 
product?  Consider such factors as performance, flexibility, and 
cost.  Give one advantage and one disadvantage.  Give brief answers.


HARMAN, PAGE 63, #3.1.1.1    Convert the binary number   0100.01102    
to decimal.


HARMAN, PAGE 63, #3.1.1.3    Compute the decimal value of the 
following numbers:

	(a)  1309  
	(b) 0.76328  

HARMAN, PAGE 70, #3.1.2.1    Find the two's complement 
representation of the following numbers:

	(a) -064716  to 16 bits
	(b) -1110  to 16 bits

HARMAN, PAGE 70, #3.1.2.5    Determine the range of numbers for the 
sign-magnitude, one's complement, and two's complement forms for an 
m-bit representation if:

	(a)  m   = 8
	(b) m  =  16
	(c) m  = 32

HARMAN, PAGE 75, #3.1.3.1    Convert the following number as indicated:

	(d) 3510  to base 5

HARMAN, PAGE 85, #3.4.3    Show the machine representation of the 
number 255 in the following ways:

	(a) binary
	(b) Binary-Coded Decimal, give both packed and unpacked forms
	(c) ASCII

HARMAN, PAGE 131, #4.5.3    Translate the following machine-language 
statement, given in hexadecimal, into the assembler-language 
(symbolic) equivalent:

	(a) 4241

HARMAN, PAGE 131, #4.5.4    Write the machine-language instruction 
for the following symbolic instruction:

	(a)  CLR.W   D0

HARMAN, PAGE 165, #5.2.1    Write a routine to reserve a 20-word 
block of memory for storage and then initialize it to the successive 
values 1 through 20 upon execution.  Attach the handwritten or typed 
source listing.  You may complete one or both of the following 
optional tasks for extra credit of 5 or 10 points:

Extra Credit of 5 points:  Assemble your program using the assembler 
supplied in CD-ROM with the Lipovski text.  Attach the assembly 
listing to show that your program was assembled successfully.

Extra Credit of 5 points:  Execute your program using the emulator 
supplied in CD-ROM with the Lipovski text.  Attach a computer-
printed printout or other proof to show that your program was 
executed successfully.