The document provides an introduction to microcontrollers and microprocessors. It discusses that microcontrollers integrate a microprocessor, memory, and input/output interfaces on a single chip for use as embedded controllers. The key components of a microcontroller include the central processing unit (CPU), memory to store instructions and data, and input/output interfaces to communicate with external devices. Buses are used to transfer data and instructions between the different components. The CPU contains an arithmetic logic unit, registers for temporary storage, and a control unit that manages operations. Microcontrollers are widely used as the control systems in mechatronic devices.
The document provides an introduction to microcontrollers and microprocessors. It discusses that microcontrollers integrate a microprocessor, memory, and input/output interfaces on a single chip for use as embedded controllers. The key components of a microcontroller include the central processing unit (CPU), memory to store instructions and data, and input/output interfaces to communicate with external devices. Buses are used to transfer data and instructions between the different components. The CPU contains an arithmetic logic unit, registers for temporary storage, and a control unit that manages operations. Microcontrollers are widely used as the control systems in mechatronic devices.
The document provides an introduction to microcontrollers and microprocessors. It discusses that microcontrollers integrate a microprocessor, memory, and input/output interfaces on a single chip for use as embedded controllers. The key components of a microcontroller include the central processing unit (CPU), memory to store instructions and data, and input/output interfaces to communicate with external devices. Buses are used to transfer data and instructions between the different components. The CPU contains an arithmetic logic unit, registers for temporary storage, and a control unit that manages operations. Microcontrollers are widely used as the control systems in mechatronic devices.
The document provides an introduction to microcontrollers and microprocessors. It discusses that microcontrollers integrate a microprocessor, memory, and input/output interfaces on a single chip for use as embedded controllers. The key components of a microcontroller include the central processing unit (CPU), memory to store instructions and data, and input/output interfaces to communicate with external devices. Buses are used to transfer data and instructions between the different components. The CPU contains an arithmetic logic unit, registers for temporary storage, and a control unit that manages operations. Microcontrollers are widely used as the control systems in mechatronic devices.
Introduction • Any computer with proper I/O interface devices (digital and analog I/O) and software tools can be used as a controller. • Can be non embedded or embedded ✓Non embedded: a desktop PC can be used as a process controller by adding an I/O expansion board and control software. ✓Embedded: computer used as the controller of a mechatronic system. • A microcontroller is the main building block of an embedded computer. Microcontroller ▪ The microcontroller is the integration of a microprocessor with memory and input/output interfaces, and other peripherals such as timers, on a single chip. ▪ A microcontroller is an integrated microprocessor chip with many I/O interfaces. ▪ The general microcontroller has pins for external connections of inputs and outputs, power, clock and control signals. ▪ The pins for the inputs and outputs are grouped into units called input/output ports. Figure: Block diagram of a microcontroller. Cont.. ▪ Microprocessors which have memory and various input/output arrangements all on the same chip are called microcontrollers. ▪ Systems using microprocessors basically have three parts: ▪ Central processing unit(CPU): to recognize and carry out program instructions (this is the part which uses the microprocessor), ▪ Input and output interfaces: to handle communications between the microprocessor and the outside world (the term port is used for the interface), and ▪ Memory: to hold the program instructions and data. ▪ Digital signals move from one section to another along paths called buses. Buses ❖There are three forms of bus in a microprocessor 1. Data bus: carries the data associated with the processing function of the CPU. ✓ It is used to transport a word to or from the CPU and the memory or the input/output interfaces. ✓ Each wire in the bus carries a binary signal, i.e. a 0 or a 1. 2. Address bus: carries signals which indicate where data is to be found and so the selection of certain memory locations or input or output ports. ✓ Each storage location within a memory device has a unique identification, termed its address, so that the system is able to select a particular instruction or data item in the memory. ✓ Each input/output interface also has an address. 3. Control bus: carries the signals relating to control actions. Cont..
Figure: General form of a microprocessor system and its buses.
Parts of microcontroller 1. Central Processing Unit (CPU): is generally referred to as the microprocessor • It is that part of the processor system which processes the data fetching instructions from memory, decoding them and executing them.
Figure: General internal architecture of a microprocessor.
Cont.. ❖ Constituent parts of a micro processor (CPU) and their function 1. Arithmetic and logic unit (ALU): is responsible for performing the data manipulation. 2. Registers: are memory locations within the microprocessor and are used to store (temporarily) information involved in program execution. The following are common types of registers. 2.1 Accumulator register: is where data for an input to the arithmetic and logic unit is temporarily stored. 2.2 Status register, or flag register: contains information concerning the result of the latest process carried out in the arithmetic and logic unit. 2.3 Program counter register(PC): is the register used to allow the CPU to keep track of its position in a program. • This register contains the address of the memory location that contains the next program instruction. Cont.. 2.4 Memory address register (MAR):This contains the address of data. 2.5 Instruction register(IR): This stores an instruction. After fetching an instruction from the memory via the data bus, the CPU stores it in the instruction register. 2.6 General-purpose registers: may serve as temporary storage for data or addresses and be used in operations involving transfers between other registers. 2.7 Stack pointer register (SP): The stack is a special area of the memory in which program counter values can be stored when a subroutine part of a program is being used. NB: The number and form of the registers depends on the microprocessor concerned (Motorola 6800 microprocessor, Intel 8085A microprocessor,…). 3. Control unit: determines the timing and sequence of operations. ✓It generates the timing signals used to fetch a program instruction from memory and execute it. Cont.. 2. Memory: hold the program instructions and data ✓ Stores binary data and takes the form of one or more integrated circuits. ✓ The data may be program instruction codes or numbers being operated on. ✓The size of the memory is determined by the number of wires in the address bus. ✓The memory elements in a unit consist essentially of large numbers of storage cells with each cell capable of storing either 0 or 1 bit. ✓The storage cells are grouped in locations with each location capable of storing one word. ✓In order to access the stored word, each location is identified by a unique address. Cont.. 3. Input and output interfaces: ▪ The input/output operation is defined as the transfer of data between the microprocessor and the external world. ▪ Input Devices ➢Switches and Keypads ➢Provide binary information to the MPU ▪ Output devices ➢LEDs and LCDs ➢Receive binary information from the MPU Thank you!!!