Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat...

17
1 Günther Gridling Bettina Weiss Grundlagen Microcontroller Introduction

Transcript of Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat...

Page 1: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

1

Günther GridlingBettina Weiss

Grundlagen MicrocontrollerIntroduction

Page 2: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

2

Lecture Overview● Introduction

– What is a microcontroller?

– difference between microcontroller and microprocessor

– reasons for existence of microcontrollers

– fields of application

– microcontroller types

– frequently used terms

Page 3: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

3

● A Simple Control Task: Heating– periodically read temperature (4 bit digital value)

– turn on/off heating according to temp. (1 control line)

– current temperature is displayed (display 8+3 bits)

– user can adjust temp. thresholds with buttons (4 btns)

– serial interface to download temp. data for last 24 h (2 bit)

● ­> 20 digital I/O lines, timer, serial interface

What is a Microcontroller?

Page 4: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

4

● Components we need:– CPU (Z80)

– 2x PIO (2x 16 = 32 digital I/O lines)

– SIO (serial I/O)

– CTC (timer)

– memory (SRAM, Flash, EEPROM)

● requires 8 chips (+ their connections) on PCB

Heat Control With Z80

Page 5: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

5

PCB: euro format 10x16 cm

Page 6: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

6

(Autorouter 81% finished)

Page 7: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

7

● If we do this with a microcontroller:require– CPU

– at least 20 digital I/O lines

– serial interface

– timer

– memory (SRAM, Flash, EEPROM)

Heat Control With ATmega16

Page 8: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

8

● Components we need: 1 microcontroller– All components are integrated into one single chip!

What is a Microcontroller?

PCB: less than quarter euro format 5x8 cm

Page 9: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

9

size reduction of more than factor 4!

Page 10: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

10

● microcontroller integrates several components:– CPU

– memory

– digital I/O lines

– analog I/O lines

– interrupt controller

– counter/timer

– serial interface(s)

What is a Microcontroller?

Page 11: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

11

● smaller board area● faster development● easier debugging and upgradability● low cost● low power consumption● high reliability

Why Microcontrollers?

microcontrollers save time & money!

Page 12: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

12

● telecommunication● automotive industry● aerospace industry● household appliances, home automation● factory automation● ...

Fields of Application

mostly high quantities (90 in car) ­> huge market!

Page 13: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

13

● Many different controllers from many different vendors(e.g. PIC, ATmega16, HC11, 8051)

● controller family:– same CPU

– different peripherals (number of I/Os, timers, ...)

– e.g.: Atmel AVR ATmega family

Types of Microcontrollers

Page 14: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

14

● controllers are (4), 8, 16, 32 bit● we concentrate on small 8­bit controllers

– no MMU (memory management unit)

– no DMA (direct memory access)

– no Cache● clocking frequency about 1 ­ 25 MHz

Types of Microcontrollers

Page 15: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

15

● Microprocessor: a CPU (e.g. in a PC)

● Microcontroller: single chip computer, contains I/O lines to directly monitor and control environment

● Digital Signal Processor: designed for signal processing (fast multiplications), often hybrid

Some Technical Terms

Page 16: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

16

● Embedded System: the microcontroller is part of the system, has a dedicated function(microwave, mobile phone, ...)

● Real­Time System: a system which has to react to events within a given time frame; if the reaction comes too late, the results may be disastrous(break­by­wire in car)

Some Technical Terms

Page 17: Grundlagen Microcontroller Introduction · Introduction – What is a microcontroller? ... Heat Control With ATmega16. 8 ... Atmel AVR ATmega family

17

● Microcontroller: CPU + peripherals on one chip

● Microcontroller can be used stand­alone● Motivation for Microcontrollers: time & 

money● Microcontroller families● Important terms

Lecture Summary