Course Outline (F2019)
COE538: Microprocessor Systems
|Instructor(s)||Vadim Geurkov [Coordinator]|
Phone: (416) 979-5000 x 6088
Office Hours: Thursday, 3-5 pm
Phone: (416) 979-5000 x 6076
Office Hours: TBA
|Calendar Description||This course introduces students to small microprocessor-based systems, with an emphasis on embedded system hardware and software design. Topics will include microprocessor architecture and structure, with an overview of 8- 16- and 32-bit systems, assembly language programming and the use of high-level languages. Basic input/output including parallel communications with and without handshaking and serial protocols. Hardware and software timing. Using interrupts and exceptions. Overview of single-chip microprocessors and controllers with an emphasis on the Freescale HCS12. The internal structure and design of peripheral devices. Memory system design and analysis. The use and structure of development tools such as (cross) assemblers or compilers, monitor programs, simulators, emulators, etc.
|Prerequisites||COE 328 and ELE 404 and MTH 314 and CEN 199|
- HCS12/9S12: An Introduction to Software and Hardware Interfacing, Huang, H.-W., Delmar Cengage Learning, 2010.
- Microprocessor Systems: Selected Course Notes, Clowes, K.
- Microcontrollers and Microcomputers: Principles of Software and Hardware Engineering, Cady, F., Oxford University Press, 2010.
- Introduction to Embedded Systems: Interfacing to the Freescale 9S12, Valvano J., Cengage Learning, 2010.
- HCS12 Microcontrollers and Embedded Systems, Mazidi, M., Causey, D., and Mazidi, J., Prentice Hall, 2009.
|Learning Objectives (Indicators) |
At the end of this course, the successful student will be able to:
- Use technical knowledge on microprocessor architecture, I/O interface and peripherals, assembly/C language programming and debugging methodology. Use design tools and related resources, microprocessor peripherals, assemblers, compilers, and monitor programs. (4a)
- Learn good practices in structuring a microprocessor control program. Apply the programming principles including top-down programming, bottom-up programming, and functional programming to define an accurate programming problem statement. Recognize that good problem definition assists the program design process.
Describe differences between the various approaches to solve a programming problem using assembly/C language. Select one specific approach. When it fails, analyze the cause of failure using standard programming and debugging methodologies. Based on the analysis, improve the existing approach. Integrate the new suggestions into the existing design plan. Judge the completeness and quality of the generated solutions. (4b)
- Describe the iterative process of programming/debugging assembly/C programs. Use debugging tools to generate information on the current state of a program. Use it to modify/improve the solution as needed. Incorporate and integrate feedback from the instructors and generate new knowledge about the programming problem. (4c)
- A student manages own time and processes effectively to achieve personal and team goals
- Assessment of laboratory and project
assignments on the correctness and quality of design, decomposing project
into key tasks, managing project to
meet timeline, code quality, language and
technical quality (6b)
- Produce lab and project reports using appropriate format, grammar, and citation styles for technical and non-technical audiences. (7a)
- Illustrate concepts including the structure of assembly/C language programs and obtained experimental results. (7b)
- - Understanding and establishment of project scope
- Planing tasks, allocating responsibilities, setting timelines to
meet project goals
- Identifying assumptions that may affect project success
- Communicating key project deliverables
in clear, concise manner
- Displaying a basic understanding of the
issues in managing the implementation
of the project
- Understanding task inter-relationships
and managing project accordingly to time deadlines
- Allocating tasks to team members and
coordinating dynamically as problems or
opportunities emerge (11b)
NOTE:Numbers in parentheses refer to the graduate attributes required by the Canadian Engineering Accreditation Board (CEAB).
3.0 hours of lecture per week for 13 weeks
2.0 hours of lab/tutorial per week for 12 weeks
|Labs and Quizzes|| 25 %|
|Project|| 10 %|
|Midterm Exam|| 25 %|
|Final Exam|| 40 %|
Note: In order for a student to pass a course with "Theory and Laboratory" components, in addition to earning a minimum overall course mark of 50%, the student must pass the Laboratory and Theory portions separately by achieving a minimum of 50% in the combined Laboratory components and 50% in the combined Theory components. Please refer to the "Course Evaluation" section for details on the Theory and Laboratory components.
|Examinations||Midterm exam in Week 8, one hour and fifty minutes, closed book (covers Weeks 1-5).|
Final exam, during exam period, three hours, closed-book (covers Weeks 1-13).
|Other Evaluation Information||Lab Project|
The lab assignments and the project (originally developed by Prof. Peter Hiscocks) involve a robot. The project is to program the eebot mobile robot with a navigation system that can find its way through a maze, reverse, and back its way out again. A possible variation on this is that the robot first learns the maze. Then it is started again at the beginning and should navigate the maze without errors. The project must be demonstrated during the demonstration week. The project report must be submitted on or before the end day of the semester. At the time of demonstration, students will also be required to submit the project source code electronically.
Labs will be graded 8 marks maximum for each lab, to a maximum of 40 marks which will be scaled to 20% of the final mark. And there will be lab quizzes at the end of labs 2, 3, 4 and 5, accounting for a maximum of 5% of the final mark. Credit for labs will be based on the quality of how well the project works (demonstration) and how well the student can answer questions about the lab. If answers to these questions are inadequate, the lab will be marked as 0, although the student will be given an opportunity to rectify his or her preparation. Partial marks may be assigned at the discretion of the instructor.
The Lab Project accounts for 10% of the final mark. The project must be demonstrated during the Demonstration Week. The project report must be submitted on or before the end day of the semester. It must include:
- A formal description of the work (at least 2 pages, no more than 5 pages)
- An appendix containing a hard copy of all source code (.asm file)
The proper report description should address the following:
- Overall approach and description of performance
- Main design decisions
- Problems encountered and their solutions
- Recommendations: how you would continue the project to make it even better and how you would try to fix any remaining bugs.
At the time of demonstration, you will also be required to submit your source code electronically. (You will be told how to do this.) The Project Evaluation will be done according to the following:
Evaluation of Lab Project (8%):
- 3.5% Basic functionality
- 3.5% Code quality
- 1.0% Extra functionality
Evaluation of Project Report (2%):
- 1.0% Report English quality
- 1.0% Report technical quality
All the labs are done individually. The lab project is done in groups of 3 students. Each student must also keep a complete and continuous record of the year’s lab activities.
Equipment should not be moved during the lab; if you believe equipment to be defective, report it to the lab instructor who will take care of the problem.
Labs are conducted using a Motorola HCS12-based microprocessor board and computer-aided design tools from Freescale, specifically "Special Edition: CodeWarrior for HCS12(X) Microcontrollers (Classic)".
To obtain a passing grade in the course, a student must obtain at least 50% in both the lab and theory portions of the course.
Introduction to COE 538 - Scope and objectives, management
Introduction to the HCS12 Microcontroller
- 1.3 Computer Hardware Organization
- 1.5 Memory system Operation
- 1.6 Program Execution
- 1.8 The HCS12 CPU Registers
- 1.9 HCS12 Addressing Modes
- 1.11 A Sample of HCS12 Instructions
HCS12 Assembly Programming
- 2.2 Assembly Language Program Structure
- 2.3 Assembly Directives
2, 3, 4
HCS12 Assembly Programming
- 2.5 Writing Programs to Do Arithmetic
- 2.6 Program Loops
- 2.7 Shift and Rotate Instructions
- 2.8 Boolean Logic Instructions
- 2.9 Bit Test and Manipulate Instruction
- 2.10 Program Execution Time
HW/SW Development Tools
- 3.2 Development Tools for the HCS12
- 3.8 Using CodeWarrior
Advanced Assembly Programming
- 4.10 Intro to Parallel I/O Port & Devices
- 4.11 Simple I/O Devices
Advanced Assembly Programming
- 4.3 Stack
- 4.4 What Is a Subroutine?
- 4.5 Issues related to Subroutine Calls
- 4.6 The Stack Frame
- 4.9 Subroutines for Creating Time Delay
Advanced Parallel I/O
- 7.5 The HCS12 Parallel Ports
- 7.7 Liquid Crystal Displays (LCDs)
- 7.8 The HD4478U LCD Controller
- 7.9 Interfacing Parallel Ports to a Keypad
- 6.2 Fundamental Concepts of Interrupts
- 12.2 Basics of A/D Conversion
- 12.3 The HCS12 A/D converter
- 12.4 The Functioning of the ATD Module
- 12.5 Procedure for Performing A/D Conversion
Interrupts, Clock Generation and Operation Modes
- 6.3 Resets
- 6.4 HCS12 Exceptions
- 6.6 Clock and Reset Generation Block
- 6.7 Real-Time Interrupt
- 6.11 HCS12 Operation Modes
- 8.3 Standard Timer Module
- 8.4 Timer Counter Register
- 8.5 Input-Capture Function
- 8.6 Output-Compare Function
- 8.7 Pulse Accumulator
- 8.8 Modulus down Counter
C Language Programming
- 5.3 Types Operators and Expressions
- 5.4 Control Flow
- 5.5 Input and Output
- 5.6 Functions and Program Structure
- 5.7 Pointers Arrays Structures and Unions
- 5.8 Writing C Programs to Perform Simple I/O
- 5.11 Using the CodeWarrior to Develop C Programming
1-4, 6, 7, 12
(Covers all material up to week 5)
Serial Communication Interface
- 9.3 The RS-232 Standard
- 9.4 The HCS12 SCI
- 9.5 SCI Baud Rate Generation
- 9.6 The SCI Operation
- 9.9 Interfacing SCI with TIA-232
The SPI Function
- 10.2 Introduction to the SPI Function
- 10.3 Registers Related to the SPI Subsystem
- 10.4 SPI Operation
- 10.5 SPI circuit connection
- 10.6 Configuration / Data Transfer in SPI
- 10.8 The 74HC595 Shift Register
Inter-Integrated Circuit (I2C) Interface
- 11.2 The I2C Protocol
- 11.3 An Overview of the HCS12 I2C Module
- 11.4 Registers for I2C Operation
- 11.5 Programming the I2C Module
Internal Memory Configuration and External Expansion
- 14.3 Internal Resource Remapping
- 14.4 Expanded Memory Mapping
- 14.7 HCS12 External Memory Interface
- 14.9 Memory Devices
- 14.10 Example of External Memory Expansion for the HCS12
Review and Catch Up
Final Exam - Covers material up to end of week 13
Lab 1: Using the CodeWarrior IDE and Introduction to Assembly Language Programming
Lab 2: Programming the I/O Devices
Lab 3: Battery and Bumper Displays
Lab 4: Motor Control & Using the Hardware Timer
Lab 5: Robot Roaming Program
Project: Robot Guidance Challenge
Policies & Important Information:
- Students are required to obtain and maintain a Ryerson e-mail account for timely communications between the
instructor and the students;
- Any changes in the course outline, test dates, marking or evaluation will be discussed in class prior to being implemented;
- Assignments, projects, reports and other deadline-bound course assessment components handed in past the due date will receive a mark of ZERO, unless otherwise stated. Marking information will be made available at the time when such course assessment components are announced.
- Refer to our Departmental FAQ page for information on common questions and issues at the following link: https://www.ee.ryerson.ca/guides/Student.Academic.FAQ.html.
Missed Classes and/or Evaluations
When possible, students are required to inform their instructors of any situation which arises during the semester which may have an adverse effect upon their academic performance, and must request any consideration and accommodation according to the relevant policies as far in advance as possible. Failure to do so may jeopardize any academic appeals.
- Health certificates - If a student misses the deadline for submitting an assignment, or the date of an exam or other evaluation component for health reasons, they should notify their instructor as soon as possible, and submit a Ryerson Student Health Certificate AND an Academic Consideration Request form within 3 working days of the missed date. Both documents are available at https://www.ryerson.ca/senate/forms/medical.pdf.. If you are a full-time or part-time degree student, then you submit your forms to your own program department or school;
- Religious, Aboriginal and Spiritual observance - If a student needs accommodation because of religious, Aboriginal or spiritual observance, they must submit a Request for Accommodation of Student Religious, Aboriginal and Spiritual Observance AND an Academic Consideration Request form within the first 2 weeks of the class or, for a final examination, within 2 weeks of the posting of the examination schedule. If the requested absence occurs within the first 2 weeks of classes, or the dates are not known well in advance as they are linked to other conditions, these forms should be submitted with as much lead time as possible in advance of the absence. Both documents are available at www.ryerson.ca/senate/forms/relobservforminstr.pdf. If you are a full-time or part-time degree student, then you submit the forms to your own program department or school;
- Academic Accommodation Support - Before the first graded work is due, students registered with the Academic Accommodation Support office (AAS - www.ryerson.ca/studentlearningsupport/academic-accommodation-support) should provide their instructors with an Academic Accommodation letter that describes their academic accommodation plan.
Ryerson's Policy 60 (the Academic Integrity policy) applies to all students at the University. Forms of academic misconduct include plagiarism, cheating, supplying false information to the University, and other acts. The most common form of academic misconduct is plagiarism - a serious academic offence, with potentially severe penalties and other consequences. It is expected, therefore, that all examinations and work submitted for evaluation and course credit will be the product of each student's individual effort (or an authorized group of students). Submitting the same work for credit to more than one course, without instructor approval, can also be considered a form of plagiarism.
Suspicions of academic misconduct may be referred to the Academic Integrity Office (AIO). Students who are found to have committed academic misconduct will have a Disciplinary Notation (DN) placed on their academic record (not on their transcript) and will normally be assigned one or more of the following penalties:
- A grade reduction for the work, ranging up to an including a zero on the work (minimum penalty for graduate work is a zero on the work);
- A grade reduction in the course greater than a zero on the work. (Note that this penalty can only be applied to course components worth 10% or less, and any additional penalty cannot exceed 10% of the final course grade. Students must be given prior notice that such a penalty will be assigned (e.g. in the course outline or on the assignment handout);
- An F in the course;
- More serious penalties up to and including expulsion from the University.
The unauthorized use of intellectual property of others, including your professor, for distribution, sale, or profit is expressly prohibited, in accordance with Policy 60 (Sections 2.8 and 2.10). Intellectual property includes, but is not limited to:
- Lecture notes
- Presentation materials used in and outside of class
- Lab manuals
- Course packs
For more detailed information on these issues, please refer to the Academic Integrity policy(https://www.ryerson.ca/senate/policies/pol60.pdf) and to the Academic Integrity Office website (https://www.ryerson.ca/academicintegrity/).
Important Resources Available at Ryerson
- The Library (https://library.ryerson.ca/) provides research workshops and individual assistance. Inquire at the Reference Desk on the second floor of the library, or go to library.ryerson.ca/guides/workshops
- Student Learning Support(https://www.ryerson.ca/studentlearningsupport) offers group-based and individual help with writing, math, study skills and transition support, and other issues.