Вы находитесь на странице: 1из 18

Embedded Systems/MCUs Textbooks

The ARM Program recommends the following textbooks


for educators & students in Embedded Systems/MCUs:

Fast and Effective Embedded Systems Design: Applying the ARM mbed
In English, by Rob Toulson and Tim
Wilmshurst
Published by Newnes
ISBN: 978-0-08-097768-3

ARM Assembly Language: Fundamentals and Techniques


Published by CRC
ISBN-10: 1439806101,
ISBN-13: 978-1439806104

ARM Assembly Language Programming & Architecture


Publisher: Mazidi & Naimi; 1.1 edition (Jan. 20,
2014)
Sold by: Amazon Digital Services, Inc.
ASIN: B00ENJPNTW

TI ARM Peripherals Programming and Interfacing: Using C Language


for ARM Cortex

Publisher: Mazidi and Naimi; 1.0 edition (June 23, 2014)


Sold by: Amazon Digital Services, Inc.
ASIN: B00L9DRAI2
Embedded Systems: Introduction to ARM Cortex-M Microcontrollers
Jonathan W. Valvano
Published by CreateSpace
ISBN-10: 1477508996
ISBN-13: 978-1477508992
Embedded Systems: Real-Time Interfacing to the ARM
Cortex-M3
In English, by Jonathan W. Valvano
Published by CreateSpace
ISBN-10: 1463590156
ISBN-13: 978-1463590154

Embedded Systems: Real-Time Operating Systems for the


ARM Cortex-M3
Jonathan Valvano
Published by CreateSpace
ISBN-10: 1466468866
ISBN-13: 978-1466468863

Physical

Introduction to Embedded Systems, A CyberSystems Approach

Edward Ashford Lee and Sanjit A. Seshia


Published by E. A. Lee and S. A. Seshia
ISBN: 978-0-557-70857-4

ARM Microcontroller Interfacing


Warwick A. Smith
Published by Elektor
ISBN-10: 0905705912
ISBN-13: 978-0905705910

ARM Microcontrollers, Part 1: 35 Projects for Beginners


Bert Van Dam
Published by Elektor
ISBN-10: 0905705947
ISBN-13: 978-0905705941

Assembly Language Programming: ARM Cortex-M3


by Vincent Mahout
Published by Wiley-ISTE
ISBN-10: 1848213298
ISBN-13: 978-1848213296

Fundamentals of Embedded Software with the ARM Cortex-M3

by Daniel W. Lewis
Published by Prentice Hall
ISBN-10: 0132916541
ISBN-13: 978-0132916547

Getting Started with the Internet of Things: Connecting Sensors and


Microcontrollers to the Cloud
by Cuno Pfister
Published by O'Reilly Media
ISBN-10: 1449393578
ISBN-13: 978-1449393571

Various Micrium on ARM Textbooks


In English
Published by Micrium

The Definitive Guide to the ARM Cortex-M3


by Joseph Yiu
Published by Newnes
ISBN-10: 0750685344
ISBN-13: 978-0750685344

The Definitive Guide to the ARM Cortex-M0


by Joseph Yiu
Published by Newnes
ISBN-10: 0123854776
ISBN-978-0123854773

Computers as Components: Principles of Embedded Computing System


Design
by Wayne Wolf
Published by Morgan Kaufmann
ISBN: 1-5586-0541-X

ARM Assembly Language - an Introduction


by J.R. Gibson
Published by Lulu.com
ISBN: 978-1-84753-696-9

ARM System Developer's Guide


by Andrew Sloss, Dominic Symes, and Chris Wright
Published by Morgan Kaufmann
ISBN: 1-55860-874-5

C Programming for Embedded Microcontrollers


by Warwick A. Smith
Published by Elektor
ISBN: 978-0-905705-80-4

Free ARMv7-AR, ARMv7-M, ARMv6-M, and ARMv5 Architecture


Reference Manual Downloads
edited by David Seal
Published by Addison-Wesley
ISBN: 0-201-73719-1

Embedded boards:
The ARM University Program recommends the following development boards for
teaching Embedded Systems/MCUs:

The FRDM-KL25Z is an ultra-low-cost development platform enabled by Kinetis


L Series KL1x and KL2x MCUs families built on ARMCortex-M0+ processor.
Features include easy access to MCU I/O, battery-ready, low-power operation, a
standard-based form factor with expansion board options and a built-in debug interface
for flash programming and run-control. The FRDM-KL25Z is supported by a range of
Freescale and third-party development software.

Freedom Development Platform:


http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=FRDM-KL25Z
Lab Exercise for Freescale Freedom KL25Z Board:
http://www.keil.com/appnotes/docs/apnt_232.asp

ARM and Energy Micro are official University Program partners providing teaching
materials and development tools at a low entry cost. The partnership encourages
learning and helps institutions start their own microcontroller training programs quickly.
Who is it for? The ARM and Energy Micro University Program partnership is primarily
intended for universities planning to expand their microcontroller labs. However, the
lecture series is also valuable for people wanting to learn more about microcontrollers in
general, with special focus on low power application development.
What is included? The Energy Micro University package contains several parts:
A series of lectures
Keil MDK-ARM Microcontroller Development Kit:
http://www.keil.com/arm/mdk.asp
Simplicity Studio - energyAware Designer and Profiler tools
A discounted package of at least 10 EFM32 Giant Gecko starter kits.

Especially valuable for universities trying to establish a low-power microcontroller lab


is the bundle with discounted kits. The package contains 10 EFM32 Giant Gecko Starter
Kits. Each kit contains everything you need, including debugging, power monitoring
(AEM) and peripherals.

mbed is a tool for rapid prototyping with microcontrollers.


Microcontrollers are getting cheaper, more powerful and more flexible, but there
remains a barrier to a host of new applications; someone has to build the first prototype!
With mbed, we've focused on getting you there as quickly as possible.
The mbed Compiler lets you write programs in C/C++, and then compile and download
them to run on the mbed microcontroller. It's all online, so you don't need to be a sysadmin to start. In fact, you don't have to install or setup anything to get started.

mbed.org
mbed Starter Kit:
http://skpang.co.uk/catalog/mbed-lpc1768-starter-kit-b-p-717.html
mbed Application Board:
https://www.sparkfun.com/products/11695
mbed Breakout Board
Application Note 207: Porting an mbed Project to Keil MDK-ARM:
http://www.keil.com/appnotes/docs/apnt_207.asp
mbed textbook:
http://mbed.org/cookbook/Textbook
The mbed Sponsorship Program aims to support worthy people doing worthy projects
with microcontrollers. We've allocated some mbed microcontrollers for use in projects
or activities that go towards an academic qualification or official engineering
achievement.

Development Board
A Full MCU development kit + tools

The STM32F0DISCOVERY helps you to discover the STM32F0 Cortex-M0 features


and to develop your applications easily. It includes everything required for beginners
and experienced users to get started quickly.
Based on the STM32F051R8T6, it includes an ST-LINK/V2 embedded debug tool,
LEDs, pushbuttons and an additional prototyping board for easy connection of
additional components and modules.
Cortex-M0-based STM32F0 Discovery:
http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF253215?
sc=internet/evalboard/product/253215.jsp

The STM32F4DISCOVERY helps you to discover the STM32F4 high-performance


features and to develop your applications easily. It includes everything required for
beginners and experienced users to get started quickly.
Based on the STM32F407VGT6, it includes an ST-LINK/V2 embedded debug tool, two
ST MEMS, digital accelerometer and digital microphone, one audio DAC with
integrated class D speaker driver, LEDs and push buttons and an USB OTG micro-AB
connector.
Cortex-M4-based STM32F4 Discovery:
http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF252419?
sc=internet/evalboard/product/252419.jsp

The STM32 Value line Discovery is the cheapest and quickest way to discover the
STM32. It includes everything required for beginners and experienced users to get
started quickly. The STM32 Value line Discovery includes an STM32F100 Value line
microcontroller in a 64-pin LQFP package and an in-circuit ST-Link
debugger/programmer to debug Discovery applications and other target applications. A
large number of free, ready-to-run application firmware examples are available
on www.st.com/stm32-discovery to support quick evaluation and development using the
LEDs, button and extension header to connect to other boards or devices.
Cortex-M3-based STM32F1 Discovery
http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF250863?
sc=internet/evalboard/product/250863.jsp

Keil offers starter kits based on the ARM Cortex-M-based microcontrollers. These kits
include an evaluation board, a Keil ULINK-ME USB-JTAG interface, as well as
the MDK-ARM software tools.

Keil Cortex-M Starter Kits


http://www.keil.com/boards/cortexm.asp
Lab Exercises for Keil MCBSTM32 Board with Serial Wire Viewer
http://www.arm.com/files/pdf/MCBSTM32C_LAB.pdf
Lab Exercises for NXP Cortex-M3 Keil MCB1768/58
http://www.arm.com/files/zip/NXP_Lab.zip
AN210: Running FreeRTOS on the Keil MCBSTM32 Board
http://infocenter.arm.com/help/topic/com.arm.doc.dai0210A/DAI0210A_freertos_on_m
cbstm32.pdf
MCB1700 Lab Manual for University of Waterloo ECE455
http://www.arm.com/files/pdf/ECE455LabManual_preliminary.pdf

The NuMicro NUC100 Series are 32-bit microcontrollers with embedded ARM
Cortex-M0 cores for teaching embedded systems. The Cortex-M0 provides 32-bit
performance and at a cost equivalent to traditional 8-bit microcontroller. NuMicro
NUC100 Series includes NUC100, NUC120, NUC130 and NUC140 product line.

The NuMicro NUC140 Connectivity Line with USB 2.0 full-speed and CAN
functions embeds a Cortex-M0 core running up to 50 MHz with 32K/64K/128K-byte
embedded flash, 4K/8K/16K-byte embedded SRAM, and 4K-byte loader ROM for the
ISP. It also equips plenty of peripheral devices, such as Timers, Watchdog Timer, RTC,
PDMA, UART, SPI, IC, IS, PWM Timer, GPIO, LIN, CAN, PS/2, USB 2.0 FS Device,
12-bit ADC, Analog Comparator, Low Voltage Reset Controller and Brown-out
Detector.

NuMicro NU-LB-NUC140 NuMicro NUC100 Series Learning Board


http://www.digikey.com/catalog/en/partgroup/nuc100-nuc120-nuc130-and-nuc140evaluation-board-nu-lb-nuc140/33533
NuMicro Cortex-M0 Development Kits
http://www.nuvoton.com/nuvotonmoss/community/productinfo.aspx?tp_guid=c78adfaf87ca-46d1-a15a-0d33583c2797

Chapter 1 Introduction

1.0 Introduction
An embedded system is some combination of computer hardware and software, either fixed
in capability or programmable, that is specifically designed for a particular function.
Industrial machines, automobiles, medical equipment, cameras, household appliances,
airplanes, vending machines and toys (as well as the more obvious cellular phone and PDA)
are among the myriad possible hosts of an embedded system. Embedded systems that are
programmable are provided with programming interfaces, and embedded systems
programming is a specialized occupation.
Certain operating systems or language platforms are tailored for the embedded market, such
as Embedded Java and Windows XP Embedded. However, some low-end consumer
products use very inexpensive microprocessors and limited storage, with the application and
operating system both part of a single program. The program is written permanently into the
system's memory in this case, rather than being loaded into RAM(random access memory)
like programs on a personal computer.
An embedded system combines mechanical, electrical, and chemical components along
with a computer, hidden inside, to perform a single dedicated purpose. There are more
computers on this planet than there are people, and most of these computers are single-chip
microcontrollers that are the brains of an embedded system. Embedded systems are a
ubiquitous component of our everyday lives. We interact with hundreds of tiny computers
every day that are embedded into:
- consumer electronics as: personal digital assistants (PDAs), mp3 players, mobile phones,
videogame consoles, digital cameras, DVD players, GPS receivers. Household appliances,
such as microwave ovens, washing machines, and dishwashers,
- home automation uses wired- and wireless-networking that can be used to control lights,
climate, security, audio/visual, surveillance, etc,
- advanced avionics such as inertial guidance systems and GPS,
- motor controllers for brushless DC motors, induction motors and DC motors,
- medical equipment for vital signs monitoring, electronic stethoscopes, and medical
imaging,
- telecommunications -telephone switches, cell phones, routers and network bridges,
- computer peripherals as printers and 3Dprinters.

As our world has become more complex, so have the capabilities of the microcontrollers
embedded into our devices. Therefore the world needs a trained workforce to develop and
manage products based on embedded microcontrollers.

1.0.1 Impact
We believe effective education requires students to learn by doing. In the traditional
academic setting this active learning is delivered in a lab format. A number of important
factors have combined that allow a lab class like this to be taught at this time. First, the
massive growth of embedded microcontrollers has made the availability of lost-cost
development platforms feasible. Second, your instructors have the passion, patience, and
experience of delivering quality lab experiences to large classes. Third, on-line tools now
exist that allow students to interact and support each other.
The overall educational objective of this class is to allow students to discover how the
computer interacts with its environment. It will provide hands-on experiences of how an
embedded system could be used to solve problems. The focus of this introductory course
will be understanding and analysis rather than design. It takes an effective approach to
learning new techniques by doing them. We feel we have solved the dilemma in learning a
laboratory-based topic like embedded systems where there is a tremendous volume of
details that first must be learned before hardware and software systems can be designed.

1.0.2 Approach and Learning Philosophy


The approach taken in this course is to learn by doing in a bottom-up fashion. One of the
advantages of a bottom-up approach to learning is that the student begins by mastering
simple concepts. Once the student truly understands simple concepts, he or she can then
embark on the creative process of design, which involves putting the pieces together to
create a more complex system. True creativity is needed to solve complex problems using
effective combinations of simple components. Embedded systems afford an effective
platform to teach new engineers how to program for three reasons. First, there is no
operating system. Thus, in a bottom-up fashion the student can see, write, and understand
all software running on a system that actually does something. Second, embedded systems
involve real input/output that is easy for the student to touch, hear, and see. Third,
embedded systems are employed in many every-day products, motivating students to see
firsthand, how engineering processes can be applied in the real world.
1.0.3 Audience and Background
This course is intended for beginning college students with some knowledge of electricity
as would have been taught in an introductory college physics class. Secondly, it is expected
students will have some basic knowledge of programming and logic design. No specific
language will be assumed as prior knowledge but this class could be taken as their second
programming class.

1.2 Structure and Objectives

The analog to digital converter (ADC) and digital to analog converter (DAC) are the chosen
mechanism to bridge the computer and electrical worlds. Electrical engineering concepts
include Ohms Law, LED voltage/current, resistance measurement, and motor control.
Computer engineering concepts include I/O device drivers, debugging, stacks, FIFO
queues, local variables and interrupts. The hardware construction is performed on a
breadboard and debugged using a multimeter (students learn to measure voltage). Software
is developed in C; all labs will be first simulated then run on the real microcontroller.
Software debugging occurs during the simulation stage. Verification occurs in both stages.
The course has 7 labs and, eventually, a final project. Students begin by learning the
fundamental concepts via lectures, interactive animations and readings. The second task is
for students to observe an expert working through an example lab project (interactive
tutorial where the students are required to follow along by building exactly what the
instructor is building). Third, students are examined to make sure they understand the
concepts by solving homework problems. Fourth, they are given a lab assignment where
they must design hardware and software. Students connect circuits to their microcontroller
board and write software to run on the board. The automatic grading system to verify
specifications have been met. If the students are unsuccessful they will interact with their
peers and be able to attempt the lab again.

1.2.1 Learning objectives:


Although the students are engaged with a fun and rewarding lab experience, the educational
pedagogy is centered on fundamental learning objectives. After the successful conclusion of
this class, students should be able to understand the basic components of a computer, write
C language programs that perform I/O functions and implement simple data structures,
manipulate numbers in multiple formats, and understand how software uses global memory
to store permanent information and the stack to store temporary information. Our goal is for
students to learn these concepts:
1. Understanding how the computer stores and manipulates data,
2. The understanding of embedded systems using modular design and abstraction,
3. C programming: considering both function and style,
4. The strategic use of memory,
5. Debugging and verification using a simulator and on the real microcontroller
6. How input/output using switches, LEDs, DACs, ADCs, motors, and serial ports,
7. The implementation of an I/O driver, multithreaded programming,
8. Understanding how local variables and parameters work,
9. Analog to digital conversion (ADC), periodic sampling,
10.Simple motors (e.g., open and closed-loop stepper motor control),
11. Digital to analog conversion (DAC), used to make simple sounds,
12.Design and implementation of elementary data structures.
The best way to understand what you will learn in this class is to list the labs you will
complete and the example projects we will build. You will complete each lab first in

simulation and then on the real board. For each module we will design a system and you
will build and test a similar system as part of the lab for that module.

1.3 Syllabus
Following is the liast of all modules, the corresponding examples we will build in each and
the relevant lab you will complete. Some of the modules do not have examples or labs.

Module 1: Welcome and Introduction to course and staff


Your Lab 1. Install the Keil IDE and drivers for programming the labs

Module 2: Fundamental concepts: numbers, computers, and the ARM Cortex M


processor
Our Example. Develop a system that toggles an LED on the LaunchPad
Your Lab 2. Run existing project on LaunchPad with switch input and LED output

Module 3: Electronics: resistors, voltage, current and Ohms Law

Module 4: Digital Logic: transistors, flip flops and logic functions

Module 5: Introduction to C programming


Our Example. Develop a system that inputs and outputs on the serial port
Your Lab 5. Write a C function and perform input/output on the serial port

Module 6: Microcontroller Input/Output


Our Example. Develop a system that inputs from a switch and toggles an LED output
Your Lab 6. Write C software that inputs from a switch and toggles an LED output

Module 7: Design and Development Process


Our Example. Develop a system that outputs a pattern on an LED
Your Lab 7. Write C functions that inputs from two switches and toggles an LED output

Module 8: Interfacing Switches and LEDs


Our Example. Develop a system with an external switch and LED
Your Lab 8. Interface an external switch and LED and write input/output software.

Module 9: Arrays and Functional Debugging


Our Example. Develop a system that debugs by dumping data into an array
Your Lab 9. Write C functions using array data structures that collect/debug your system.

Module 10: Finite State Machines


Our Example 1. Develop a simple finite state machine
Our Example 2. Develop a vending machine using a finite state machine
Our Example 3. Develop a stepper motor robot using a finite state machine
Your Lab 10. Interface 3 switches and 6 LEDs and create a traffic light finite state machine

Module 11: UART - The Serial Interface, I/O Synchronization


Our Example . Develop a communication network using the serial port
Your Lab 11. Write C functions that output decimal and fixed-point numbers to serial port

Module 12: Interrupts


Our Example 1. Develop a system that outputs a square wave using interrupts
Our Example 2. Develop a system that inputs from a switch using interrupts
Our Example 3. Develop a system that outputs to a DC motor that uses pulse width modulation
Your Lab 12. Design and test a guitar tuner, producing a 440 Hz tone

Module 13: DAC and Sound


Our Example. Develop a system that outputs analog signal with a R-2R digital to analog
converter
Your Lab 13. Design and test a digital piano, with 4 inputs, digital to analog conversion, and
sound

Module 14: ADC and Data Acquisition


Our Example 1. Develop a system that inputs an analog signal with an analog to digital
converter
Our Example 2. Develop an autonomous robot that uses two DC motors and two distance
sensors
Your Lab 14. Design and test a position measurement, with analog to digital conversion and
calibrated output

Module 15: Systems Approach to Game Design


Your Lab 15. Design and test a hand-held video game, which integrates all components from
previous labs.