Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microprocessor and Microcontroller Fundamentals

Similar presentations


Presentation on theme: "Microprocessor and Microcontroller Fundamentals"— Presentation transcript:

1 Microprocessor and Microcontroller Fundamentals
Electronics and Communication Engineering Dr. Shahanaz Ayub Associate Professor BIET, Jhansi ELEC 330

2 Microcontrollers Embedded Systems Microcontroller (MCU)
Operations managed behind the scenes by a microcontroller Microcontroller (MCU) Integrated electronic computing device that includes three major components on a single chip Microprocessor (MPU) Memory I/O (Input/Output) ports

3 Microcontrollers Support Devices Common communication lines Timers
A/D converter Serial I/O Common communication lines System Bus

4 Block Diagram ELEC 330

5 Microprocessor (MPU) MPU (CPU) Read instructions Process binary data

6 Memory Storage Device Major Categories Read/Write Memory (R/W)
Addresses Registers Major Categories Read/Write Memory (R/W) Read-only-Memory (ROM) D7 D0

7 Input/Output (I/O) Input Devices Output devices Switches and Keypads
Provide binary information to the MPU Output devices LEDs and LCDs Receive binary information from the MPU

8 Microprocessor-Based Systems

9 Microprocessor Architecture
MPU communicates with Memory and I/O using the System Bus Address bus Unidirectional Memory and I/O Addresses Data bus Bidirectional Transfers Binary Data and Instructions Control lines Read and Write timing signals

10 Microprocessor-Based System

11 Example Microprocessor System

12 Software Machine Language Binary Instructions
Difficult to decipher and write Error-prone All programs converted into machine language for execution Instruction Hex Mnemonic Description Processor 80 ADD B Add reg B to Acc Intel 8085 28 ADD A, R0 Add Reg R0 to Acc Intel 8051 1B ABA Add Acc A and B Motorola 6811

13 Software Assembly Language
Machine instructions represented in mnemonics One-to-one correspondence Efficient execution and use of memory Machine-specific

14 Software High-Level Languages BASIC, C, and C++
Written in statements of spoken languages Machine independent Easy to write and troubleshoot Larger memory and less efficient execution

15 Data Format (8-bit) Unsigned Integers
All eight bits represent the magnitude of a number B0 to B7 Range 00H to FFH (0-255 in decimal number system)

16 Data Format (8-bit) Signed Integers 2's Complement
B7 is sign bit Positive numbers: 00H to 7FH (0 -127) Negative numbers: 80H to FFH ( )

17 Data Format (8-bit) Binary Coded Decimal Numbers (BCD)
8-bit number divided into two groups of four Each group represents a decimal digit from 0 to 9 AH through FH are invalid Example: BCD = 3410

18 Data Format (8-bit) ASCII system
7-bit alphanumeric code with 128 combinations Represents alphabet, decimal digits from 0 to 9, symbols, and commands

19 MPU-Based Systems System hardware System software Discrete components
Microprocessor, Memory, and I/O Components connected by buses Address, Data, and Control System software Group of programs that monitors the functions of the entire system

20 MPU-Based System

21 MCU-Based Systems Microprocessor, memory, I/O ports, and support devices on a single chip Buses generally not available to a system designer I/O ports generally multiplexed and can be programmed to perform different functions

22 MCU-Based System

23 Computer Architectures
Von Neumann Architecture Vs Harvard Architecture The von Neumann architecture, also known as the von Neumann model and Princeton architecture Harvard architecture has separate data and instruction busses, allowing transfers to be performed simultaneously on both busses. A von Neumann architecture has only one bus which is used for both data transfers and instruction fetches, and therefore data transfers and instruction fetches must be scheduled - they can not be performed at the same time. CISC versus RISC processors Microprocessors and Microcontrollers ELEC 330

24 Computer Architectures
CISC versus RISC processors Microprocessors and Microcontrollers CISC RISC Emphasis on hardware Emphasis on software Includes multi-clock Single-clock complex instructions reduced instruction only Memory-to-memory: “LOAD” and “STORE” incorporated in instructions Register to register: “LOAD” and “STORE” are independent instructions high cycles per second, Small code sizes Low cycles per second, large code sizes Transistors used for storing complex instructions Spends more transistors on memory registers ELEC 330

25 Computer Architectures
Microprocessors and Microcontrollers MICROPROCESSOR MICROCONTROLLER Microprocessor assimilates the function of a central processing unit (CPU) on to a single integrated circuit (IC). Microcontroller can be considered as a small computer which has a processor and some other components in order to make it a computer. Microprocessors are mainly used in designing general purpose systems from small to large and complex systems like super computers. Microcontrollers are used in automatically controlled devices. Microprocessors are basic components of personal computers. Microcontrollers are generally used in embedded systems Computational capacity of microprocessor is very high. Hence can perform complex tasks. Less computational capacity when compared to microprocessors. Usually used for simpler tasks. A microprocessor based system can perform numerous tasks. A microcontroller based system can perform single or very few tasks. Microprocessors have integrated Math Coprocessor. Complex mathematical calculations which involve floating point can be performed with great ease. Microcontrollers do not have math coprocessors. They use software to perform floating point calculations which slows down the device. ELEC 330

26 Computer Architectures
Microprocessors and Microcontrollers [2] MICROPROCESSOR MICROCONTROLLER The main task of microprocessor is to perform the instruction cycle repeatedly. This includes fetch, decode and execute. In addition to performing the tasks of fetch, decode and execute, a microcontroller also controls its environment based on the output of the instruction cycle. In order to build or design a system (computer), a microprocessor has to be connected externally to some other components like Memory (RAM and ROM) and Input / Output ports. The IC of a microcontroller has memory (both RAM and ROM) integrated on it along with some other components like I / O devices and timers. Generally power consumption and dissipation is high because of the external devices. Hence it requires external cooling system. Power consumption is less. The clock frequency is very high usually in the order of Giga Hertz. Clock frequency is less usually in the order of Mega Hertz. Have few bit manipulation instructions Bit manipulation is powerful and widely used feature in microcontrollers. They have numerous bit manipulation instructions. ELEC 330

27 Thank you..


Download ppt "Microprocessor and Microcontroller Fundamentals"

Similar presentations


Ads by Google