Cpr E 211
Microcontrollers & Digital Systems Design
Department of Electrical & Computer Engineering
Iowa State University

Spring 2007

Course Information

Cpr E 211 - Introduction to Microcontrollers

Course Description: Introduction to  microcontrollers.  Microprocessor registers, memory, and programmable input/output devices.  Interrupts.  Single chip controllers. Design and testing of software for  microcontrollersHardware/software design tradeoffs and issues. Individual design projects.

Prerequisite: Cpr E 210, Com S 207 or 227

Textbook: None

Reference Book: RCPU Reference Manual, MPC500 Family, Motorola, 1994 (provided with no cost)

Related Textbooks: (will not need to use)
Computer Organization & Design, Patterson & Hennessy, Morgan Kaufmann, 1998. (MIPS)
A Programmer's View of Computer Architecture, Goodman & Miller, Oxford University Press, 1993. (MIPS)
Introduction to Computer Systems: A Programmer's Perspective, Bryant & O'Hallaron, Prentice Hall, 2002. (Intel)
Fundamentals of Embedded Software, Lewis, Prentice Hall, 2002. (Intel)

C Programming Books: (may find these or similar books useful)
The C Programming Language, Brian W. Kernighan and Dennis M. Ritchie, 2nd edition, Prentice Hall, 1988. This is a famous book (the second author is the original designer of the C language); better for programmers in another language.
C: A Reference Manual, Harbison and Steele, Morgan Kaufmann, 1998. This is a standard reference; better as a reference than as an expository text.
Expert C Programming: Deep C Secrets
, Peter Van Der Linden, Prentice Hall, 1994. This explains many of the more confusing aspects of C; helpful for even experienced C programmers.

Website: http://class.ee.iastate.edu/cpre211/

Class Schedule: The class meets twice weekly for 75 minutes. The laboratory meets once a week. No lab in the first week.

Meeting Times and Places:

Lecture Session

TR 9:30-10:45, HOOVER 1213, with Dr. Zhao Zhang

Lab Times

Section

1

2

3

 4

Time

Tu
4:10PM-
6:00PM

Tu
6:10PM-
8:00PM

 F
10:00AM- 11:50AM

 W
4:10PM- 6:00PM

Note: All labs are in 1301 Coover. Labs do not meet during the first week of class. Labs start the second week.

The lab is open and available on Mondays. Check the lab schedule for availability on other days and times.

Instructional Staff:

Instructor

Zhao Zhang, 368 Durham, 294-7940, zzhang@iastate.edu
Office hours: Tu: 2-3PM; Th: 11AM-12noon

Teaching Assistant

Kritanjali Balakrishnan, kritan@iastate.edu
Lab sections 1 & 4 and homework grading
Office hours: Th 1:00-2:00PM, Cubicle F24 ALC Coover.

Fei Dong, dongfei@iastate.edu
Lab sections 2 & 3 and homework grading
Office hours: M 4:00-5:00PM, Cubicle B7 ALC Coover


By the end of the CprE 211 course, you should be able to:

Understand the PowerPC processor architecture
Be able to program in C and Motorola PPC assembly language
Be able to understand how C is converted to assembly code
Understand basic concepts of  microcontrollers
Understand basic computing concepts such as interrupts,  ISRs, and I/O subsystems
Do basic hardware and software debugging
Be able to work with, program, and design basic embedded systems


Why C, and why only C?
Why C?

·         This course is about low-level features in computers and programming, so we use a low-level programming language to emphasize that. Everything in C can be implemented on typical processors in a fairly straightforward manner, and it is thus often considered a high-level assembly language. Similarly, it exposes some details of the underlying machine, e.g., how data is stored in memory.

·         It is important to get experience in a variety of programming paradigms and languages.

·         To emphasize the importance of code documentation. Good code must be written so that others can understand it, and this requires extensive documentation. In higher-level languages, code is usually easier to understand.


Course Syllabus

3 lectures

Introduction to embedded systems

9 lectures

Embedded and C programming

15 lectures

Power PC instruction set and assembly programming

6-9 lectures

Interrupt handling and PPC interrupt unit details

6 lectures

Various timers & TPU

   

Policies and Procedures

Minimum Requirements 

  • Read all assigned material. 
  • Actively participate in class discussions. 
  • Satisfactorily complete all exams and other graded work. 
  • Participate fully in group projects (do your fair share of the work). 
  • Complete all work with an acceptable level of quality. 
  • Complete and submit a course evaluation. 
  • Follow University policy on integrity of scholarship and grades. 
  • If you have special learning needs, please contact the instructor to make suitable arrangements. 

General

  • You are required to access the course home page for relevant and timely information throughout the term.
  • Class attendance is required. Please make sure that you do not indulge in disruptive behavior such as newspaper reading and chatting.
  • There is no textbook for the course.
  • Be aware of the laboratory policies (see below).
  • Email is an effective way to communicate with the instructors and TAs. 

Grading

  • Some of your work is done in groups and some individually. An example of group work is regular laboratory exercises, and an example of individual work is homework. You are allowed to discuss homework and laboratory exercises, but you are not allowed to exchange answers or submit duplicate work.  Exams must be exclusively your work; cheating will be dealt with per University regulations. Academic dishonesty on class or laboratory work will be dealt with harshly and may result in a 0.0 for the course.

  • The following grading scheme will be used (* denotes group work):
    • Homework: 15%
    • Regular Laboratory Exercises: 25%
    • Laboratory Project*: 15%
    • Exam 1: 15%
    • Exam 2: 15%
    • Exam 3: 15%
    • TOTAL: 100%
  • Homework grading: Each homework will have a due date. It is due in the class on the due date. We will like you to finish the homework even if you are late. You can turn in a homework assignment late with 10% per day (week day or weekend) penalty until the solutions are published. One of your homework assignments, the one with the lowest score, will not be counted in your overall grade.
  • The grading is not on a fixed scale. It would be based on class distributions and our expectations based on prior class offerings.

Lab Policies

Pay special attention to the items in bold.

  • Lab attendance is mandatory. If you will be absent, you must notify the lab instructor by email or phone before the absence for it to be an excused absence. Unexcused absences may result in a zero for the corresponding lab(s) and is sufficient cause for a zero lab score for the semester, and in turn, a 0.0 grade for the course.
  • The lab period may begin with a timed skill-building exercise to be completed before the scheduled laboratory activity. Students should be in the lab and ready to begin promptly.
  • Students will typically work with partners or groups on lab work. Lab partners and roles may be rotated during the term to give students different learning experiences. A single prelab may be submitted by lab partners. The same score will be awarded on group work unless there is evidence to support different scores.
  • Prelabs are due upon instructor request at the beginning of the lab period before the lab is to be performed. The prelab should be submitted in typed form (well-drawn figures for schematics) along with the evaluation form from the lab webpage. There will be no credit for a late prelab.
  • The lab should be worked on during its corresponding lab period. If the lab is not completed during the lab period, it may be finished during any other unscheduled/open lab time. The lab must be demonstrated to your lab instructor no later than the beginning of the next regular scheduled lab time, otherwise it is considered late (it must be ready to demonstrate - students may not work on Lab i during the period for Lab i+1). The late penalty is 20% for a lab assignment turned in at any time within one week after its due. After one week it will not be accepted.
  • Work can be done outside formal lab times to verify and test hardware and software designs. Software design tools are available in the lab.
  • No handwritten reports or code will be accepted. All schematics, tables, text, figures, etc., must be printed using a word processor. Microsoft Word is available on the PCs in the lab. Access to printing is also available in the lab.
  • All code must be commented. This does include prelabs as well as the final version. For assembly code, this equates to a ratio of almost one line of code to one comment. In C, comment where necessary. For the labs, it is equally important to do the lab well as to get the correct solution.
  • Students will keep track of many files in Cpr E 211, and each student is responsible for creating and maintaining a directory on his/her U: drive for Cpr E 211.  Make sure that at the end of a lab, you have your own copy of your work. 
  • Grading will be based on evaluation forms as specified for each lab. Failure to complete the lab requirements (i.e., hand in graded work) will result in a zero for the lab and is sufficient cause for a zero lab score for the semester, and in turn, a 0.0 grade for the course.
  • CprE 211 labs are meant to be instructive and fun. You learn by being prepared. You learn by doing. You learn by working cooperatively. Enjoy!

Integrity of Scholarship and Grades

All students are to adhere to the University's policy relating to integrity of scholarship and grades as presented in the Student Information Handbook.