Вы находитесь на странице: 1из 38

Mechatronics

(Microprocessors)
B.Tech Mechanical Engineering
3rd Year, 6th Semester
G D Goenka University
Sohna, Gurgaon

Mechatronics
Mechatronics is a concept of Japanese origin (1970s), originated from
Yaskawa Corporation from the combination of Mechanical and
Electronics.
It is a multidisciplinary approach to product and manufacturing
system design

It involves application of electrical, mechanical, control and computer


engineering to develop products, processes and systems with greater
flexibility, ease in redesign and ability of reprogramming

Defination given by Dinsdale and Yamazaki:


the synergetic interaction of fine mechanical engineering with
electronics and intelligent computer control in the design of products
and manufacturing process.
In a nutshell, what makes mechatronics unique is the integration
between the various disciplines of mechanical, electrical and software
engineering.

Micro
Micro is a non specific term covering a wide range of electronic
devices including microprocessors, microcontrollers, DSPs and other
more customizable devices.
Each device is tailored to perform better in specific circumstances.
For example, a microcontroller may be capable of performing a task
suited to a DSP, but it will probably do so more slowly and less
efficiently.
The key component common to microprocessor, microcontroller and
DSP is the Central Processing Unit (CPU), which is the fundamental
control logic hardware that executes instructions.

Microprocessors
p are, at their core, a CPU on a chip.
The fundamental components such as the program and data memory,
parallel input/output, communication peripherals are physically
separate from the p and must be integrated separately.
p can fetch and execute instructions, perform mathematical and
logical operations, store data and request action from the peripheral
systems and nothing else.
All operations
components.

and

tasks

require

interaction

with

external

Examples include Intels Pentium Core i5,i7 processors, AMDs Athlon


and so on.

Microcontrollers
Microcontrollers integrate the CPU of a p with everything else
necessary to create a single chip computer.
They were originally known as microcomputers.
At a minimum, this requires non volatile memory for programs (such
as ROM), memory for data (such as RAM) and digital inputs and/or
outputs (usually called I/O).
Other peripherals such as serial communication modules, analog to
digital converters, timers, etc. are added.
Each microcontroller is appropriate for different applications and
markets.

Example of a Microcontroller
Examples of microcontrollers that have become household names are
rare, but devices that incorporate microcontrollers are easy to
identify.
One such device is a standard optical mouse, which optically tracks its
position as it moves across a flat surface and communicates mouse
displacement data via Universal Serial Bus (USB) portal to a personal
computer.

Digital Signal Processors (DSPs)


DSPs are microprocessors that are specifically designed to perform
signal processing operations very rapidly.
They are distinguished by their specialized instruction sets and their
memory architectures.
Their instruction sets are designed so that they are capable of rapidly
executing the kinds of mathematical operations that are common in
signal processing.
Their architectures are often designed to significantly increase the
speed of instruction execution by simultaneously executing one
instruction while the next instruction is being fetched from memory.

Example of DSP
DSPs are widely used in cell phone, digital voice recorders, HD
televisions, etc.
In cell phones, they are responsible for digitizing and compressing
sound from the mouthpiece microphone for the outgoing signal and
decompressing and converting the incoming digital data stream into
analog signals for the earpiece speaker.
Manufacturers of DSPs now routinely incorporate many of the
subsystems previously found only in microcontrollers, such as digital
I/O and analog to digital converters, in order to attractive choice in a
wide variety of applications.

Other devices
There are several types of highly configurable and flexible devices that
can be configured by designer to incorporate a CPU.
Other devices include:
1. Field Programmable Gate Array (FPGA)
A customable logic chip that contains very large number of
fundamental logic building blocks.
Since these building blocks are the same as those used to design and
construct microprocessors, microcontrollers and DSPs. FPGA can also
be configured as any of these devices, with the additional benefit of
being highly customizable at end user.

2. Programable System on Chip (PSoC)


It incorporates microcontrollers as well as arrays of configurable
analog and digital logic elements.
3. Application Specific Integrated Circuit (ASIC)
It can be incorporated to design what ever circuitry is needed,
including a CPU.
All these devices contains a CPU as the computational core and
interacts with the memory and peripherals in order to perform
operations and tasks.

Microprocessor Systems
Systems using microprocessors basically have three parts:
1. CPU to recognize and carry out program instructions
2. Input and Output Interfaces to handle communications between
the microprocessor and the outside world
3. Memory to hold the program instruction and data

Buses
Digital signals move from one section to another through paths called
buses.
A bus is just a number of parallel conductors along which electrical
signals can be carried and are paths which can be shared by all the
chips in the system, else there would be a very large number of
connecting conductors.
Typically a bus has 16 or 32 parallel connections so that each can
carry 1 bit of data word simultaneously.
This gives faster transmission than having a serial connection in which
an entire word is sent in a sequence of bits along a single conductor.
There are three forms of buses:

1. Data Bus
2. Address Bus
3. Control Bus
p performs 4 operations:
1. Memory Read
2. Memory Write
3. I/O Read
4. I/O Write
All these operations are part of the communication process between
the p and peripheral devices. To communicate with a peripheral, the
p needs to perform the following steps:

1. Identify the peripheral or the memory location


2. Transfer binary information
3. Provide timing or synchronising signals
These functions are performed using 3 sets of communication lines.

Address Bus
It carries signals which indicate where data is to be found and so the
selection of certain memory location or I/O ports.
Each storage location within a memory or I/O peripherals has a
unique identification, so that the system is able to select a particular
instruction or data item in the memory.
When a particular address is selected by its address being placed on
the address bus, only that location is open to communications form
CPU, i.e. one location at a time.
These buses are unidirectional, bits flow in one direction from p to
the peripherals or memory location.

Most 8-bit processors has 16 address lines. The number of address


lines of the p determines its capacity to identify different memory
locations.
This size of address bus enables 216 locations to be addressed, (216 =
65536) usually written as 64K, where K = 1024.
The more memory that can be addressed, greater is the volume of
data that can be stored.
Address bus is used to identify the memory location or the
peripherals.

Data Bus
Data flow associated with the processing function of the CPU is
carried by the Data bus.
These buses are bidirectional data flow in both directions between
p and memory & peripheral devices.
It is used to transport a word to or fro from the CPU and the memory
& I/O interfaces. Each wire carries a binary signal 0 or 1.
Data bus is used to transfer the binary information.
For a 4 wire bus, word 1010 is carried by a separate wire as follows:

Word

Bus Wire

0 (least significant bit)

First data bus wire

Second data bus wire

Third data bus wire

1 (most significant bit)

Forth data bus wire

A 8-bit p has 8 data lines which enables it to manipulate 8-bit data


ranging from 00 to FF (28 = 256 numbers), largest number being
11111111 (25510).
Intel 8085 is an 8-bit microprocessor.
ps such as Intel 8086, Zilog Z8000 and Motorola 68000 have 16 data
lines.
Intel 80386/486 have 32 data lines and are called 32 bit ps.

Control Bus
Signals relating to control actions are carried by the control bus.
It performs the third function of providing the timing signals apart from
carrying control signals.
These are not group of lines like the address bus or data bus, but individual
lines that provide a pulse to indicate a p operation.
p generates specific control signals for every operation it performs.
For example, to read an instruction from the memory, the p places the 16
bit address on the address bus which is decoded by an external circuit to
identify the memory location. The p then ends a pulse called Memory
Read as the control signal, which activates the memory chip and the
contents of the memory location are placed on the data bus and brought
inside the p.

Computer Languages
p recognize and operate in binary numbers
Word is defined as the number of bits the p recognizes and
processes at a time. Word length varies form 4 bits to 64 bits
Byte is defined as a group of 8 bits. Eg. A 16 bit p has a word
length equals to 2 bytes.
Nibble stands fro a group of 4 bits. A byte has 2 nibbles.

Microprocessor Architecture
p is a programmable digital device, designed with registers, flip flops
and timing elements.
p has a set of instructions, designed internally, to manipulate data
and communication with peripherals.
This process is determined by the logic design of the p, called
architecture.
p is generally referred to as the central processing unit (CPU). It is
that part of the processor system which processes the data, fetches
information from the memory, decoding them and executing them.
The constituent parts of a p are:

1. ALU (Arithmetic and Logic Unit)


This is the area of the p where various computing
functions/data manipulation like arithmetic operations, logical
operations, etc.
2. Registers
Internal data that he CPU is currently using is temporarily held in
a group of memory locations within the p called Resisters. These are
used to store information involved in program execution.
3. Control Unit
The control unit determines the timing and sequence of
operations. It generates the timing signals used to fetch a program
instruction from memory and execute it.

Registers
There are a number of registers, the number, size and type varies
from one p to another. Following the commonly used regiters:
1. Accumulator (A)
2. Status Register/Flag Register
3. Program Counter (PC)/Instruction Pointer (IP)
4. Memory Address Register
5. Instruction Register (IR)
6. General purpose Register
7. Stack Pointer (SP)

Accumulator
Here the data for the input to the ALU is temporarily stored.
CPU can access the data by providing the address of the required
memory location using address bus. The required data can then be
read using data bus.
Since only one memory location can be accessed at a time, temporary
storage is used.
It holds the result after the ALU operation.
Accumulator is involved in all data transfers associated with the
execution of arithmetic and logic operation.
Eg. In addition of two numbers

Stack Register/Flag Register


This contains information concerning the result of the latest process
carried out in ALU.
It contains individual bits (called flag) with each bit having specific
significance.
The status of the latest operation is indicated by each flag being set or
reset to indicate a specific status.
Flag

Set, i.e. 1

Reset, i.e. 0

Result is Zero

Result is not Zero

Result is Negative

Result is not Negative

Carry is generated

Carry is not generated

Overflow occurs

Overflow does not occurs

Interrupt is ignored

Interrupt is processed normally

Eg. 1 Consider the addition of 02 & 06. Result is 08

Z=0
N=0
C=0
V=0

Eg. 2 Consider the addition of F9 & 08. Result is 1(01)

Z=0
N=0
C=1
V=0

Program Counter (PC)/(IP)


PC helps the CPU to keep a track of its position in a program/
instruction.
This register contains the address of the memory location that
contains the next program instruction.
As each instruction is executed, PC updates itself so that it contains
the address of the memory location where the next instruction to be
executed is stored.
This enables the CPU to execute the instruction in a sequential order.

Memory Address Register (MAR)


MAR contains the address of data
In addition of two numbers, MAR is loaded with the address of first
number. Data at this address is then moved to the Accumulator.
Memory address of the second number is then loaded into MAR.
Data at this address is added to the data in the accumulator. The
result is then stored in a memory location addressed by the MAR.

Instruction Register (IR)


IR stores instruction.
After fetching an instruction from the memory through data bus, CPU
stores it in the IR.
After each fetch, p increments the PC by one with the result that the
PC points to the next instruction waiting to be fetched.
The instruction can then be decoded and used to execute an
operation.
This sequence is known as fetch-execute cycle.

General Purpose Register


General purpose registers may serve as temporary storage for data or
addresses and be used in operations involving transfer between other
registers.
8085 contains 6 general purpose registers B. C, D, E, H and L.
These can be used as six 8 bit registers or in pairs BC, DE and HL as
three 16 bit registers.

Stack Pointer (SP)


The contents of this register form an address which defines the top of
the stack in RAM.
The stack is a special area of the memory in which PC values can be
stored when a subroutine part of program is being used.
Subroutine is a group of instructions written separately from the main
program to prepare a function that occurs repeatedly in the main
program. Eg. Time delay required in a program.

Memory
ROM
PROM
EPROM
EEPROM
Masked ROM
RAM
SRAM
DRAM
Flash Memory

Logic Devices for Interfacing


Tri State Devices
Buffer
Bidirectional Buffer

Decoder
Encoder
Flip Flops
D Flip Flop (Latch and Clocked)

Вам также может понравиться