+ All Categories
Home > Documents > Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers....

Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers....

Date post: 04-Sep-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
33
Embedded Systems Embedded Systems and Microcontrollers and Microcontrollers
Transcript
Page 1: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Embedded SystemsEmbedded Systemsand Microcontrollersand Microcontrollers

Page 2: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

What is anWhat is anembedded system?embedded system?

Page 3: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

DefinitionDefinitionAn embedded system is a computer system with a dedicated function within a largermechanical or electrical system, often withreal-time computing constraints. Itis embedded as part of a complete deviceoften including hardware and mechanicalparts. Embedded systems control manydevices in common use today.(https://en.wikipedia.org/wiki/Embedded_system)

Page 4: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Embedded systems control manyEmbedded systems control many

devices in common use today...devices in common use today...

Page 5: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

How many CPU's in this picture?How many CPU's in this picture?Car seat from a2004 trade show

Page 6: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

How many CPU's in this picture?How many CPU's in this picture?Car seat from a2004 trade show

And this is just theseat adjustment...

Page 7: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Example car network:Example car network:

Page 8: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

2013:8 bit: 6.7 B16 bit: 7.8 B32 bit: 4.2 B

Page 9: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Why should youWhy should youcare?care?

Page 10: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

A growing embedded worldA growing embedded world

More products arebecoming "smart" and"connected" and all of thecompanies developingthem are looking forpeople who know how todevelop for embeddedsystems.

Page 11: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

A practical skillA practical skillDIY projects usually aren't done with a laptop attached to everything.

Page 12: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Parts of anParts of anembedded systemembedded system

Page 13: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

One look at an embedded systemOne look at an embedded system

Page 14: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

ImportantlyImportantlyCPUInputOutputMemory

Page 15: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

CPUsCPUsA quick tour of popularA quick tour of popular

microcontrollers and other CPUsmicrocontrollers and other CPUs

Page 16: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Bare 8 bit CPUsBare 8 bit CPUsMany many many options.... Pros:

Dirt cheap ($2-6)Scales wellSmall form factor

Cons:

Need some EE knowledge toset up.Usually need additional partsfor minimum productOften need specialprogramming tools/software

Page 17: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

MicrocontrollerMicrocontrollerBoardsBoards Pros:

A lot of documentationEasy to get startedPlenty of 3rd party add-ons

Cons:

More costly ($15-25)Still somewhat limiting incertain applications

Page 18: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Computer on aComputer on aboardboardPros:

PowerfulSimilar to writing software mostpeople are used to Comprehensive inputs/outputs

Cons:

Much more expensive ($40-$70)Has similar problems to acomputerLarger power requirementsUsually can't be "Programmed"

Page 19: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Input/OutputInput/OutputHow to get your data in orHow to get your data in or

out of the real worldout of the real world

Page 20: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Basic DigitalBasic DigitalThe most basic way toexchange information.

Nearly all CPUs haveaccessible input/output pinsand are able to use those pinsto output a 1 or 0. (or listenfor a 1 or 0)

Page 21: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Basic AnalogBasic AnalogEasy way to interface a CPU with"The real world"

Many things don't just outputones and zeros. Solution: Use converters!Digital to analog converter (DAC)Analog to digital converter (ADC) Data is represented as a valuefrom a range.

Page 22: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

SerialSerialThe basis of a simple two wayconnection since 1962. (RS232)

Needs 2 wires to implementTransmit/Receive (Tx/Rx)Often a 3rd ground wire

One to one communicationIncluded on most devices

Page 23: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

SPISPILike serial, but more listeners!

Needs 3+n wires toimplement n listeners

Clock, Tx, Rx, and a selectfor each listener

One to many communicationAlso included on most devicesWith many listeners, theselect lines can becomeannoyingUsed in many commericaldevices today

Page 24: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

I²C I²C "I squared C""I squared C"

Flexible and featureful

Needs 2 wires to implementSDA & SCLOften a 3rd power wire

Many to many communicationPretty complicated, outsidethe scope of this presentation.

Page 25: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

InputInputLight sensor (Analog)Force/Pressure (Analog)Accelerometer (Serial)Gyroscope (Serial)Potentiometer (Analog)RFID (Serial)Distance (I2C)pH (I2C)Temperature (I2C)Motion (Serial)Geiger counter (Serial)Heart rate (Serial)Alcohol Sensor (I2C)Vibration Sensor (Analog)Camera (Video codec)GPS (Serial)

OutputOutputSpeakers (Analog)LEDs (Analog)

Many possibilitiesScreens (Parallel/Serial)Motors (Analog)Servos (Digital)Other devices!

Page 26: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Embedded codingEmbedded codingissues/tricksissues/tricks

Some stuff you might run intoSome stuff you might run into

Page 27: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Coding tricksCoding tricksSimple 8 and 16 bit CPU's aren't always themost featureful, and not every system has anice C compiler. (Thankfully most do)

What do you do if your chip only has an 8bit multiply?

Shift and AddWhat you only have 3 registers?

Have to put the return elsewhere

^ Real problems addressed in CMU's embedded courses

Page 28: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Not the sameNot the sameold x86old x86

What is an "int"How many bits?

What exactly does one do with a triple de-refrence and add operator?

Thankfully, most widely used chips today useinstruction sets that have C or other languagecompilers.

Page 29: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Robustness and SafetyRobustness and Safety

Would you trust the person sitting next to you todesign your car's breaking system?

What about the an airplane flight control system?

Page 30: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Robustness and SafetyRobustness and SafetySome important concerns for safe embedded systems:

Floating point Imprecise, not safe to accumulate values in

Patriot Missile incidentRedundant systems!

There shouldn't be only one set ofwires between the pilot and the engines!

Watchdog and rebootingMars rover "freeze"Multiple reboot levelsIs it safe to reset?

Failsafe vs Faildeadly

Page 31: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Robustness and SafetyRobustness and SafetyMost importantly:

"If safety is not baked into the recipe in theprocess of creating the product, it cannot be

added later."-Philip Koopman, Embedded Professor at CMU

Page 32: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

I want more?I want more?18-348/34918-348/349

More hardware/More software

Page 33: Embedded Systems and Microcontrollers · 2015. 11. 4. · Embedded Systems and Microcontrollers. What is an embedded system? Definition An embedded system is a computer system with

Thanks for coming!Thanks for coming!


Recommended