ECE 2560 Introduction to Microcontroller-Based Systems Lecture 1
ECE 2560 Introduction to Microcontroller-Based Systems
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
Instructor: Irem Eryilmaz Email: Office: Dreese Lab 660
Class schedule: We Fr 4:10 pm – 5:05 pm Dreese 113 Office hours: To be announced
Communication: Email – Both ways
When sending email please start subject with “ECE 2560”
Email availability: I usually reply to emails within 24 hours on OSU days No promises over weekends or official holidays
No promises right before a deadline when I receive a burst of student email Þ Do not wait until the very last moment
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
Learning Objectives
ECE 2560 Introduction to Microcontroller-Based Systems
• Hardware and software organization of a typical microcontroller
• Assembly Machine language programming
• Interfacing peripheral devices, and input-output programming
• Real-time computer applications
Course Goals
• Learn the architecture, programming, and interface requirements of a
commercially used microprocessor
TI MSP430FR6989
• Learn to interface a microcontroller to memory, parallel ports, serial ports, etc.
• Learn to apply microcontroller systems to solve real-time problems
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
2560 within ECE Courses
Prerequisites and Co-requisites:
Prereq: 2000, 2060, 2061, …, or 2001 and prereq orconcur: 2000.07 or 2017; and EnGraph 167, CSE 1221, 1222 , Engr 1281.01H, 1281.02H, 1222, Engineer 192.01H, or 192.02H, and enrollment in ECE, CSE, or EngPhysics major; or prereq or concur: 2010 or 2067, and permission of department
Required Background:
Mostly self contained
ECE 2060 Digital Logic will help
• Numeral Systems, 1’s and 2’s complement – will review starting on Fr
Basic understanding of programming
• Flowcharts, pseudocode etc.
• Some fundamental algorithms
• Conditional statements (if), loops (for),
• Pointers and addressing – very straightforward in assembly ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
2560 within ECE Courses
What’s next?
ECE 3567 Microcontroller Lab
• Laboratory in which a microcontroller is used to interface real-world hardware to make a functioning system
• Same microcontroller (MSP430FR6989 LaunchPad Development Kit), same IDE (Code Composer Studio) but C instead of assembly
ECE 5362 Computer Architecture and Design (Prereq: 2560 and 3567) ECE 5462 HDL Design and Verification (Prereq: 5362)
ECE 5465 Advanced Microcomputers (Prereq: 5362)
ECE 5466 Embedded Computer Systems (Prereq: 5362)
ECE 3905 and ECE 4905 Capstone Design I and II
For more information: undergraduate academic advisor
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
Required Materials
Required Experimenter’s Board
• MSP430FR6989 LaunchPad Development Kit
Snap on ferrite bead
micro USB cable
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
Required Materials
Required Experimenter’s Board:
• MSP430FR6989 LaunchPad Development Kit
Where to get it?
https://www.ti.com/tool/MSP-EXP430FR6989
digikey.com mouser.com
$24 + ship – only 21 in stock! $26.60 + ship – 508 in stock
amazon.com — $$$$
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
What else do I need?
A computer with Code Composer Studio (CCS) Integrated development environment (IDE) we will use to
• upload to development board
• complete almost all assignments for this class
• write code
• run, test, debug…
Freely available from ti.com for different platforms
ECE Windows computer labs have CCS up and running
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
浙大学霸代写 加微信 cstutorcs
Other Materials
Optional Reference Book:
• MSP430, Microcontroller Basics
John H. Davies, Newnes, First Edition ISBN- 978-0-7506-8276-3
• No reading assignments
• No homework/quiz questions
Instead we will check TI user guides • SLAU627A.pdf
• SLAS789D.pdf
• SLAU367O.pdf
Discord channel for discussions
• Link in Carmen, please join with your real name and keep the community
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
Assignments and Grading
Assignments and % of Class Grade
• Midterms 1& 2
• Final Exam
[ 25% ] [ 30% ] [ 20% ] [ 30% ]
+ Graded Surveys
e.g., Office Hours Survey due Tuesday Expect
• a Mid-semester feedback survey
• a Final survey
Most assignments will be take home
• Last semester all assignments were take home and it worked fine
• Except many students completely forgot their way into the classroom
Attendance
• Still not mandatory, but highly encouraged
• Still plan to post lecture videos to Carmen – there might be delays/gaps
• After the first two weeks we will do in class coding – bring your laptop
• If too many students forget their way into the classroom, might do some in class quizzes as a reminder
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
Policies Around Assignments
You will have one week to work on your assignments
• While the assignments can be done in a few hours
This will give you a lot of flexibility with your timing
• Quizzes cannot be made-up
• Midterm and final examination may be made-up only due to illness that
lasts the whole week of the assignment (a doctor’s note is required)
Re: SLDS accommodations
• SLDS does not proctor take home exams
• Take home format already enables reduced distraction testing setting
• You can easily take 1.5x or 2x or 5x with your take home exam
Please reach out if you have any concerns
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
Programming Help, Add QQ: 749389476
Questions?
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
Microcontrollers
ECE 2560 Introduction to Microcontroller-Based Systems
• Hardware and software organization of a typical microcontroller
• Assembly / Machine language programming
• Interfacing peripheral devices, and input-output programming
• Real-time computer applications
What is a microcontroller?
How is it different from a microprocessor? Is it even different?
What is assembly language?
Why do we bother learning all these things?
What is machine language?
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
Code Help
Computers There are two types of computers
1. General-purpose computers 2. Embedded computers
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
Two Types of Computers
1. General-purpose computers
2. Embedded computers
• Runs any type of SW •
• Redundant resources •
• Multiple peripherals •
• Powerful processors
Dedicated to one application Minimal resources needed
Respond to some inputs: e.g., button press or sensor input
• Large data / program storage
• Operating system (OS)
• Multiple chips: e.g. CPU + RAM + hard drive
• Distributed architecture
• Send control signals to sub- systems Þ microcontroller
• Small data / program storage
• Mostly implemented on a single IC
• System on a Chip (SOC)
• 25 billion MCUs sold in 2018
• ~400 million PCs sold a year
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
MCU i.e., Microcontroller Unit
This is the MCU on our development board
System on Chip: It has the CPU, data and program memory, input/output and communication peripherals and more
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
Assembly Language
Low-level language that is closely tied to the machine code instructions of a processor
Machine code:
• Every processor has a set of instructions
• Each instruction is a numerical value composed of opcodes and operand
mov.b #0001000b, &P2OUT
Slightly more human readable mnemonics
Machine code
Numerical values – binary for the processor hex for compact notation
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
Levels of Languages
High Level: Python
Increased Human Readability
Increased Portability
Increased Processing
Low (!?) Level: C/C++ Very Low Level: Assembly
Efficiency and control
Fast Small code
Decreased Portability
Lowest Level: Machine Code
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
Why Assembly?
Assembly is
not very human readable
not portable: every processor has its own assembly but
allows for higher control over the resulting machine code faster
smaller code
Modern compilers are better in producing more efficient machine code from C
More MCU applications use C – embedded C
ECE 3567 MCU Lab
Learning assembly is more than knowing another programming language –
it allows you to understand how a processor works and allows you to write better programs even when using other languages
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
Revisiting Learning Objectives
Official Course Goals
• Learn the architecture, programming, and interface requirements of a commercially used microprocessor
• Learn to interface a microcontroller to memory, parallel & serial ports, etc.
• Learn to apply microcontroller systems to solve real-time problems
My Version of Course Goals
• Practice and develop problem solving skills
• Practice and develop clear thinking skills
• Learn to debug code
• Learn to test code
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz
Some Student Outcomes
• I had two things that stuck out to me the most: “The increase in my critical thinking to solve problems”
• When I used to code, I used to look at problems from more of a syntax point of view, now I look at it more from a logic point of view and it has made coding so much easier.
• The most important thing I learned is how to properly debug code. This is the first class I have taken here that involves coding that actually went through a method on how to debug code.
• In many other labs/classes in ECE we just follow instructions and copy code without needing to understand it. In this class, we write the code ourselves, which forces us to understand it. This made me feel a lot more accomplished when I was able to figure out the assignments, because it felt like I was doing something tangible on my own.
ECE 2560 Introduction to Microcontroller-Based Systems – Irem Eryilmaz