Welcome to ECE251! Introduction to Microprocessors

Similar documents
Syllabus - ESET 369 Embedded Systems Software, Fall 2016

Computer Science. Embedded systems today. Microcontroller MCR

Embedded System Design

CS 101 Computer Science I Fall Instructor Muller. Syllabus

BUS Computer Concepts and Applications for Business Fall 2012

Penn State University - University Park MATH 140 Instructor Syllabus, Calculus with Analytic Geometry I Fall 2010

Microcontroller VU

A Practical Approach to Embedded Systems Engineering Workforce Development

Computer Organization I (Tietokoneen toiminta)

Computer Architecture CSC

Computer Science 1015F ~ 2016 ~ Notes to Students

CIS Introduction to Digital Forensics 12:30pm--1:50pm, Tuesday/Thursday, SERC 206, Fall 2015

FUZZY EXPERT. Dr. Kasim M. Al-Aubidy. Philadelphia University. Computer Eng. Dept February 2002 University of Damascus-Syria

CS 1103 Computer Science I Honors. Fall Instructor Muller. Syllabus

INTERMEDIATE ALGEBRA Course Syllabus

Math 181, Calculus I

CS 100: Principles of Computing

Social Media Journalism J336F Unique ID CMA Fall 2012

Computer Science 141: Computing Hardware Course Information Fall 2012

CIS 2 Computers and the Internet in Society -

MTH 215: Introduction to Linear Algebra

Required Materials: The Elements of Design, Third Edition; Poppy Evans & Mark A. Thomas; ISBN GB+ flash/jump drive

ENEE 302h: Digital Electronics, Fall 2005 Prof. Bruce Jacob

Class Meeting Time and Place: Section 3: MTWF10:00-10:50 TILT 221

ITSC 1301 Introduction to Computers Course Syllabus

CS 3516: Computer Networks

CALCULUS I Math mclauh/classes/calculusi/ SYLLABUS Fall, 2003

Course Specifications

Visual Journalism J3220 Syllabus

Class Tuesdays & Thursdays 12:30-1:45 pm Friday 107. Office Tuesdays 9:30 am - 10:30 am, Friday 352-B (3 rd floor) or by appointment

SAM - Sensors, Actuators and Microcontrollers in Mobile Robots

DIGITAL GAMING AND SIMULATION Course Syllabus Advanced Game Programming GAME 2374

EECS 700: Computer Modeling, Simulation, and Visualization Fall 2014

EECS 571 PRINCIPLES OF REAL-TIME COMPUTING Fall 10. Instructor: Kang G. Shin, 4605 CSE, ;

ASTRONOMY 2801A: Stars, Galaxies & Cosmology : Fall term

KOMAR UNIVERSITY OF SCIENCE AND TECHNOLOGY (KUST)

Psychology 102- Understanding Human Behavior Fall 2011 MWF am 105 Chambliss

Design and Creation of Games GAME

EDIT 576 (2 credits) Mobile Learning and Applications Fall Semester 2015 August 31 October 18, 2015 Fully Online Course

IMPROVED MANUFACTURING PROGRAM ALIGNMENT W/ PBOS

MGT/MGP/MGB 261: Investment Analysis

HUMAN ANATOMY AND PHYSIOLOGY II

EDIT 576 DL1 (2 credits) Mobile Learning and Applications Fall Semester 2014 August 25 October 12, 2014 Fully Online Course

Science Olympiad Competition Model This! Event Guidelines

Course Prerequisite: CE 2407 Adobe Illustrator or equivalent experience

ACCT 100 Introduction to Accounting Course Syllabus Course # on T Th 12:30 1:45 Spring, 2016: Debra L. Schmidt-Johnson, CPA

Accounting 312: Fundamentals of Managerial Accounting Syllabus Spring Brown

Spring 2015 Natural Science I: Quarks to Cosmos CORE-UA 209. SYLLABUS and COURSE INFORMATION.

CIS 121 INTRODUCTION TO COMPUTER INFORMATION SYSTEMS - SYLLABUS

Course Content Concepts

GACE Computer Science Assessment Test at a Glance

Phys4051: Methods of Experimental Physics I

English Policy Statement and Syllabus Fall 2017 MW 10:00 12:00 TT 12:15 1:00 F 9:00 11:00

Division Strategies: Partial Quotients. Fold-Up & Practice Resource for. Students, Parents. and Teachers

University of Waterloo School of Accountancy. AFM 102: Introductory Management Accounting. Fall Term 2004: Section 4

SYLLABUS- ACCOUNTING 5250: Advanced Auditing (SPRING 2017)

COURSE WEBSITE:

Course Syllabus for Math

PSYCHOLOGY 353: SOCIAL AND PERSONALITY DEVELOPMENT IN CHILDREN SPRING 2006

CS Course Missive

ITSC 2321 Integrated Software Applications II COURSE SYLLABUS

Spring 2016 Stony Brook University Instructor: Dr. Paul Fodor

We are strong in research and particularly noted in software engineering, information security and privacy, and humane gaming.

Pitching Accounts & Advertising Sales ADV /PR

Designing a Computer to Play Nim: A Mini-Capstone Project in Digital Design I

AC : FACILITATING VERTICALLY INTEGRATED DESIGN TEAMS

BUSINESS FINANCE 4265 Financial Institutions

Introduction to Information System

Software Development: Programming Paradigms (SCQF level 8)

MinE 382 Mine Power Systems Fall Semester, 2014

Strategic Management (MBA 800-AE) Fall 2010

SPM 5309: SPORT MARKETING Fall 2017 (SEC. 8695; 3 credits)

Office Hours: Day Time Location TR 12:00pm - 2:00pm Main Campus Carl DeSantis Building 5136

Financial Accounting Concepts and Research

Data Structures and Algorithms

CSCI 333 Java Language Programming Fall 2017 INSTRUCTOR INFORMATION COURSE INFORMATION

Pre-AP Geometry Course Syllabus Page 1

Fashion Design & Merchandising Programs STUDENT INFORMATION & COURSE PARTICIPATION FORM

MATH 1A: Calculus I Sec 01 Winter 2017 Room E31 MTWThF 8:30-9:20AM

UCC2: Course Change Transmittal Form

(Sub)Gradient Descent

VSAC Financial Aid Night is scheduled for Thursday, October 6 from 6:30 PM 7:30 PM here at CVU. Senior and junior families are encouraged to attend.

Houghton Mifflin Online Assessment System Walkthrough Guide

Shared Leadership in Schools On-line, Fall 2008 Michigan State University

Form no. (12) Course Specification

JN2000: Introduction to Journalism Syllabus Fall 2016 Tuesdays and Thursdays 12:30 1:45 p.m., Arrupe Hall 222

The Moodle and joule 2 Teacher Toolkit

ECON492 Senior Capstone Seminar: Cost-Benefit and Local Economic Policy Analysis Fall 2017 Instructor: Dr. Anita Alves Pena

Math 96: Intermediate Algebra in Context

Scottsdale Community College Spring 2016 CIS190 Intro to LANs CIS105 or permission of Instructor

CTE Teacher Preparation Class Schedule Career and Technical Education Business and Industry Route Teacher Preparation Program

San José State University Department of Psychology PSYC , Human Learning, Spring 2017

Chemistry 106 Chemistry for Health Professions Online Fall 2015

MKT ADVERTISING. Fall 2016

Biology 32 Human Anatomy & Physiology I Bakersfield College Fall 2017

Physics XL 6B Reg# # Units: 5. Office Hour: Tuesday 5 pm to 7:30 pm; Wednesday 5 pm to 6:15 pm

MAE Flight Simulation for Aircraft Safety


Jeff Walker Office location: Science 476C (I have a phone but is preferred) 1 Course Information. 2 Course Description

Aclara is committed to improving your TWACS technical training experience as well as allowing you to be safe, efficient, and successful.

Transcription:

Welcome to ECE251! Introduction to Microprocessors Tuesday, August 22 What this course is about: Syllabus, Labs, etc. Review of Number Systems, including simple math You learned this in ECE102 or its equivalent. Introduction to processor instructions Read: Chapters 1 and 2 Labs: STARTED YESTERDAY! #1 is an important and easy introduction of lab tools. Due next week! See web page under Lab Assignments (and look at Lab #2 now)! Homework: #1 Due Sept. 7. See web page under Homework. Web Page: (Bookmark this!) www.engr.colostate.edu/ece251/course_info.html This lecture (and all lectures) are on our web page ahead of time. Lecture #1 1

Just for Fun 1. Figure out the rules (inductive) 2. Solve it (deductive) Lecture #1 2

EE 251 Introduction to Microprocessors Course Syllabus: Fall 2017 Instructor: Dr. Bill Eads, Engr C103E Office phone: 491-0717 (during office hours only) Home phone: 667-6914 Phone calls welcome (until 10 pm!) email: EadsinCO@gmail.com Office hours: TR 9:30-10:30 or by appointment Lab TAs: Marcus Benzel mmb_mjb@yahoo.com Joel Kraft jkraft@rams.colostate.edu HW Grader: Aaron Davenport aaronjd@rams.colostate.edu Text: Embedded Systems with ARM Cortex-M Microcontrollers in Assembly Language and C, Yifeng Zhu ISBN 978-0-9826926-6-0 Third Edition Preferred. All Editions Acceptable. Lecture #1 3

Course Description: Microprocessor organization, assembly language, I/O techniques, real-time interfaces, applications, hardware and software. Prerequisite: ECE102 (Digital Circuit Logic) Grading and Exams: Midterm Exam 20% PRELIMINARY Final Exam 25% ((+/- grading used) Lab & Practicals 20% Grading is curved Homework Assignments 10% Quizzes & Participation 25% 45% Homework Schedule: Homework problems will usually be assigned every week or two and will be turned in to the white ECE251 box in the BC Infill. Late homework will not be accepted without prior instructor approval. Labs: There will be a series of 8 labs, typically due each week. There are two lab practical exams in lab during the course, focused on programming skills. Successful completion of all labs is required for a passing course grade. You are expected to work on all homework problems and labs yourself (or within your team for a few labs), but reasonable collaboration is allowed and encouraged. Lecture #1 4

Attendance (Physical and Mental) (Yes, I know how early 8 o clock is) Attendance in class: EXPECTED. No makeup on missed quizzes is allowed, but your lowest grade will be dropped. Alertness in class matters significantly do what works for you to be alert at 8 a.m. If you do not attend class regularly and alertly, you will probably not pass this course. Since this is a required course for many of you, that would mean you have to take it again. Don t do that to yourself! Quizzes: Quizzes will be given every week or two. Some will be scheduled; some will not be announced. You may not collaborate on quizzes. Note that quizzes are a quarter of your grade: more than the mid-term exam, more than labs, and more than homework. So SHOW UP and PAY ATTENTION! Lecture #1 5

Digital Logic Fundamentals Microprocessors: Major Components ECE 251 Course Outline ARM Cortex-M4 Microcontroller: Register Model & Memory Addressing ARM Cortex-M4 Assembly Language Programming ARM Cortex-M4 Instruction Set: Data transfer and manipulation instructions Arithmetic Instructions Logical and Bit Operations Branch Instructions Advanced Assembly Programming Software Delay Programming Techniques Assembly Process Loops Stack and Stack Pointer Subroutines and Parameter Passing Lecture #1 6

Exceptions Reset and Interrupts General Purpose (Parallel) I/O ECE 251 Course Outline (continued) MID-TERM Exam about here (Probably Oct. 5) Using Interrupts SysTick as a Real Time Clock Standard Timer Module Fixed and Floating Point Number Representations ARM Cortex-M4 Analog-to-Digital Converter System ARM Cortex-M4 Communication Systems Serial and Parallel Adding Memory to a Processor Final Exam: Tuesday, December 12, 6:20 pm, 1 to 1½ hours Lecture #1 7

ECE 251 Timing - Tentative 7/27/2017 Class Lecture/ # Lecture Topic (Chapter) Due Date Week Lab # Lab Topic 1 Intro, Numbers (2) 8/22 Week 1 SW Setup 1 2 ARM Microcontroller Components, etc. 8/24 Aug 21 Assy Prog'g 3 Loading and Storing Data (5) 8/29 Week 2 4 Arithmetic and Logic (4) 8/31 Aug 28 Adv Assy 2 5 Assembly Language and Assembler (3) 9/5 Week 3 Branch 6 Branching and Looping (6) 9/7 Sept 4 Simple Progs 7 Stack and Subroutines (8) 9/12 Week 4 8 Passing params to sub via reg (8.5) 9/14 Sept 11 Subroutines 3 9 Recursive sub calls (short) (8.7) 9/19 Week 5 and Stack 10 Parallel I/O (14) 9/21 Sept 18 11 Finish Parallel I/O; Interrupts Intro 9/26 Week 6 12 Interrupts and Resets (11) 9/28 Sept 25 Parallel I/O 4 13 Midterm review 10/3 Week 7 & Keybd Scan 14 Midterm exam 10/5 Oct 2 15 17 ATD (20) SysTick Real Time Clock (12) 10/10 10/17 Week 8 Week 9 16 18 ATD continued + 7-segment display Timer Module (15) 10/12 10/19 Oct 9 Oct 16 5 Practical #1 ATD 19 Timer Module continued 10/24 Week 10 Systick 6 20 Fixed- and Floating-point Arithmetic (11) 10/26 Oct 23 Timer 21 Instruction Encoding & Decoding (13) 10/31 Week 11 Timer & 22 Serial I/O (22) 11/2 Oct 30 Systick Clocks 7 23 SPI, LCD, Logic Analyzer, Lab 8 11/7 Week 12 Period, duty 24 UART (22.1) 11/9 Nov 6 cycle of sigs 25 UART continued; USB Overview (22.4) 11/14 Week 13 26 Memory I 11/16 Nov 13 27 Memory II 11/28 Week 14 8 SPI 28 Memory III 11/30 Nov 27 29 Guest Speaker: Future of Computers 12/5 Week 15 30 Final Exam Review 12/7 Dec 4 Practical #2 FINAL EXAM 12/12 6:40 p.m. Lecture #1 8

ECE 251 Lab We will use the Texas Instruments Tiva C Series TM4C123G LaunchPad Evaluation Kit. Tiva TM4C123GH6PMI Microcontroller. Lecture #1 9

ECE 251 Lab (continued) Each student will be provided a LaunchPad board. Board replacements will be available for broken boards, but you are responsible for the cost of any required replacement (about $12 ). Boards will be available through your Lab TA starting at this week s lab. You will work as INDIVIDUALS on most, but not all, lab projects Writing Programs Wiring Hardware Demonstrating requested functionality You will have a total of 8 lab assignments. Lab 1 started this week and is due next week at beginning of your lab time. This lab is important. It will introduce: Our processor instruction set, Our development board, Our software development environment. You must successfully complete ALL lab projects to pass the course! Lecture #1 10

ECE251 Lab Schedules 2017 Lab # Day Time TA L07 M 9-11:50 Joel L08 M 4:30-7:20 Marcus L09 T 10-12:50 Marcus L02 T 2-4:50 Marcus L01 W 12-2:50 Joel L05 W 5-7:50 Joel L03 F 8-10:50 Marcus L04 F 8-10:50 Joel Lecture #2 11

ECE251 Office Hour Options Joel Monday 1-2 Tuesday 3:30-4:30 Thursday 3:30-4:30 Marcus Monday 3:30-4:30 Tuesday 1-2 Wednesday 3-4 Aaron Wednesday 9:30-10:30 Wednesday 4-5 Tuesday 3:30-4:30 Thursday 3:30-4:30 Lecture #2 12

Some Helpful Tools But Not Required You might find it beneficial to have a 3+ digit voltmeter, wire strippers, diagonal wire cutters, needle nose pliers, and (maybe) a soldering iron. Lecture #1 13

Enough! Let s Get Going! Lecture #1 14

Brief Review--Number Systems (see text: 2.2-2.4) We can view a number as represented by: d 2 d 1 d 0. d -1 d -2 d -3 = d 2 a 2 + d 1 a 1 + d 0 a 0 + d -1 a -1 + d -2 a -2 + d -3 a -3 where a is the number base we use for this representation and d i is a digit in this number base: 0 d i a-1 For example, with BINARY: b 2 b 1 b 0. b -1 b -2 = b 2 2 2 + b 1 2 1 + b 0 2 0 + b -1 2-1 + b -2 2-2 and b i is 0 or 1 This is an excellent representation for digital systems, but poor for us to use. Why? Hint: Quick, what is 100101111010 2? Bigger than 100? 1,000? 1,000,000? Better choice for people: OCTAL (2 3 ) or HEXADECIMAL (or HEX) (2 4 ) Just a grouping of binary bits into groups of 3 or 4 bits. Straightforward for people to deal with. Why? One-to-one representation of what s happening inside the circuit. Lecture #1 15

Number Systems (cont d) E.g.: 100101111010 2 = 100 101 111 010 2 = 8 = 1001 0111 1010 2 = 0x (0x means HEX) 251 = 11111011 2 = 1111 1011 2 = 0xFB HEX advantage: Common bit lengths in computers (e.g. 16, 32, 64, 128 bits) are exact multiples of 4. I.e. they can be represented by complete hex digits. E.g. A 16-bit computer has a 16-bit address, which is represented by exactly 4 hex digits (4x4 = 16). How many octal digits would it take to represent a 16-bit address? Similarly, a 32-bit address can be represented by exactly hex digits. In ECE251 we use HEX as our representation of choice since our processor, ARM, uses it and because just about the whole computing world now uses it. Lecture #1 16

2 s Complement Representation Let s use an 8-bit example: b 7 b 0 number = -2 7 b 7 +2 6 b 6...+2 0 b 0 Therefore, if high-order bit is 0, number is a positive seven-bit number: 0100 0101= 0x45 = 69. Also, if high-order-bit is 1, the number is negative, but with an offset of -2 7 = -128. E.g. 1100 0101= -128 + 0x45 = -128 + 69 = -59. A quick way to compute the magnitude of a negative number is to take the negative of that number. Algorithm: Complement each bit Increment (add one to) the result. E.g. 1100 0101 0011 1010 + 1 = 0011 1011 = 0x3B = 59 Sure enough, the negative of -59 is 59! Done! I said it would be a brief review! Lecture #1 17

ARM Cortex-M4 Instruction Set These are the instructions our processor uses to perform tasks Called Thumb-2. Includes 16-bit instructions for small program size 32-bit instructions for high performance Several classes of instructions. E.g. memory reference instructions and math instructions Will go through the key Thumb-2 instructions over the next few weeks. Meanwhile, to give you a feel for these instructions, a simple example follows: Lecture #1 18

ARM Cortex-M4 Instruction Example LABEL OPERATION OPERAND COMMENTS mov r2,#10 ; move 10 into register #2 add r4,r2,#0xb ; [r2] + 0xB (goes into) r4 mov means move r2 is register number 2 #10 means the number 10 (base 10) add means add r4 is register number 4 #0xB is the number 0xB or 11 (base 10) Comments explain what is happening [r2] means contents of register number 2 What is the value in r4 (Hex) after these instructions? Lecture #1 19

KEIL μvision MDK KEIL is the brand name that ARM uses for its software for developing ARM code μvision (often written uvision) is the product name for this software MDK stands for Microcontroller Development Kit Project Manager (keeps all software files organized) Assembler (for our Thumb-2 instructions) and compiler (for C language which we WILL NOT use) Editor for creating and editing assembler code (text) Debugger Run program, single step program, run to a breakpoint, Examine and change register and memory values Lecture #1 20

Lab 1 Starts This Week (YESTERDAY) When you complete this lab, you should be able to: Understand the fundamentals of assembly programming Recognize and use a few basic Thumb-2 instructions Understand Keil μvision (a tool for embedded software developers who write software in assembly language or C for microcontrollers). Connect to our microprocess development board (TM4C123G) and download a program using Keil μvision. Run a program and examine changes to memory and registers. Use breakpoints and stepping to debug a program. Because you will perform all of these procedures in every lab, a complete understanding of the material in this lab is necessary. Lecture #1 21

Aren t We Starting Off Pretty Fast? Yep! We need to, because there s lots to do, and this μvision TM4C123G environment will be used from now on. It s best to get used to it as quickly as possible starting with simple tasks. This week is special for lab attendance. If you can t/didn t come to your assigned lab, come some other day. E.g. If you can come today but aren t in the Tuesday lab, you re welcome to come. Work with your lab TA to be sure you can attend SOME lab each week, especially if you have personal or class schedule conflicts in a specific week. But attend your assigned lab whenever possible. Lecture #1 22

Next Lecture will be on Questions? Microcontrollers and their components Our Processor s Register Model How Programs are Executed Short Review of State Machines (ECE102) Maybe more on number representation-if time permits Read Chapters 1, 2, and 3 (.1,.2,.4) in text Research this regarding ARM: What do these letters stand for? What do the letters in the R word stand for? ARM is a business. Who owns ARM? What do they make? These questions on a quiz are fair game! Lecture #1 23