You are on page 1of 32

Microprocessor Basics

By Michael Xenya
Outline
 A basic microprocessor system:
the CPU,
memory,
I/O, and buses subsystems,
 Basic operation of a microprocessor system:
Fetch, decode and execute cycle,
 The architecture of some typical 8- bit
microprocessors and micro-controllers,
 Some typical 8-bit micro-controllers and their features
1.1 A basic microprocessor system
• A system must have at least one input, one
output and must do something,
i.e. it must contain a process.

Fig 1
Terminologies
Integrated circuits
 An electronic circuit fabricated out of a solid block
of semiconductor material.

 This design of circuit, often called a solid state


circuit, allows for very complex circuits to be
constructed in a small volume.
Microprocessor (µp)
 On its own, without a surrounding circuit and applied voltages
it is quite useless.
 The microprocessor contains arithmetic and logic unit (ALU),
array of registers, and control unit.

Micro
The word micro is used in electronics and in science generally, to mean
‘one-millionth’ or 1 /106.

It has also entered general language to mean something very small like a
very small processor or microprocessor.

It has also become an abbreviation for microprocessor, microcomputer,


microprocessor-based system or a microcontroller.
Microprocessor-based system
• This is any system that contains a microprocessor, and does
not necessarily have anything to do with computing.
• In fact, despite all the hype, computers use only a small
proportion of all the microprocessors manufactured.

Microcomputer
The particular microprocessor-based systems that happen to
be used as a computer are called microcomputers.

The additional circuits required for a computer can be built into


the same integrated circuit giving rise to a single chip
microcomputer and often a microcontroller.
Microcontroller
• This is a complete microprocessor-based control system built
onto a single chip.

• It is small and convenient but doesn’t do anything that could


not be done with a microprocessor and a few additional
components.

MPU and CPU


An MPU is a MicroProcessor Unit or microprocessor. A
CPU is a Central Processing Unit.

This is the central ‘brain’ of a computer


Bits, bytes and other things
• All the information entering or leaving a
microprocessor is in the form of a binary
signal, a voltage switching between the two
bit levels 0 and 1.

• Bits are passed through the microprocessor at


very high speed and in large numbers and we
find it easier to group them together.
Nible and Byte
Nibble
• A group of four bits handled as a single lump.
It is half a byte.

Byte
• A byte is simply a collection of 8 bits. Whether
they are ones or zeros
• or what their purpose is does not matter.
Word and word sizes
Word
• A number of bits can be collected together to form a ‘word’.
• Unlike a byte, a word does not have a fixed number of bits in it.
• It depends on microprocessor being used.
• The most likely values are 8, 16, 32 and 64 bits but no value is
excluded.

Long word
• In some microprocessors where a word is taken to mean say 16 bits,
• a long word would mean a group of twice the normal length, in this
case 32 bits.
• Kilobyte (Kb or KB or kbyte)
• A kilobyte is 1024 or 210 bytes. In normal use, kilo
means 1000 .
• In the binary system, the nearest column value to
1000 is 1024 since 29 = 512 and 210 = 1024.
• The move in the computing world to use an upper
case K to mean 1024 rather than k for meaning 1000
is trying to address this problem.
• Bits often help to confuse the situation even further.
1000 bits is a kilobit or kb. Sometimes 1024 bits is a
Kb. One way to solve the bit/byte problem is to use
kbit (or Kbit) and kbyte (or Kbyte).
• Megabyte (MB or Mb)
This is a kilokilobyte or 1024 1024 bytes.
Numerically this is 220 or 1 048 576 bytes.

• Gigabyte (Gb)
This is 1024 megabytes which is 230 or 1 073
741 824 bytes. In general engineering, giga
means one thousand million (109).
• Terabyte (TB or Tb)
• Terabyte is a megamegabyte or 240 or 1 099 511 600
000 bytes (Tera = 1012).

• Petabyte (PB or Pb)


• This is a thousand (or 1024) times larger than the
Terabyte so it is 1015 in round numbers or 240 which is
pretty big. If you are really
• interested, you can multiply it out yourself by
multiplying the TB figure by 1024.
CPU
 A central processing unit (CPU) is the electronic
circuitry within a computer that carries out the
 Instructions of a computer program by performing the
basic arithmetic, logical, control and input/output (I/O)
operations specified by the instructions.

CPU can be found under the heat sink


Component of the CPU
The components of the CPU are:
• arithmetic Logic Unit (ALU),
•Control Unit (CU) and
•Memory. (Or an array of registers)

As introduction,
•ALU will holds data temporarily
and carries out the calculations but

•The CU will interprets and controls


the execution of instructions
Memory
The function of a memory is to store information – almost the same as
for the register.
Memory
Two main categories: Temporal and Permanent storage.

Volatile(RAM): Looses data when power is off


• further divided into static and dynamic.
Non Volatile(ROM): Retain it data when power is off
• Further divided into three types, namely: PROM and EPROM and Masked PROM.

Order in terms of storage size:


• Register-> Cache-> Main memory -> Disck storage

• Order in terms of speed:


• Disck storage -> Main memory -> Cache -> Register
The most basic microprocessor
based system
The most basic microprocessor based
system

An input/output
chip has been
added
A complete microprocessor system
Operation of Microprocessor
• To demonstrate its operation we can ask it to perform a
simple task.
• The operation follows a three cycle model: fetch, decode and
execute.

• Instruction: Send eg. the number 25H which is in the ROM


and store it in the RAM at address 2500H. This is what
happens

• Step 1: The microprocessor has to collect the instruction


from an address in ROM. It does this by putting the address
onto the address bus.
Operation of Microprocessor
Step 2: The address is applied to the ROM and the RAM as
well as the address decoder.

• Chip selects will be switched off at the moment.

• When the logic gates within the address decoder


responds to the input from the address bus the result
will be that the ROM is switched on and the other two
are kept off.
Operation of Microprocessor
Step 3: Switching on the ROM will mean that it takes in
the address from the address bus.

• Inside the ROM chip, the row and column decoders


activate one of the memory locations and the binary
number stored at that location is placed on the data
bus by switching on the tri-state buffers.

• As soon as the information is read, the chip select


will switch the ROM chip off.
Operation of Microprocessor

Step 4: The information which is now on the data


bus is read by the microprocessor. It is an
instruction which can be interpreted as ‘go to
address F600H and read the number that is
stored in that address’.

Step 5: In response to this instruction, the


microprocessor puts the address F600H onto the
address bus.
Operation of Microprocessor

Step 6: The address decoder applies this number to its


logic gates and this results in the chip select of the
ROM chip being switched on again.
• The ROM chip accepts the address F600H into its row
and column decoders and then puts the number 25H
onto the data bus.

Step 7: This number is stored temporarily in the


microprocessor.
Operation of Microprocessor
Step 8: The microprocessor then puts the number
2500H onto the address bus and the address decoder
puts a signal on the chip select of the RAM chip to
switch it on.
• It then sends a logic 1 on the read/write line.
• The RAM is switched on and it is told to read the data
on the data bus.
• The read/write line goes to the I/O chip as well but
again, this causes no problem because its chip select
line is keeping it switched off.
Conclusion on operation of the
microprocessor
• Finally,
• The number 25 is now safely stored in the
RAM chip and will remain there until it is over-
written with new information or the power is
switched off.
The three cycle instruction
execution model
• To execute a program, the microprocessor “reads”
each instruction from memory, “interprets” it, then
“executes” it.

• To use the right names for the cycles:The


microprocessor fetches each instruction,
Decodes it, then executes it.

• This sequence is continued until all instructions are


performed.
8085 MicroprocessorArchitecture
8-bit general purpose μp
Capable of addressing 64 k of memory
Has 40 pins
Requires +5v power supply
Can operate with 3 MHz clock
8085 upward compatible
8085 Microprocessor (Pin Out)

You might also like