Mechatronics Mechatronics: Post Graduate College
Mechatronics Mechatronics: Post Graduate College
Mechatronics
Mechatronics
Prepared by:
Dr. Ahmed Hassan M. Hassan
Associate Professor
[email protected]
Microprocessor-based system
Word: A word refers to the basic data size or bit size that can be
processed by the arithmetic and logic unit of the processor. A 16-bit
binary number is called a word in a 16-bit processor.
3) Based on architecture:
(8)
(8) (8)
(8) (8)
(8) (8)
(16)
(16)
8 Lines Bidirectional
16 Lines Bidirectional
The ALU includes five flip-flops, which are set or reset after an operation
according to data condition of the result in the accumulator and other
registers. They are called Zero (Z), Carry (CY), Sign (S), Parity (P) and
Auxiliary Carry (AC) flags. The microprocessor uses these flags to test data
conditions.
+
0 0 1 0 0 0 1 1
(1)
Carry
Lecture #2: Organization of 8085
Zero Flag
Zero flag occupies the 6th of the flag register. It is set (1)
when the operation performed in the ALU results in 0 and is
reset (0) when the result is not zero.
This 16-bit register deals with sequencing the execution of instructions. This
register is a memory pointer. The microprocessor uses this register to
sequence the execution of the instructions. The function of the program
counter is to point to the memory address from which the next byte is to be
fetched. When a byte is being fetched, the program counter is automatically
incremented by one to point to the next memory location.
Control Unit
Generates signals on data bus, address bus and control bus within
microprocessor to carry out the instruction, which has been decoded.
Data Bus:
Data bus carries data in binary form between microprocessor and
other external units such as memory.
It is used to transmit data i.e. information, results of arithmetic etc
between memory and the microprocessor.
Data bus is bidirectional in nature. The data bus width of 8085
microprocessor is 8-bit i.e. 28 combination of binary digits and are
typically identified as D0 – D7.
Thus size of the data bus determines what arithmetic can be done.
If only 8-bit wide then largest number is 11111111 (255 in decimal).
Therefore, larger numbers have to be broken down into chunks of
255. This slows microprocessor.
Control Bus: Control bus are various lines which have specific
functions for coordinating and controlling microprocessor operations.
The control bus carries control signals partly unidirectional and partly
bidirectional.
Properties:
It is a 8-bit microprocessor
Manufactured with N-MOS technology
40 pin IC package
It has 16-bit address bus and thus has 216 = 64 KB
addressing capability.
Operate with 3 MHz single-phase clock
+5 V single power supply
IN RESET : When the signal on this pin is low, the PC is set to 0, the buses
are tri-stated and the processor is reset.
RESET OUT: This signal indicates that the processor is being reset. The
signal can be used to reset other devices.
READY: When this signal is low, the processor waits for an integral
number of clock cycles until it goes high.
HOLD: This signal indicates that a peripheral like DMA (direct
memory access) controller is requesting the use of address and data bus.
HLDA: This signal acknowledges the HOLD request.
INTR: Interrupt request is a general-purpose interrupt.
INTA : This is used to acknowledge an interrupt.
RST 7.5, RST 6.5, RST 5,5 – restart interrupt: These are vectored
interrupts and have highest priority than INTR interrupt.
TRAP: This is a non-maskable interrupt and has the highest priority.