This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Spring 2012 Edition Microprocessor System Design and Interfacing ECE 362 Course Introduction
Professor Dave Meyer Office: MSEE 238 Phone: 494-3476 494E-mail: firstname.lastname@example.org Course E-mail: email@example.com E- Description
Introduction to control-oriented controlmicroprocessor software, hardware, and interfacing Emphasis: basic computer engineering concepts Not a course about "personal" or generalgeneral-purpose computers, but about embedded microcontrollers Purpose
To provide an introduction to microprocessors, assembly language programming techniques, interface hardware design, and general computer engineering concepts Specifically geared toward meeting core ECE curriculum requirements Why This Course Is Important
Microcontrollers are used extensively in process control, instrumentation, home appliances, automobiles, etc. they represent a basic building block of modern digital systems design If you go into virtually any form of engineering design, there is a high probability that knowledge of microcontrollers will be required Prerequisites
Course on high-level language highprogramming (Purdue equivalent: CS 159) Course on digital logic design (Purdue equivalent: ECE 270) How will I apply what I learn in this course? Sample ECE 477 Senior Design Projects ECE 477 Digital Systems Senior Design Project - Spring 2007 We Will Find You
"We Will Find You" is a group of three distributed modules that detect and determine the location of a cell phone in a defined area.
Classroom Web Browser Mehmet Gunal, EE Brian Hemmersmeier, CompE Ali Mihankhah, Eric Naglich, EE CompE Block Diagram Triangulation Method The main module and a pair of satellite modules are placed to the corners of an isosceles triangular area. The power levels received by the antennas are transmitted to the main module. The location of the cellular phone is calculated by the main microcontroller using triangulation method. It is displayed on a web browser through Ethernet connection. PCB and Antenna Components Main and Satellite Modules PCB Layout
Project Specific Success Criteria An ability to send data from two satellite antenna modules to the main microcontroller. An ability to measure band-specific RF energy generated by cell phones through designed antennas and receivers. An ability to determine the position of a cell phone relative to the antenna modules' positions. An ability to render a graphical display of the position of the detected cell phone. An ability to calibrate the device for different sized detection areas based on triangular antenna arrangement. Digijock(ette)-Strength Digital System DesignTM ECE 477 Digital Systems Senior Design Project - Spring 2009 das Autotnr
A feat of Purdue engineering, das Autotnr is an automatic guitar tuner and MIDI transcription device. It has a motor assembly of six servo motors which turn the pegs of a guitar based to a default or user-defined tuning. A discrete Fourier transform is used to identify the fundamental frequency of a sound signal. The motors will adjust the strings to match the correct frequency. The frequencies can also be stored as a MIDI file to a USB mass storage device. Digijock(ette)-Strength Digital System DesignTM ECE 477 Digital Systems Senior Design Project - Spring 2007 SOUNDS GOOD / DS3 Digital Steerable Sound System
Joe Land, Ben Fogle, James O'Carroll, Elizabeth Strehlow PROJECT DESCRIPTION: USER MENUS CONCEPT:
-Digitally Steerable Sound System, allows for non-ideal placement of speakers -Six Preset Equalization Modes -Wireless Control Interface USER INTERFACE UNIT: PCB LAYOUT: ILLUSTRATION OF CONCEPT: LOUDSPEAKER UNIT: Top Copper Bottom Copper SIGNAL PATH: FRONT
Digijock(ette)-Strength Digital System DesignTM BACK Materials/References Required
NEED TO PURCHASE: Microcontroller Kit (on-line) (on"iClicker" student response unit iClicker" ThreeThree-ring binder for notes and lab manual PROVIDED ON COURSE WEBSITE: Numerous reference documents OPTIONAL REFERENCE TEXT: Programming the Motorola M68HC12 Family, Family, Gordon Doughman, RTC Books Doughman, Lecture Notes
Two versions available: Lecture Summary: intended primarily as a "skeleton reference" for taking notes during lecture Class Presentation: intended primarily for use as an "on screen" reference for annotating a printed copy of the Lecture Summary notes (annotated lecture slides, including Clicker Quiz questions) Posted in PDF form on the course web site Lab Experiments
The lab for this course is located in room EE 067 You must consistently attend the lab division for which you have registered Most lab experiments will be done independently PrePre-lab exercises that are assigned must be finished by the beginning of your scheduled lab Steps of experiments must be demonstrated to your lab instructor as they are completed All work for a lab must be completed by the end of your scheduled lab period MakeMake-ups require an excused absence and approval in advance from your lab instructor MiniMini-Project
Embedded system design based on Freescale 9S12C32 Microcontroller Kit Basic requirement is to design a product that makes good use of the processor's computational and interfacing resources Done in teams of 3-4 students (self-selected) (selfProject proposal due April 16 Project demos scheduled on a team-by-team team-bybasis starting April 23 Homework
Homework will be assigned on a regular basis due at the beginning of class solution discussed in class returned in lab Bring your class notes and reference materials with you to every lecture Bring your iClicker to each lecture (a properly registered, working clicker is required to receive class participation bonus credit) Attendance is required to receive class participation bonus credit - no exceptions will be made Course Calendar Facts About Learning Design
FACT: Very little learning occurs as a result of listening to a lecture about how to solve design problems (although careful notetaking promotes active encoding of information) FACT: Very little learning occurs as a result of reading about how to solve design problems FACT: Very little learning occurs as a result of watching someone else solve design problems FACT: We typically forget 90% of what we hear, hear, but remember 80% of what we actually do Conclusions
The best way to learn design-oriented designmaterial is to put it into practice! The best way to study for this course is to practice, practice, practice! practice, practice! There are no shortcuts!! shortcuts!!
Keys to success: Keep current and make success: good use of the learning resources available! Office Hours Use of "live" contact hours is encouraged for asking questions about the course material! Scheduled office hours for all course staff members will be posted on the course web site Lab Office Hours (Monday-Thursday, 7:00-10:00 PM) will start on January 17 Learning Outcomes
A student who successfully fulfills the course requirements will have demonstrated: 1. an ability to write programs for a microcontroller in assembly language 2. an ability to interface a microcontroller to various devices 3. an ability to effectively utilize microcontroller peripherals 4. an ability to design and implement a microcontroller-based embedded system Learning Outcome Assessment
Students must demonstrate basic competency in all learning outcomes to receive a passing grade For Outcomes 1-3, basic competency will be assessed 1based on a specific set of exam questions, for which a minimum score of 50% will be required Two opportunities will be provided for students to demonstrate Outcomes 1-3: (1) the primary assessment 1exams and (2) the remediation final Two opportunities will be provided for students to demonstrate Outcome 4: (1) the Embedded System Design Mini-Project, for which a minimum score of 50% Miniwill be required to demonstrate basic competency; and (2) the remediation programming final, for which a minimum score of 50% will be required to demonstrate basic competency Grade Determination
Bonus Exercises / Class Participation 90% to 100% A-, A, A+ 80% to 90% 70% to 80% 60% to 70% < 60% B-, B, B+ C-, C, C+ D-, D, D+ F % 16.0% 22.5% 1.5% 45.0% 15.0% 100+% Homework (3 sets @ 5%, Mini-Project Proposal @ 1%) Lab Experiments (9 @ 2.5%) Lab Notebook Evaluations (3 @ 0.5%) Primary Assessments (Outcomes 1-3 @ 15%) Embedded System Design Mini-Project (Outcome 4) Grade Determination
Calculation of Raw Weighted Percentage: RWP then "curved" (mean-shifted) with respect to (meanupper percentile of class, yielding the Normalized Weighted Percentage (NWP) Windowed Standard Deviation (WSD) for class is calculated based on statistics of "middle" 90% of class Cutoff Width Factor (CWF) is then max(WSD,10), i.e., max(WSD,10), the nominal cutoffs are 90-80-70-60 for A-B-C-D, 90-80-70Arespectively Grading Visualization (CWF=10) 30% 40% 30% 30% 40% 30% 30% 40% 30% 30% 40% 30% Grade Determination
Note: There are no A/B/C/D/F "quotas"! Goal: Minimize D/W/F grades!! Fall 2010 - Course GPA: 2.76 4.5% 4.5% 24%
1% E 2% I 36% 28% Spring 2011- Course GPA: 2.55 2011- 12% 8.5% 20.5% 29.5% 29.5%
0% E 0% I Fall 2011 - Course GPA: 3.10 9% 2.5% 7.5%
1% E 0% I 22% 58% Borderline Cases
A "borderline" is officially defined as an NWP within 0.5% of a cutoff Before course grades are assigned, the instructor will carefully examine all such cases to determine if the next higher grade is warranted IMPORTANT NOTE: The "next higher grade" is NOT AUTOMATICALLY GUARANTEED!! Once course grades are assigned, they are FINAL and will NOT be changed Incompletes and Conditional Failures
A grade of I will be given if a student is deficient in only one learning outcome, but has otherwise earned a grade of "C" "C or better (a grade of E will be given if the student has otherwise earned a grade of D) Deficiency in more than one learning outcome will result in a failing grade for the course The grade of I or E can be improved during the student's subsequent semester of enrollment by successfully demonstrating the deficient outcome on a Remediation Exam If the grade of I or E is not improved, it will automatically improved, revert to a failing grade Otherwise, a grade of I will be given only for cases in which there are documented medical or family emergencies that prevent a student from completing required course work by the end of the semester University Regulations stipulate that a student must be PASSING in order to qualify for a grade of I or E Academic Honesty
All cases of "cheating" will be reported to the Dean of Students Office and to the ECE Associate Head Activities that are considered to be cheating are listed in the COURSE POLICIES AND PROCEDURES document Resist the temptation to take short-cuts in shortschoolwork they inevitably lead to shortcuts in careers!! A professional person does not take credit for the work of someone else! Important Deadlines/Restrictions
All lab division changes must be done through MyPurdue Lab division changes will not be possible after the first week of classes No late homework or pre-labs will be accepted preRequests for make-up labs must be approved makein advance by your lab instructor Makeup exams for excused absences must be arranged in advance and completed during the week the exam is being administered Student Info Forms are due at the beginning of class on Wednesday, August 24 0 1 2 3 4 - 5 6 7 8 9
b i l l y j o e Student Info Form
(completed during first lab meeting) And we mean abide by! Needs to be more than a couple of sentences!!
1/11/2012 Words to the Wise
Everyone currently enrolled has the potential to do well in this course You will not do well, however, if you: don't come to class don't read the assignments before class fail to do the homework problems attempt to "cram before exams" merely "look at" the practice exams let your lab partner do all the work expect to "learn by osmosis" attempt to "cheat" in any way Let's Get Started!
The first part of this course will cover assembly language programming techniques The second part will cover microcontroller interface design techniques The third part will cover microcontroller peripherals and application examples The fourth part will cover embedded system design considerations All of the topics covered in this course have been carefully chosen, based on how the chosen, material will be used in later courses "Simple Computer" Flashback...
The Big Picture: LED Output Port Switch Input Port Start Clock Instruction Set
Definition: The instruction set of a computer is the set of operations the computer can be programmed to perform on data Instructions typically consist of several fields that indicate the operation to be performed ("operation code", or opcode) and the data on which the operation is to be performed (specified using an addressing mode) Our 8-bit computer will utilize a 3-bit opcode field (thus allowing 8 different kinds of instructions to be implemented) and a 5-bit address field (thus allowing 32 locations) Instruction Format
XXX indicates operation to perform YYYYY indicates location of operand Called a "two address machine" since one operand will be the accumulator ("A") register and the other operand will be obtained from the specified location in memory Instruction Mnemonics
Opcode 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 Mnemonic LDA addr STA addr ADD addr SUB addr AND addr HLT Function Performed Load A with contents of location addr Store contents of A at location addr Add contents of addr to contents of A Subtract contents of addr from contents of A AND contents of addr with contents of A Halt Stop, discontinue execution Note: We will use parentheses to denote the contents of a register or memory location, e.g., "(A)" is read as "the contents of A" Simple Programming Example
Addr 00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 Instruction LDA 01011 ADD 01100 STA 01101 LDA 01011 AND 01100 STA 01110 LDA 01011 SUB 01100 STA 01111 HLT Comments Load A with contents of location 01011 Add contents of location 01100 to A Store contents of A at location 01101 Load A with contents of location 01011 AND contents of 01100 with contents of A Store contents of A at location 01110 Load A with contents of location 01011 Subtract contents of location 01100 from A Store contents of A at location 01111 Stop discontinue execution Location 00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 01010 01011 01100 01101 01110 01111 Contents 00001011 01001100 00101101 00001011 10001100 00101110 00001011 01101100 00101111 10100000 10101010 01010101 Memory "Snapshot" Program Operands Results Location 00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 01010 01011 01100 01101 01110 01111 Contents 00001011 01001100 00101101 00001011 10001100 00101110 00001011 01101100 00101111 10100000 10101010 01010101 11111111 ADD: : 10101010 +01010101 11111111 CF = 0 NF = 1 VF = 0 ZF = 0 ADD Location 00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 01010 01011 01100 01101 01110 01111 Contents 00001011 01001100 00101101 00001011 10001100 00101110 00001011 01101100 00101111 10100000 10101010 01010101 11111111 00000000 AND: 10101010 01010101 00000000 CF = <unaffected> NF = 0 VF = <unaffected> ZF = 1 AND Location 00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 01010 01011 01100 01101 01110 01111 Contents 00001011 01001100 00101101 00001011 10001100 00101110 00001011 01101100 00101111 10100000 10101010 01010101 11111111 00000000 01010101 SUB: 10101010 -01010101 CF = 0 NF = 0 VF = 1 ZF = 0 10101010 10101010 + 1 1)01010101 Overflow! Sub Block Diagram
Functional blocks required: a place to store the program, operands, and computation results memory a way to keep track of which instruction is to be executed next program counter (PC) a place to temporarily "stage" an instruction while it is being executed instruction register (IR) a way to perform arithmetic and logic operations arithmetic logic unit (ALU) a way to coordinate and sequence the functions of the machine instruction decoder and micro-sequencer (IDMS) Instruction Decoder and Micro-Sequencer Start Clock Program Counter Opcode Address Instruction Register
Flags Data Memory
Address Data ALU Data Bus Address Bus ...
View Full Document
This note was uploaded on 02/12/2012 for the course ECE 362 taught by Professor Staff during the Spring '08 term at Purdue University-West Lafayette.
- Spring '08