Professional Documents
Culture Documents
Introduction to Microcontrollers
12/02/2013 Jacob Beningo
Course Overview
Introduction to Microcontrollers Selecting the Right Microcontroller An Overview of the STM32F4 Discovery Board Digital Signal Processing with the STM32F4 Introduction to Graphics Processing
Session Overview
Introduction to Microcontrollers Common Microcontroller Architectures Pipelining An Overview of Peripherals
Introduction to Microcontrollers
What is a microcontroller?
A microcontroller is a single chip with a processor core, embedded memory and input/output peripherals
Introduction to Microcontrollers
What are MCUs used for?
Introduction to Microcontrollers
Mobile (Battery Powered) Smaller Form Factors Lower Power Less expensive Cloud Connected IoT Moores Law
6
Introduction to Microcontrollers
Low Power Operation
Introduction to Microcontrollers
STM32L1x 128 Kbytes Flash die
Introduction to Microcontrollers
STM32L1
Full 1.8V 3.6V VDD range functionality @ 32 MHz
Aggressive consumption in Stop mode (25C @ 3.6V) with:
Stop Mode: 0.57 A
Introduction to Microcontrollers
MCU Supervisor Functions
Integrated reset & brown out detection Watchdog timers Internal / External high and low speed clock sources Single voltage supplies Internal programmable regulators
Results?
Smaller form factor Decreased BOM costs
10
Introduction to Microcontrollers
What peripherals does a microcontroller have?
Timers Digital Input / Output Analog to Digital Converters
I2C
SPI
Capacitive Touch
Quadrature decoding Memory Expansion
11
Introduction to Microcontrollers
Who manufactures microcontrollers?
12
Introduction to Microcontrollers
What makes up a microcontroller?
13
14
15
ARM Architecture
16
17
Pipelining
What is pipelining?
A technique for increasing the number of instructions that can be executed in a given period of time
18
Pipelining
An Example
19
Logic 0 or 1
Multiplexed with peripheral functions
Setup
Direction (Input or Output)
State (High or Low) Function select
Example Use
Drive an LED Control a relay Read a sensor state
20
Timers
Timers
8, 16, 32 bit counters Scalable based on the input clock frequency
Setup
Configure the input clock Setup type of timer
Use
System Tick Measuring timing High Precision Timers for SMPS Motor Control
21
Setup
Configure sample rate Setup Polling or ISRs Select channels to sample Convert the channels
Use
Read analog sensors
22
Setup
Select source device Select destination Enable peripheral Await trigger Transfer the data
Use
Transfer data to/from peripheral Move data around in memory
Images courtesy of ARM Ltd
23
Setup
Select memory regions Enable ranges See particular datasheet
Use
Operating Systems Task managers
24
UART or SCI
Peripheral
Transmit and Receive lines 8 or 16 bit transfer Up to 11.25 Mbps (115200 std)
Setup
Baud rate setup Configure pins Data in buffer
Use
Tx Data Rx Data
25
Setup
Select clocks Set Master/Slave Mode
Use
Transferring data off chip Retrieving off chip data
26
I2C
Peripheral
2 wire interface Addressable slaves Master drives clock 1000 kbps
Setup
Select clock Send data
Use
Sensor interfacing
27
USB
Peripheral
4 or 5 Wire Operation Modes Up to 480 Mbps
Setup
Device, Host, OTG? Use USB framework
Use
Interfacing to high speed devices Interfacing to external storage
28
Display Controllers
Peripheral
Segmented LCD Simple dot matrix SVGA color LCD
Setup
Depends on display Peripheral dependent
Use
Display text data Display basic images
29
Questions
Contact Info Jacob Beningo ( jacob@beningo.com ) www.beningo.com Jacob_Beningo
Beningo Engineering
JacobBeningo Embedded Basics
31