0% found this document useful (0 votes)
89 views21 pages

MicroController Training

The document provides an overview of microcontroller competency training, including: 1) An introduction to microcontrollers and how they differ from microprocessors. 2) A 10-step process for selecting a microcontroller that includes identifying interface needs, examining software architecture, and considering memory, cost, and power constraints. 3) Descriptions of common microcontroller components like power supply, clock, reset, GPIO, interfaces like UART, SPI, I2C, USB, and analog-digital converters. 4) Guidance on working with software teams to define interface requirements, peripheral needs, and pin mapping for the selected microcontroller.

Uploaded by

Khưu Minh Tấn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views21 pages

MicroController Training

The document provides an overview of microcontroller competency training, including: 1) An introduction to microcontrollers and how they differ from microprocessors. 2) A 10-step process for selecting a microcontroller that includes identifying interface needs, examining software architecture, and considering memory, cost, and power constraints. 3) Descriptions of common microcontroller components like power supply, clock, reset, GPIO, interfaces like UART, SPI, I2C, USB, and analog-digital converters. 4) Guidance on working with software teams to define interface requirements, peripheral needs, and pin mapping for the selected microcontroller.

Uploaded by

Khưu Minh Tấn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Hardware competency training

Micro-Controller

2
Agenda
 Introduction
 How to select MCU
 Power supply, Clock, Reset
 GPIO
 Interfaces: UART, SPI, SDIO, I2C, USB, Ethernet
 ADC, DAC
 Programming/debugging interface
 Interact with software team: documents to be prepared

2
Introduction
MicroController is an IC programmed to do specific tasks.

Microprocessors Microcontroller

General computing Dedicated for specific tasks


Applications (Laptop, tablet, gaming, (camera, washing
MicroProcessor web browsing...) machine…etc.)
Internal Memory and I/O devices CPU, memory and I/O are
Structure connected externally present internally
System Bus
Speed High Relatively slow
Data
Clock RAM Cost High Low
storage
Power
Peripheral Bus Consumption
High Low

Memory External, Internal,


SD/MMC (RAM) Mbytes to Gbytes 2kB to up to 256kB
SPI, ADC
USB External, Internal Flash memory
DAC Ethernet Storage
Mbytes to Gbytes (32kB to 2MB)
Peripheral USB, UART, High speed
UART, I2C, SPI
Interfaces Ethernet

3
How to select
 Step 1: Make a list of required hardware interfaces: UART, I2C, SPI…
 Step 2: Examine the software architecture (RTOS, Linux, Android…), collect inputs from SW
 Step 3: Select the architecture: ARM/8051/AVR32…, 8/16/32 bits, Floating point, speed
 Step 4: Examine power consumption  (uA/MHz , standby , sleep current)
 Step 5: Identify Memory Needs: Flash/RAM/EEPROM, size
 Step 6: Start searching for microcontrollers
 Step 7: Examine Costs and Power Constraints
 Step 8: Check part availability
 Step 9: Select a development kit (SW team)
 Step 10: Investigate compilers and tools (SW team)

4
Power supply for MCU
 Max current consumption

 Decoupling capacitors

 Power sequence
Power sequence should be as per datasheet

5
Clock and Reset
 Crystal

 32.768KHz crystal: required for


RTC and low power application
 Reset circuit

RC timing should be larger than minimum reset


pulse period specified in datasheet.

6
GPIO
 GPIO configuration  Design consideration
 Input:
o Floating or pull-up/down
o VIL, VIH
 Output:
o Types: Push-pull or Open-drain
o VOL, VOH
o Output current
o Total current of all Outputs

 Common mistakes: GPIO latch-up

V_BAT comes before 3V3_uC, so MCU ADC


pin is supplied voltage before MCU 3V3 comes,
cause ADC pin latch-up
7
Interfaces

8
Interfaces

SPI/SDIO

Considerations:
- Voltage level (DC analysis)
- Length matching
- Serial resistor + decoupling cap on SCK , near Master
- Rise time / Fall time (AC analysis)

9
Header of section

SDIO layout

10
Interfaces

I2C

Considerations:
- Voltage level (DC analysis)
- Pull Up resistor calculation.
- Serial resistor + decoupling cap on SCL , near Master

11
Header of section

USB
Applications:
- Communication from / to an computer (OS based)
- Connect to Storage device (USB thumb drive)
Considerations:
- Connector type
- Power can be taken or provided from USB connector
- ESD protection
- Differential pair signal.
- Serial resistors (Imp matching)
- Pull up resistor ( depend on USB mode / MCU spec)
- Common mode choke
- Load SW with current limit (USB host)

12
Header of section

UART App:
- RS232 interface
- Wireless connectivity module (Wifi,Bluetooth,LoRa,2G,3G,Zigbee)
- Sensors

Considerations:
- Voltage level (DC analysis)
- HW handshaking.
- Baud rate: to <1Mbps (9600, 19200,115200 are popular values)
- ESD protection for connector

13
ADC (Analog to digital converter)

Questions to be prepared
PRIMARY
• What is the required level of system accuracy? (type of ADC, errors, number of bits ,…)
• How many bits of resolution are required?
• What is the nature of the analog input signal? ( amp , freq, differential ?)
• How fast must the converter operate (conversion speed)?
SECONDARY
• Does the system have multiple channels?
• Does the system need conversion timing, need DMA ?
• Should the voltage reference be internal or external?
• Is it require an amplifier / filter externally ?

14
Header of section

Select ADC type


Applications for ΔΣ
SAR ADC High Speed – Pipeline
 Signal Level – System Topology
 SARs are Best for
clock range ~ 0.5 to
General Purpose Apps  Pipeline converters fit
40 MHz
 App: Data Loggers, high-speed
 Has an Internal applications (5 MHz
Temp Sensors, Bridge
Digital Low-Pass to >100MHz).
Sensors, General
Filter
Purpose  Applications:
 • Uses an integrator
 • In the Market SARs – Wireless and Line
 – Accurate near DC Communications
– Can be 8 to 18 bits of
 – High Resolution – resolution – Test and Measurement,
up to 24 bits Instrumentation
– Speed range: > DC to
 • Audio – System < 5 Msps – Medical Imaging
15 clock range ~ 20 to 40
 • SARs found as – Radar Systems
MHz
Header of section

Selecting ADC Topology

16
Header of section

Programming, debugging interfaces


Popular: UART/RS232, SWD , JTAG
- Work with SW team to take requirements.

Considerations:
- Pull up/ down resistors
- Serial resistors , length matching.
- ESD protection
- Data Speed
- Voltage level
- Standard connector: Design as Evaluation board. Test points are not preferred.

17
Header of section

JTAG
JTAG, 4/5-wire interface for programming , boundary scan and debugging, using the pins TRST ,TCK, TMS,
TDI, and TDO.
Speed : 10MHz to 100MHz
Pull up/down

18
Header of section

SWD
SWD 2-pin serial wire debug interface for programming and debugging
Using the pins SWCLK and SWDIO
SWD: pull up on SWDIO , Pull down on SWCLK
Speed : to 4Mbps
Reset pin may required as an additional signal.

19
Header of section

UART/RS232
• UART debug interface for programming and debugging
• Using the pins RxD and TxD
• If Serial bootloader is used on an UART port, this UART port must be selected.
• Speed : to <1Mbps (9600, 19200,115200 are popular values)
• If RS232 is used , it required a voltage level translator (such as MAX3232).
• For complex systems (especially Linux OS) , UART port is often used as console port, HW
must provide UART port.

20
Header of section

Working with SW team


Inputs:
- Interfaces requirement ( how many bus needs, speed, define bus for specific peripherals)
- Peripheral requirement.
- Architecture requirement.
- Debugging / programming requirement
- Low power mode spec.

Output:
- MCU pin mapping.

21

You might also like