Microprocessor Fundamentals: by Physics Department Smt. CHM College, Ulhasanagar-3
Microprocessor Fundamentals: by Physics Department Smt. CHM College, Ulhasanagar-3
Objectives
To study Block diagram of a microprocessor based system. To explain the functions of
Microprocessor Memory Input device Output device System bus.
Low level and high level language. Advantages of assembly language over high level language. Operating system?
Microprocessor
It is multipurpose, programmable, clock driven, register based electronic device. Reads binary instruction from memory, accepts binary data as input and processes the data according to those instructions, and provides result as output. Programmable device computing and decision
making capability.
Memory
Four Components of a typical Programmable machine Microprocessor Input device Output Device Memory
Microprocessor
Input
Output
A Programmable Machine
Applications:
- To control processes : Traffic light system. - To compute mathematical functions. - To keep track of a guidance systems etc.
Classification:
Reprogrammable Systems (Microcomputers & PC)
Microprocessor used for computing & data processing The system includes microprocessor, Large storage device such a HDD & CD ROMs, and Peripherals IO devices .
CPU contains
ALU & Control Unit Registers Instruction decoder Counters and Control lines
ALU
Input CONROL UNIT Output
Memory
It reads instruction from memory and performs task specified. It communicates with input/output devices either to accept or to send data. The communication process of CPU is controlled by Control Unit.
CPU with discrete components - 1990 Replaced by single chip with the advent of Integrated Circuit Technology.
Input
Microprocessor as CPU
Output
A computer with a microprocessor as its CPU is known as microcomputer MPU is a complete processor unit with the necessary control unit Because of limited number of pins available on the MPU package , some of the signals need to be generated outside using some desecrate devices
Memory
Microcontroller
MPU
Microcontrollers or MCU
Memory
I/O
- MPU, memory, I/O devices and some peripheral devices on a single chip
- Entire computer on single chip
Peripheral Devices
A/D Converters Timers Serial I/O
Historical Perspective
Intel engineer Ted Hoff pioneer. In 1969 Intel was in the business of semiconductor memory only.
(64 bit bipolar RAM chip)
Japanese company Busicom contacted Intel to design programmable calculator. The original design called for 12 different functions with hard wired programming. Ted Hoff suggested a general purpose programmable chip. The first 4-bit microprocessor - 4004 in year 1971 (2300 transistors, 640
bytes memory addressing capability and 108 KHz clock)
Intel 8008, 8080, 8085 , 8086 etc Motorola 6800 Zilog Z80 Moores Law: Number of transistor per interacted circuit would double every 18 months By the year 2000 15 million transistor, 400MHz to 1.5GHz clock, one terabyte
(10 12 ) of memory. (Pentium IV)
Operating System
The interaction between the hardware and the software is managed by a set of programs called an Operating System of a computer. Operating system is responsible primarily for storing information on the disk and to communicate with the peripherals. Different OS:
CP/M (computer Monitor program) in 1970s for 8 bit processors. MS DOS (Microsoft Disk Operating System) 1980s for 16-bit processors GUI (Graphic User Interface) 1990s for Windows 3.1 and 95 Unix, Linux, OS/2, Windows 95/98/2000, ME, NT, XP etc.
Memory Mcroprocessor Enters data andinformation instructions under the control and of a program stores binary ( instructions data). such as a monitor program Microprocessor provides the instructions and data to the I/O keyboard, switches, ADCs etc. reads instructions from memory. microprocessor on request. Input system / Outputbus. communicates with all peripherals using stores the result and data for the microprocessor. Register The output device: ALU timing of information flow. controls te m Bus in a program. performs theArray computing task Sys specified
Accepts data from the microprocessor as specified in a program - LED / LCD display, CRT, video screen, printer, X -Y plotters, Memory magnetic tapes, DACs etc.
ROM
R / WM
Carries bits (information) between the microprocessor and memory and I/Os.
Finally it sends the result to the output device and/or stores the result in the memory.
2. Assembly language
English-like abbreviations representing elementary microprocessor / computer operations Machine dependent. Clearer to humans Incomprehensible to (cant be understood by) computers
So require Translator Program ( called assembler or cross assembler). Convert Mnemonics to machine language
Example:
LDA C200 ADD B INR A
3. High-level languages
Similar to everyday English, use common mathematical notations Single statements accomplish substantial tasks
Assembly language requires many instructions to accomplish simple tasks Convert to machine language Directly execute high - level language programs
Interpreter programs
Machine independent. Compiler and interpreter require large memory space (because instruction in English requires several machine codes to translate in binary) Translation : Source Code Compiler / Interpreter Object Code Example:
grossPay = basePay + overTimePay
Assembly Language
Data bus:
Group of 8 lines. Bidirectional. Use for data transfer form MPU to peripherals / memory or vise versa. The numbers that can appear on data bus ranging from 00H to FFH The 8085 microprocessor is 8-bit processor Intel 8086, Zilog Z8000, Motorolla 6800 16bit Intel 80386/486 32-bit processors.
Control bus:
Comprised of various single lines, that carry timing / synchronization signal. the MPU generates specific control signals for every operations such as Memory read, memory write, I/O read or I/O write. These signals are used to identify a device type with which the MPU intended to communicate.
The contents of the memory location are placed on data bus and brought inside the MPU.
Register Arrays
TWO SEGMENTS:
16-bit Address Bus
ALU
Flags
Instruction Register
ALU performs arithmetic and logic operations, and results are stored in accumulator The flags are set or reset to reflect the result. 16-bit address bus identifies the memory Location, 8-bit data bus is used to transfer data and control bus for timing signals.
Program Counter:
Is a 16 bit special purpose register, which stores the address of the next instruction Accumulator A (8) Flag Register (8) to be fetched. Acts Register as a pointer the next instruction. How processor increments program counter A to (Accumulator): B (8) C (8) to Flag register is group of five flip-flops used depends on the nature ofa instruction. >> It is tri-state 8-bit register In case of JMP and CALL instructions, address followed by JMP and CALL E (8)ALU give ofD the operations performed by >>status After performing arithmetic and logic operations ALU places (8) - instruction is placed in the program counter. result on SP theJMP internal data from there it is generally stored in Why and areand 16Conditional - bitbus registers? In case PC of Conditional CALL instructions, L (8) H (8) address accumulator. followed by JMP and CALL instructions is placed in the program counter It is also used in otherwise load and the store operations, if the>> condition is satisfied; program counter is incremented by three PC and SP are the memory pointers and(16) the address Stack Pointer (S P) so as to as point the address of /output the next (I/O) instruction to be fetched. well as in input operations.
of any memory location 8085 is 16 bit >> Most of the times the in results of microprocessor arithmetic operations Program Counter (PC) and logical (16) Stack : address, so to this address PC and SP must be is Pointer stored in hold register A, 16-bit hence it is called as accumulator. Data Bus Address Bus The stack is the reserved area the memory in the RAM >> The register A can be used as a of general-purpose register. 16 bit registers. where the temporary data can be stored. 16 It is used to hold the address of the most Lines recent stack entry. 8
Lines
Bi di recti onal
D6
Z
D5
X
D4
AC
D3
X
D2
P
D1
X
D0
CY
S - Sign flag Z - Zero flag AC - Auxiliary carry flag P - Parity flag and CY - Carry flag