lecture 1

12
1 Lecture 1 Introduction to Microcontrollers

description

micro controller

Transcript of lecture 1

Page 1: lecture 1

1

Lecture 1

Introduction to Microcontrollers

Page 2: lecture 1

What is a Microcontroller?

• A Microcontroller is a programmable digital processor with

necessary peripherals. Both microcontrollers and microprocessors

are complex sequential digital circuits meant to carry out job

according to the program / instructions. Sometimes analog

input/output interface makes a part of microcontroller circuit of

mixed mode(both analog and digital nature).

• A microcontroller can be compared to a Swiss knife with multiple

functions incorporated in the same IC.

2

Page 3: lecture 1

Why the Name is Micro-controller?

• It is small on chip microcomputer which has processor, memory, I/O

pins for input and output, etc. It is used to control the operation of

machine using fixed Program that is stored in ROM/EPROM and that

does not change over the life time.

• It is named so because it is basically used for control actions. The

name itself specifies its meaning by splitting the word micro-controller

into two MICRO is derived from a Greek word Micros which means

small (in size, quantity, number and dignity) and Controller is the logic

circuitry that does the control action based on the program written.

3

Page 4: lecture 1

What is microcontroller?

Term 8051 refers to MCS 51 family of microcontroller ICs introduced by intel

corporation in 1971. A microcontroller is a computer with most of the necessary

support chips on board. All computers have several things in common, namely:

•A central processing unit (CPU) that executes programs.

•Some random-access memory (RAM) where it can store data that is variable.

•Some read only memory (ROM) where programs to be executed can be

stored.

•Input and output (I/O) devices that enable communication to be established

with the outside world i.e. connection to devices such as keyboard, mouse,

monitors and other peripherals

4

Page 5: lecture 1

5

Components of a microprocessor/controller

• CPU: Central Processing Unit• I/O: Input /Output• Bus: Address bus & Data bus• Memory: RAM & ROM• Timer• Interrupt• Serial Port• Parallel Port

Page 6: lecture 1

6

CPU

General-Purpose Micro-processor

RAM ROM I/O Port

TimerSerial COM Port

Data Bus

Address Bus

General-purpose microprocessor:

• CPU for Computers

• Commonly no RAM, ROM, I/O on CPU chip itself

Many chips on motherboard

Page 7: lecture 1

7

RAM ROM

I/O Port

TimerSerial COM Port

Microcontroller

CPU

• A single-chip computer• On-chip RAM, ROM, I/O ports...• Example : Motorola’s 6811, Intel’s 8051, Zilog’s Z8 and PIC 16X

A single chip

Microcontroller :

Page 8: lecture 1

8

Page 9: lecture 1

9

Page 10: lecture 1

10

Microprocessor • CPU is stand-alone, RAM,

ROM, I/O, timer are separate• designer can decide on the

amount of ROM, RAM and I/O ports.

• expensive• versatility • general-purpose• High processing power• High power consumption• Instruction sets focus on

processing-intensive operations

• Typically 32/64 – bit• Typically deep pipeline (5-20

stages)

Microcontroller• CPU, RAM, ROM, I/O and timer

are all on a single chip

• fixed amount of on-chip ROM, RAM, I/O ports

• for applications in which cost, power and space are critical

• single-purpose (control-oriented)

• Low processing power

• Low power consumption

• Bit-level operations

• Instruction sets focus on control and bit-level operations

• Typically 8/16 bit

• Typically single-cycle/two-stage pipeline

Microprocessor vs. Microcontroller

Page 11: lecture 1

11

Some Popular Microcontrollers…

• 8051

• Microchip Technology PIC

• Atmel AVR

• Texas Instruments MSP430 (16-bit)

Page 12: lecture 1

12

Review questions

• What are the main differences between a microprocessor and a microcontroller in terms of– Architecture– Applications– Instruction set