Vous êtes sur la page 1sur 17

3/25/2013

Controllers & Algorithms

Mechatronics & Microprocessor VI Sem Automobile

Controllers & Algorithms


Microprocessor
Fundamentals Architecture of 8085 Programming of 8085

Microcontroller Programmable Logic Controller (PLC)

Artificial Neural Network (ANN)


Fuzzy control Neuro-Fuzzy control

Mechatronics & Microprocessor VI Sem Automobile

3/25/2013

Microprocessor

Mechatronics & Microprocessor VI Sem Automobile

What is a p ?
An electronic chip - With on-chip memory locations (registers), to hold information

- understands fixed set of basic commands


- generates signals to control external devices

Mechatronics & Microprocessor VI Sem Automobile

3/25/2013

Microprocessor
Little use unless interfaced with memory & other I/O devices Needs to be programmed

Program
- Sequence of instructions designed to perform a particular task

Software
- Set of programs written for a p based system

Mechatronics & Microprocessor VI Sem Automobile

MICROPROCESSOR

Microprocessor
Power supply Input & output control lines Other control lines ALU Registers Control Unit Data lines Address lines

Fig: Inside & outside of a p

Mechatronics & Microprocessor VI Sem Automobile

3/25/2013

Applications
Oscilloscope, spectrum analyzer Music equipments, synthesizers House hold items, oven, door bell, washing machine, TV Computers Medical equipments

Mechatronics & Microprocessor VI Sem Automobile

Evolution..
1971 First p (Intel) Intel 4004
4 bit p Functions 4040 (Enhanced?)
A up in which most instruction operate upon n-bit data, is said to be a n bit up

PPS 4 (Rockwell) T3472 (Toshiba) 1973

8008
Mechatronics & Microprocessor VI Sem Automobile 8

3/25/2013

8 bit p
8080 8085 Improved version

M6800 Motorola SC/p National semiconductors

Z80
F8 6809

Zilog
Fair Child Hitachi
Mechatronics & Microprocessor VI Sem Automobile 9

16 bit p
9440 TMS 8086, 80286 M68000 Z8000 8088 Fair child Texas Instruments Intel Motorola Zilogs
Mechatronics & Microprocessor VI Sem Automobile 10

3/25/2013

32 bit p
80386 68020, 030 32032 32523 Motorola Nationals Nationals

T414, T800 Inmos


- Basis of evolution?

Mechatronics & Microprocessor VI Sem Automobile

11

Memory

Mechatronics & Microprocessor VI Sem Automobile

12

3/25/2013

Memory classification
Memory

Primary Memory

Storage Memory

Read/write memory

Read only memory (ROM) PROM EPROM EEPROM

Mechatronics & Microprocessor VI Sem Automobile

13

Main memory
p uses it in executing &
storing programs Responds quickly to a command from p -

Storage memory
To store programs &
results after its execution p directly cant execute programs stored in these devices
Non-volatile

Size is unlimited

Mechatronics & Microprocessor VI Sem Automobile

14

3/25/2013

Read / Write memory


p can write into / read from this memory Popularly known as Random Access Memory Primarily for storing information, likely to be altered Stores temporary data User memory Volatile
Mechatronics & Microprocessor VI Sem Automobile 15

Read Only Memory Used for programs & data that need not be altered Operating systems & programs No data can be written into this memory
Permanent ROM PROM EPROM Semi-permanent EEPROM

Non-volatile

Mechatronics & Microprocessor VI Sem Automobile

16

3/25/2013

Programmable Read Only Memory (PROM)


Programmed by the user with PROM programmer Selectively burns the fuses according to the bit pattern to be stored Permanent storage

Mechatronics & Microprocessor VI Sem Automobile

17

Erasable Programmable Read Only Memory (EPROM)


Used Programmable ROMs Program storage: Applying voltage to the integrated circuit pins Produces a pattern of charged & uncharged cells

Information is erased by exposing the chip to UV light


Chip reprogrammed

Mechatronics & Microprocessor VI Sem Automobile

18

3/25/2013

Electrically Erasable Programmable Read Only Memory (EEPROM)


Functions similar to EPROM Uses relatively high voltage than ultraviolet light

Mechatronics & Microprocessor VI Sem Automobile

19

Memory classification
Inside the CPU Amount of register storage limited REGISTERS 100 to 1000 bits

Same as primary but much faster Size few kilobytes

CACHE To store program which may not be accessed frequently Ex: payroll data, simulation of accident PRIMARY (FASTER) PRIMARY (SLOWER) MASS STORAGE OFF-LINE BACKUP

For program and data storage

Figure: Memory hierarchy in a p based system.


Mechatronics & Microprocessor VI Sem Automobile

20

10

3/25/2013

Mechatronics & Microprocessor VI Sem Automobile

21

Architecture of 8085

Mechatronics & Microprocessor VI Sem Automobile

22

11

3/25/2013

Mechatronics & Microprocessor VI Sem Automobile

23

Data & Address bus


8085 is an 8-bit microprocessor 8 bits of data transmitted to or from 8085 in parallel 16 bit address transmission capability

8 pins dedicated for transmitting MSBs of the address


8 LSBs of the address are transmitted along 8 data lines Data & address are transmitted at different points in time
Mechatronics & Microprocessor VI Sem Automobile 24

12

3/25/2013

Accumulator (A)
8 bit register Used in various arithmetic & logic operations Input data to the ALU is stored temporarily

Also holds the value of result

Mechatronics & Microprocessor VI Sem Automobile

25

Flag register (status / condition code register)


Contains information concerning the result of latest process carried out in ALU Flags are set of 5 flip-flops (1 bit register) Status of the latest operation is indicated by each flag & each flag is set / reset to indicate specific value

Mechatronics & Microprocessor VI Sem Automobile

26

13

3/25/2013

Flag Z N C V

SET (1) Result is zero Result is negative Carry is generated Overflow occurs

RESET (0) Result is not zero Result is not negative Carry is not generated Overflow does not occur

Interrupt is ignored

Interrupt is processed normally

Mechatronics & Microprocessor VI Sem Automobile

27

Instruction Register (IR)


Stores an instruction fetched from the memory Decoded to execute an operation

Mechatronics & Microprocessor VI Sem Automobile

28

14

3/25/2013

Program Counter (PC)


This is a register that is used to control the sequencing of the execution of instructions. This register always holds the address of the next instruction. Since it holds an address, it must be 16 bits wide. Automatic updation of the contents during the

execution of an instruction

Mechatronics & Microprocessor VI Sem Automobile

29

Memory Address Register (MAR)


Contains the address of the data Example: Sum of 2 numbers MAR loaded with address of the 1st number Data at the addressed location moved to accumulator Address of 2nd number is loaded into MAR Data at this location is added to accumulator data Finally, MAR stores the address of the final result
Mechatronics & Microprocessor VI Sem Automobile 30

15

3/25/2013

Stack Pointer register (SP)


The stack pointer is also a 16-bit register that is used to point into memory. The memory this register points to is a special area called the stack. The stack is an area of memory used to hold data that will be retreived soon. The stack is usually accessed in a Last In First Out (LIFO) fashion Eg.:- Stack is a special area of the memory in which PC values can be stored when a subroutine part of a program is being used
496 497 498 499 Next available location Stack top location SP
31

Mechatronics & Microprocessor VI 500 500 Sem Automobile

General Purpose registers 6


8 bit registers used for variety of purposes B, C, D, E, H & L Used individually, when 8bit data is to be stored

Used in pairs, when 16-bit address is to be stored


Register A(ACC) B C D E H L
Mechatronics & Microprocessor VI purpose register codes for Sem Automobile

Code 111 000 001 010 011 100 101


32

Table 2: General

8085

16

3/25/2013

Table 1: Possible register pairs and their codes for 8085

Register Pair B-C D-E H-L SP

Bit pattern designating the pair 00 01 10 11

Mechatronics & Microprocessor VI Sem Automobile

33

17

Vous aimerez peut-être aussi