34
EMBEDDED SYSTEM St. Margaret Engineering College Neemrana (Rajasthan) Submitted to:- Submitted by:- Mr. Rohit Gupta Shilpa Kumari Mr. Pavan Yadav (12ESMEC043) 1

embedded system and microcontroller

Embed Size (px)

Citation preview

Page 1: embedded system and microcontroller

EMBEDDED SYSTEM St. Margaret Engineering College

Neemrana (Rajasthan)

Submitted to:- Submitted by:-

Mr. Rohit Gupta Shilpa Kumari

Mr. Pavan Yadav (12ESMEC043)

1

Page 2: embedded system and microcontroller

What is embedded system ?

A specialized computer system that is part of a

larger system or machine .

Typically , an embedded system is housed on a

single microprocessor board with the program

stored in ROM.

Ex. :- Fridge , mobile phones etc.

Embedded system include an operating system

, but may are so specialized that the entire

logic can be implanted as a single program.

2

Page 3: embedded system and microcontroller

3

In one sentence , we can say that , A special purpose

computer built into a larger device.

Any device that includes a programmable computer

but is not itself a general purpose computer.

The microprocessor is an embedded system is like an

electric motor in a washing machine.

Page 4: embedded system and microcontroller

MICROPROCESSORS AND MICROCONTROLLERS

In an embedded system,the microcontrollersROM is burned with apurpose for specificfunctions needed for thesystem. A printer is anexample of anembedded systembecause the processorinside it performs onetask only;namelygetting the data andprinted it.

On the other hand, aPC can also load & runsoftware for a varietyof applications.Because it has RAMmemory & anoperating system thatloads the applicationsoftware into RAM &lets the CPU run it.

4

Page 5: embedded system and microcontroller

5

MICROPROCESSORS AND

MICROCONTROLLERS

Page 6: embedded system and microcontroller

APPLICATIONS

1. Signal processing system:- Real time video ,

DVD players, medical equipment.

2. Distributed control:- Network routers,

switches , elevators.

3. Small system:- mobile phones, smart cards,

MP3 players, digital converters, PC keyboard

and mouse.

6

Page 7: embedded system and microcontroller

ABOUT 8051The 8051 microcontroller is first controller of MCS 51family introduced by intel corporation at the end of1970s.

Characteristics of 8051:-

4k bytes ROM

128 bytes RAM

Two timer/counter(16 bit)

A serial port

4 parallel input output port

Interrupt controller

The 8051 can address 64k bytes of external data memoryand 64k bytes of external program memory.

7

Page 8: embedded system and microcontroller

8

INTERNAL ARCHITECHTURE 8051

Page 9: embedded system and microcontroller

ARCHITECTURE

Based on CISC and RISC

CISC:- (complex instruction set controller)

It invariably employ a microcode fordecoding the instructions and generate thenecessary control signals for performing theintended operation.

When an instruction is fetched frommemory, it is compared with the existing bitpattern, when match is found it generatesthe associated control signals to ALU andregisters.

9

Page 10: embedded system and microcontroller

10

It takes good amount of time to decode the

meaning of complex instructions which perform

more than one operation.

Also microcode requires more number of

transistors that are used in fabricating the CISC

architecture based processors.

Page 11: embedded system and microcontroller

RISC

Reduced Instruction Set Controller.

These are fast at numerical computations

required in science, graphics and engineering

applications.

The total number of transistors used for the

design of RISC is half the number used in

CISC.

This reduced number of transistors reduces the

power consumption.

11

Page 12: embedded system and microcontroller

COMPUTER ARCHITECTURE

Depending on how external memory isconnected to the processors

Von-Neumann machine.

Harvard machine.

Von-Neumann machine:-

It has 3 hardware subsystems; a CPU, a mainmemory system and an I/O system.

It uses stored program concept i.e. theprogram and data are stored in the samememory unit.

12

Page 13: embedded system and microcontroller

13

• It has a single path between the main memorysystem and the control unit of the CPU. Because thecommon path is used to access both the program aswell as the data, there is possibility of congestion onthe bus. This situation is called Von NeumannBottleneck.

Harvard machine:-

It uses separate memories for storing the programand data.

To connect these separate memories, it uses aseparate set of address, data and control lines.

Page 14: embedded system and microcontroller

14

As separate memories and buses are used,

simultaneous access to the memory is possible

without any congestion over the bus, which in

turn increases the performances.

It increases the cost of the system as separate

memories & separate buses are used.

Page 15: embedded system and microcontroller

PIN DIAGRAM OF 8051

15

Page 16: embedded system and microcontroller

Registers in 8051

In CPU, registers are used to store information

temporarily. That information could be a byte of

data to be processed, or an address pointing to the

data to be fetched. 8051 have 8-bit registers.

16

Page 17: embedded system and microcontroller

17

The most widely used registers are A

(accumulator), B, R0 -R7, DPTR (Data Pointer),

PC (Program Counter). All the registers except

DPTR and the program counter are 8 bits. DPTR

and PC are 16 bits.

Page 18: embedded system and microcontroller

ROBOTICS

A reprogrammable, multifunctionalmanipulators designed to move material, parts, tools or specialized devices through variousprogrammed motions for the performance of avariety of task.

The word robotics was coined by Americanscience fiction writer Isaac Asimov first usedin 1942 in his short story “RUABOUT”. Healso proposed three laws of Robotics .

18

Page 19: embedded system and microcontroller

LAWS OF ROBOTICS

A Robot may not injure a human being or

through inaction , allow a human being to

come to harm.

A Robot must obey the orders given it by

human beings except where such orders

would conflict with the 1st and 2nd law.

A Robot must protect its own existence as

long as such protection does not conflict with

the 1st and 2nd law.

19

Page 20: embedded system and microcontroller

AVR MICROCONTROLER

Devices range from 1 to 256KB

Pin count range from 8 to 100

Full code compatibility

Pin/feature compatible families

One set of development tools

20

Page 21: embedded system and microcontroller

OVERVIEW OF ATMEGA16

The ATmega16 is a

low-power CMOS 8-bit

microcontroller based

on the AVR enhanced

RISC Architecture.

21

Page 22: embedded system and microcontroller

FEATURES OF ATMEGA16

16 Kbytes of In-System Programmable Flash

Program memory with Read-While-Write

capabilities

512 bytes EEPROM, 1 Kbyte SRAM

32general purpose I/O lines

32 general purpose working registers

22

Page 23: embedded system and microcontroller

Continued…

Write/Erase Cycles: 10,000 Flash/100,000

EEPROM

Data retention: 20 years at 85°C/100 years at

25°C(1)

Programming Lock for Software Security

Up to 16 MIPS Throughput at 16 MHz

512 Bytes EEPROM

23

Page 24: embedded system and microcontroller

PERIPHERAL FEATURES

Two 8-bit Timer/Counters

One 16-bit Timer/Counter

Four PWM Channels

8-channel, 10-bit ADC

24

Page 25: embedded system and microcontroller

ATMEGA16 PIN DIAGRAM

25

Page 26: embedded system and microcontroller

PIN DISCRIPTION

Atmega16 have total of 40 pins

32 I/O pins..

PORTA = 8 Pins

PORTB = 8 Pins

PORTC = 8 Pins

PORTD = 8 Pins

26

Page 27: embedded system and microcontroller

PIN DISCRIPTION

VCC (PIN11) - Digital supply voltage.

GND (PIN12) - Ground

27

Page 28: embedded system and microcontroller

PIN DISCRIPTION

Port A (PA7..PA0) - Port A serves as the analog

inputs to the A/D Converter Port A also serves as

an 8-bit bi-directional I/O port, if the A/D

Converter is not used. Port pins can provide

internal pull-up resistors (selected for each bit)

Port B (PB7..PB0) - Port B is an 8-bit bi-

directional I/O port with internal pull-up resistors

(selected for each bit). Port B also serves the

functions of various special features of the

ATmega16

28

Page 29: embedded system and microcontroller

ALTERNATE FUNCTION OF PORT A AND B :-

29

Page 30: embedded system and microcontroller

PIN DISCRIPTION

Port C (PC7..PC0) - Port C is an 8-bit bi-directional I/O port with internal pull-up resistors(selected for each bit). If the JTAG interface isenabled, the pull-up resistors on pins PC5(TDI),PC3(TMS) and PC2(TCK) will be activated evenif a reset occurs

Port D (PD7..PD0) - Port D is an 8-bit bi-directional I/O port with internal pull-up resistors(selected for each bit). Port D also serves thefunctions of various special features of theATmega16

30

Page 31: embedded system and microcontroller

ALTERNATE FUNCTION OF PORT C AND D:-

31

Page 32: embedded system and microcontroller

PIN DISCRIPTION

RESET - Reset Input. A low level on this pin forlonger than the minimum pulse length willgenerate a reset. Shorter pulses are not guaranteedto generate a reset.

AVCC - AVCC is the supply voltage pin for PortA and the A/D Converter. It should be externallyconnected to VCC, even if the ADC is not used. Ifthe ADC is used, it should be connected to VCCthrough a low-pass filter.

• AREF - AREF is the analog reference pin for theA/D Converter.

32

Page 33: embedded system and microcontroller

REFERENCES

1. http://mathcs.slu.edu/~fritts/CSCI305_306_F0

8/AVR/AVR%20Introduction.pdf

2. http://www.circuitstoday.com/microcontroller-

invention-history

3. http://www.atmel.com/products/microcontroll

ers/avr/

4. http://www.circuitstoday.com/basics-of-

microcontrollers

33

Page 34: embedded system and microcontroller

34