This document discusses processor and memory organization in embedded mechatronic systems. It covers various topics related to bus organization, types of buses (address bus, data bus, control bus), functions of buses, types of memory (RAM, ROM), memory devices (SRAM, DRAM, PROM, EPROM, EEPROM, flash memory), microprocessors (8051, ARM, PIC), and concepts like interrupts, oscillators, timers, clock cycles, opcodes, operands, pipelining, DMA, and coprocessors. Diagrams are included to illustrate bus types, memory organization, and the 8051 architecture.
1. Embedded for Mechatronic systems
Unit 2-Processor and Memory Organization
Baskaran s
Dr.Mahalingam College of Engg & Tech
2019
Baskaran s Embedded for Mechatronic systems
2. Bus Organization
Bus
Bus is a group of conducting wires which carries information, all
the peripherals are connected to microprocessor through Bus.
Types:
Address bus
Data bus
Control bus
Baskaran s Embedded for Mechatronic systems
3. Bus Organization
Functions of Buses in Computers
1. Data sharing - All types of buses found in a computer transfer
data between the computer peripherals connected to it. The
buses transfer or send data either in the serial or parallel method
of data transfer. This allows for the exchange of 1, 2, 4 or even
8 bytes of data at a time. (A byte is a group of 8 bits). Buses
are classified depending on how many bits they can move at
the same time, which means that we have 8-bit, 16-bit, 32-bit or
even 64-bit buses.
2. Addressing - A bus has address lines, which match those of
the processor. This allows data to be sent to or from specific
memory locations.
Baskaran s Embedded for Mechatronic systems
4. Bus Organization
Functions of Buses in Computers
3. Power - A bus supplies power to various peripherals con-
nected to it.
4. Timing - The bus provides a system clock signal to synchro-
nize the peripherals attached to it with the rest of the system.
Baskaran s Embedded for Mechatronic systems
6. Types of buses
Address bus
It is a group of conducting wires which carries address
only.Address bus is unidirectional because data flow in one di-
rection, from microprocessor to memory or from microprocessor
to Input/output devices
Baskaran s Embedded for Mechatronic systems
7. Types of buses
Data bus
It is a group of conducting wires which carries Data only.Data
bus is bidirectional because data flow in both directions, from
microprocessor to memory or Input/Output devices and from
memory or Input/Output devices to microprocessor
Baskaran s Embedded for Mechatronic systems
8. Types of buses
Control bus
It is a group of conducting wires, which is used to generate
timing and control signals to control all the associated
peripherals, microprocessor uses control bus to process data,
that is what to do with selected memory location. Some control
signals are:
1.Memory read
2.Memory write
3.I/O read
4.I/O Write
Baskaran s Embedded for Mechatronic systems
9. Embedded Memory Devices
Memory
A memory is just like a human brain. It is used to store
data and instruction
The memory is divided into large number of small parts.
Each part is called a cell. Each location or cell has a
unique address which varies from zero to memory size
minus one.
For example if computer has 64k words, then this memory
unit has 64 * 1024 = 65536 memory location. The address
of these locations varies from 0 to 65535.
Baskaran s Embedded for Mechatronic systems
10. Memory Types
Memory is primarily of two types;
Internal Memory cache memory and primary/main
memory
External Memory magnetic disk / optical disk etc.
Apart from that
Figure: Common memory types in embedded systems
Baskaran s Embedded for Mechatronic systems
11. Types of RAM
SRAM Vs DRAM
The RAM family includes two important memory devices:
static RAM (SRAM) and dynamic RAM (DRAM). The pri-
mary difference between them is the lifetime of the data
they store. SRAM retains its contents as long as electrical
power is applied to the chip. If the power is turned off or lost
temporarily, its contents will be lost forever. DRAM, on the
other hand, has an extremely short data lifetime-typically
about four milliseconds. This is true even when power is
applied constantly.
Generally, SRAM is used only where access speed is ex-
tremely important. A lower cost-per-byte makes DRAM at-
tractive whenever large amounts of RAM are required. For
smaller data SRAM (a few kilobytes) is good choice and for
handling larger data DRAM(Megabytes) is preferred.
Baskaran s Embedded for Mechatronic systems
12. Types of ROM
PROM
PROM is read-only memory that can be modified only once
by a user.
The user buys a blank PROM and enters the desired con-
tents using a PROM program.
Inside the PROM chip, there are small fuses which are burnt
open during programming. It can be programmed only once
and is not erasable
Baskaran s Embedded for Mechatronic systems
13. Types of ROM
EPROM
EPROM can be erased by exposing it to ultra-violet light for
a duration of up to 40 minutes. Usually, an EPROM eraser
achieves this function.
During programming, an electrical charge is trapped in an
insulated gate region.
The charge is retained for more than 10 years because the
charge has no leakage path.
For erasing this charge, ultra-violet light is passed through
a quartz crystal window (lid).
Baskaran s Embedded for Mechatronic systems
14. Types of ROM
MROM
The very first ROMs were hard-wired devices that contained a
pre-programmed set of data or instructions. These kind of ROMs
are known as masked ROMs, which are inexpensive
Baskaran s Embedded for Mechatronic systems
15. Types of ROM
EEPROM
EEPROM (pronounce as ”E-E-PROM”) stands for Electri-
cally Erasable Programmable Read-Only Memory.
It is a non-volatile ROM chip which used for storing a small
amount of data in computers or some other electronic de-
vices.
Through EEPROM, an individual byte of data can erase and
reprogrammed entirety, not selectively by the electrical volt-
age.
Baskaran s Embedded for Mechatronic systems
16. Types of ROM
Flash
Flash memory, also known as flash storage, is a type of
nonvolatile memory.
Flash memory is widely used for storage and data trans-
fer in consumer devices, enterprise systems and industrial
applications.
Flash memory retains data for an extended period of time,
regardless of whether a flash-equipped device is powered
on or off.
Flash memory is a type of electrically erasable pro-
grammable read-only memory (EEPROM)
Baskaran s Embedded for Mechatronic systems
17. Types of ROM
NVRAM
NVRAM is an acronym for Non-Volatile Random Access
Memory.
NVRAM is a type of Random Access Memory (RAM) that
retains its information when power is turned off.
The NVRAM is a small 24 pin DIP (Dual Inline Package)
integrated circuit chip and is thus able to obtain the power
needed to keep it running from the CMOS battery installed
in your motherboard.
It keeps track of various system parameters such as serial
number, Ethernet MAC (Media Access Control) address,
HOSTID, date of manufacture, etc.
NVRAM is therefore a type of non-volatile memory that of-
fers random access.
Baskaran s Embedded for Mechatronic systems
18. RISC Vs CISC
RISC
RISC: Reduce the cycles per instruction at the cost of the
number of instructions per program
Simpler instruction, hence simple instruction decoding.
Instruction come under size of one word.
Instruction take single clock cycle to get executed. More
number of general purpose register.
Simple Addressing Modes.
Less Data types.
Pipeling can be achieved
Baskaran s Embedded for Mechatronic systems
19. CISC
CISC
Complex instruction, hence complex instruction decoding.
Instruction are larger than one word size.
Instruction may take more than single clock cycle to get
executed.
Less number of general purpose register as operation get
performed in memory itself.
Complex Addressing Modes.
More Data types.
Baskaran s Embedded for Mechatronic systems
22. 8051
8051 microcontroller is 8 bit microcontroller designed by In-
tel in 1981
It is built with 40 pins DIP (dual inline package).
It has 4kb of ROM storage and 128 bytes of RAM storage,
2 16 bit timers
It consists of are four parallel 8 bit ports, which are pro-
grammable as well as addressable as per the requirement
An on-chip crystal oscillator is integrated in the microcon-
troller having crystal frequency of 12 MHz
Baskaran s Embedded for Mechatronic systems
23. Interrupts
As its name suggests, Interrupt is a subroutine call that
interrupts of the microcontrollers main operations or work
and causes it to execute any other program
The feature of Interrupt is very useful as it helps in case of
emergency operations
An Interrupts gives us a mechanism to put on hold the
ongoing operations, execute a subroutine and then again
resumes to another type of operations
Baskaran s Embedded for Mechatronic systems
24. Oscillator
Oscillator
Microcontroller requires Clock pulses for its operation. An elec-
tronic circuit that is used to generate an electrical signal of pre-
cise frequency by utilizing the vibrating crystal’s mechanical res-
onance made of piezoelectric material. There are different types
of piezoelectric resonators, but typically, quartz crystal is used in
these types of oscillators. Hence, these oscillator electronic cir-
cuits are named as crystal oscillators.
Baskaran s Embedded for Mechatronic systems
26. Timer
Timer
The timer is an important application in Embedded sys-
tems,it maintains the timing of an operation in sync with a
system clock or an external clock.
The timer has so many applications such as measure time
generating delays, they can also be used for generating
baud rates
TIMER/COUNTER is a software designed to count the time
interval between events
Timer register is incremented for every machine cycle,
whereas counter register gets incremented by measuring
pulses
Baskaran s Embedded for Mechatronic systems
28. Clock cycle
Clock cycle
The speed of a computer processor, or CPU, is determined
by the clock cycle,
It is the amount of time between two pulses of an oscillator
The higher number of pulses per second, the faster the
computer processor will be able to process information
The clock speed is measured in Hz, typically either
megahertz (MHz) or gigahertz (GHz). For example, a
4GHz processor performs 4,000,000,000 clock cycles per
second.
Baskaran s Embedded for Mechatronic systems
29. Machine cycle
Machine cycle
The steps performed by the computer processor for each ma-
chine language instruction received. The machine cycle is a 4
process cycle that includes reading and interpreting the machine
language, executing the code and then storing that code.
Baskaran s Embedded for Mechatronic systems
30. Instruction cycle
Instruction cycle
1.Read an Instruction
2.Decode the instruction
3.Find the address of operand
4.retrieve an operand
5.Perform desired operation
6.find the address of destination
7.store the result into the destination
Baskaran s Embedded for Mechatronic systems
32. Opcode and operand
Opcode
Opcode is the first part of an instruction which tells the
computer what function to perform. Every computer has an
operation code or opcode for each of its functions.
Operand
Operand is the second part of the instruction, which tells the
computer where to find or store the data or instructions
Baskaran s Embedded for Mechatronic systems
37. DMA
Direct memory access
DMA stands for ”Direct Memory Access” and is a method of
transferring data from the computer’s RAM to another part
of the computer without processing it using the CPU.
In order for devices to use direct memory access, they must
be assigned to a DMA channel. Each type of port on a
computer has a set of DMA channels that can be assigned
to each connected device.
For example, a sound card may need to access data stored
in the computer’s RAM, but since it can process the data
itself, it may use DMA to bypass the CPU. Video cards that
support DMA can also access the system memory and pro-
cess graphics without needing the CPU.
Baskaran s Embedded for Mechatronic systems
39. Co processor
Co processor
A coprocessor is a computer processor used to supplement
the functions of the primary processor (the CPU). Operations
performed by the coprocessor may be floating point arithmetic,
graphics, signal processing, string processing, cryptography or
I/O interfacing with peripheral devices. By offloading processor-
intensive tasks from the main processor, coprocessors can ac-
celerate system performance. Coprocessors allow a line of com-
puters to be customized, so that customers who do not need the
extra performance do not need to pay for it.
Baskaran s Embedded for Mechatronic systems
40. Hardware acceleration
Hardware acceleration
Hardware acceleration is a technique in which a computer’s
hardware is forced to perform faster than the standard
computing architecture of a normal central processing unit
(CPU). It is used with heavy computing tasks and opera-
tions, like graphics or video processing.
Hardware acceleration is forced and controlled by the pro-
gram or software that requests extra computing power. For
example, Mozilla Firefox supports and can initiate hardware
acceleration for websites that are media-rich or have high
definition (HD) graphics.
A hardware accelerator is a device that implements hard-
ware acceleration and includes modern graphic and video
cards.
Baskaran s Embedded for Mechatronic systems
41. Pipe lining
Pipe lining
pipeline is a set of data processing elements connected in
series, where the output of one element is the input of the
next one. The elements of a pipeline are often executed in
parallel or in time-sliced fashion. Some amount of buffer
storage is often inserted between elements.
Types Instruction pipe-lining, Arithmetic pipe-lining
Baskaran s Embedded for Mechatronic systems
43. minipage
pipeline is a set of data process-
ing elements connected in se-
ries, where the output of one el-
ement is the input of the next
one. The elements of a pipeline
are often executed in parallel or
in time-sliced fashion. Some
amount of buffer storage is of-
ten inserted between elements
Baskaran s Embedded for Mechatronic systems