Microprocessor-Based Systems
Microprocessor-Based Systems
Hector
With each passing day, production and industrial processes have undergone great
changes, so these days, automation is an area that is in constant contact with us, so
we must be prepared and know the operation of these devices and their respective
systems.
We find systems based on microprocessors in the majority of devices in our daily lives
such as: domestic, industrial, medicinal, computing, among others. At the time of the
industrial revolution, machines replaced human labor, while today, microprocessors
and their applications try to replace the power of the brain; One of the decisive
inventions of humanity is the digital computer, which together with the electric motor
makes up one of the most efficient technological systems.
We must consider that “System” is defined as a set of elements intertwined with each
other, to perform a specific function or reach an objective that none of them could do
separately; We can conclude that a system based on microprocessors is a set of
related components capable of carrying out actions based on the information received
from a process or a physical phenomenon, represented in machine language (0,1),
arithmetic and logical operations, and perform data transfer with the different I/O
devices connected to the system.
Control unit: Processes the information received from the input peripherals, based on
a logical sequence of instructions and delivers the results to be analyzed and put into
operation.
Output peripherals (Actuators) : These devices are responsible for executing orders
according to the results sent from the Control Unit. They are represented by:
1
Inbacuán
Hector
• Wired Logic: They are rigid circuits, exclusive to perform a specific function,
which means that if we want to implement a new application, a new circuit
must be designed.
• Structuring Source:
in independent blocks Difficult
Collaguazo, Gerardo. Microcontrollers
Easy
2
Inbacuán
Hector
3
Inbacuán
Hector
The Control Unit is responsible for the interpretation and execution of the program
instructions. It also generates the signals that are required by the Arithmetic unit and
other components of the system; It also tells us the direction of the data (whether they
enter or leave) or the device that is being accessed (memory or I/O device). These
signals are sent through lines called buses. It contains logic and timing circuits that
generate the appropriate signals necessary to execute each instruction in a program.
This unit fetches an instruction from memory by sending an address and a read
command to the memory unit. The instruction stored in the memory location is
transferred to it and then executed.
4
Pegee® Inbacuán Hector
Connected through the internal bus are the Internal Registers for temporary data
storage. It is worth mentioning that every microprocessor has a very important register
called an accumulator which contains the first operand of an operation and the result
of the same after having executed it.
Registers have certain specific functions to fulfill within the CPU, namely:
Program Counter (PC) Register is the one that tells the microprocessor the memory
address where the program is being executed. Each time an instruction is read, the PC
automatically increments to supply the address of the memory location where the next
instruction or program data is located.
Instruction register (IR). When the microprocessor captures an instruction, it is
stored in the register (IR), in order to proceed with its decoding or interpretation and
search in the program's (ROM) for the set of instructions necessary for its execution.
This function is performed by a circuit called an instruction decoder.
The Accumulator Register (AC) is used as a source or destination of data. The result
of an operation is generally deposited in it.
The Status Register (SR) provides, through its bits (called flags), information related
to the execution of certain instructions such as sign, flow, parity, carry generation,
negative or zero result, etc.
General purpose records. They are used to store memory addresses, data,
intermediate results and other purposes.
5
Inbacuán
Hector
MEMORY BLOCK
• Storage of the instructions that constitute the program. The instructions are
encoded by their Operation Code (COP), made up of one or more Bytes.
Data word length represents the number of bits that can be accessed in a single
operation, that is, the number of bits that can be written to or read from a memory
location.
Memory capacity represents the number of bits that can be memorized. Considering
an 8-bit word, the usual unit of measurement for memory capacity is the Kilobyte.
Access time represents the time interval between the moment at which an order is
given to read the contents of a memory location and the moment at which the word of
the position is selected.
MEMORY MODULE
ROM MEMORY intended only for writing programs or data that will be saved
definitively.
6
Inbacuán
Hector
7
Pegee® Inbacuán Hector
BUSES
The three main components of a microprocessor-based system (CPU, Memory Block
and I/O module) are interconnected with each other by electrical cables called system
buses.
A bus represents a meeting of lines which carry out the unidirectional or bidirectional
transfer of information.
The presence of a certain bit (0 or 1) on a bus line is marked by a certain value of the
electrical potential on that line. For example, a potential between 2.4-5V marks bit “1”
and a potential between 0-0.4V marks bit “0”.
Data bus is made up of bidirectional lines. The number N of data bus lines is generally
equal to the length of the microprocessor data word. Binary information is transferred
through the data bus between the microprocessor and the peripherals.
Address bus is made up of unidirectional lines. It is used for the transfer of
information necessary for the selection of a certain memory location or a port of the
I/O module .
Control bus is made up of lines, generally unidirectional. On this bus each line has a
different meaning and name. The control bus contains the information that the
microprocessor sends to the elements of the system.
CONTROL SIGNALS
CLK IN It is used by the microprocessor to generate clock pulses and produce timing
and control sequences for internal functions.
CLK OUT The clock pulses of this Terminal are used by external modules to
synchronize their operations with the operations of the microprocessor.
RESET IN Used to initialize the microprocessor.
RESET OUT Informs the external circuitry that the microprocessor is in the reset state.
INTERRUPT IN Used to interrupt the normal operation of the microprocessor, forcing it
to suspend execution of the current program and transfer control to a subroutine. The
interrupt signal usually comes from an I/O unit.
INTERRUPT OUT Informs the external circuitry that the interruption has been
serviced. Once the interruption is executed, the microprocessor returns to the previous
program.
HOLD It is used to suspend the operation of the microprocessor and take it to a state
8
Inbacuán
Hector
called hold in which all the buses remain at high impedance. HOLDA Reports that the
hold request has ended.
The READ and WRITE lines inform the component selected by the address bus the
expected transfer address on the data bus.
The system is composed of a block of logical circuits that allow the introduction of
data, display of results and eventually the modification of the program, that is, a
communication device with the operator, this block is called I/O MODULE and is
intended for
9
Inbacuán
Hector
ensure the transfer of information, represented in binary, between the system and
various peripherals connected to it (keyboards, pushbuttons, switches, electrical
contacts, LEDs, etc.).
mP +
1
0
Inbacuán
Hector
1
1
Inbacuán
Hector
MEDIUM SPEED PERIPHERALS: These are those that transfer data from 1bps
to 10,000 bps. This category includes keyboards, normal printers, CAD, CDA,
data acquisition systems, etc.
HIGH SPEED PERIPHERALS: These are those that transfer data at speeds
greater than 10,000 bps. This category includes magnetic and optical disks,
laser printers, high-speed communication lines, video displays (CRT), etc.
Other microprocessor systems use the Harvard Architecture, which has two
types of independent memory (data memory and program memory) to which it is
connected through two groups of separate buses, according to Figure 10.
1
2
Inbacuán
Hector
MEMORY OF
PROGRAM
(ROM)
. , MEMORY OF
\ DATA
' V (RAM)
• Idioms of microprogramming.
• Idioms of machine.
• Idiomsassemblers.
• Idioms of high level.
Machine Language: is the binary form (0's and 1's) of the program and is the
only language that the microprocessor ultimately understands. A simplified form
is the object code, which represents each binary code by its hexadecimal
equivalent.
Assembly Language and high-level languages (Pascal, Basic, C, C++, etc.)
consist of a series of special instructions (statements) that are easier for people
to understand than instructions in machine language or object code.
Assembly Language uses Mnemonics, which are groups of alphanumeric
characters that symbolize the orders or tasks to be performed with each
instruction. In general, mnemonics correspond to the initials of the name of the
instruction in English, so that they “remember” the operation that the instruction
performs, which facilitates its memorization.
THE INSTRUCTIONS
One of the main characteristics of any microprocessor is having a good set of
instructions that give it the greatest possible versatility. The following groups,
types or sets of instructions are established:
1
3
bezeee Inbacuán Hector
1
4
Inbacuán
Hector
1
5
Inbacuán
Hector
• BIBLIOGRAPHY
Collaguazo, Gerardo. Microcontrollers. Systems based on microprocessors.
1
6