HOW MICROCOMPUTERS WORK:COMPUTER ORGANIZATION AND OPERATION

COMPUTER ORGANIZATION AND OPERATION

All microcomputers are made up of four basic sections: memory, control unit, arithmetic-logic unit, and I/O unit. A general block diagram of a microcomputer showing these four sections is given in Figure 6.4. These four sections communicate with one another over multiple parallel electrical conductor data paths called a bus, as shown, to process the data or perform a control function.

Note that the control and arithmetic-logic unit (ALU) are shown together in a common structure. This is the central processing unit (CPU). The CPU is, of course, usually a microprocessor.

The memory is that part of the computer where data and programs are stored. The memory in any computer may contain thousands, millions, or even billions of locations used for storing numbers, words, or other forms of information.

Two primary types of information are stored in computer memory. The first type is the data to be processed. These are the codes, numbers, letters, and other forms of data to be manipulated.

Electronics Explained-0124

The other type of data stored in memory is an instruction. Instructions are special binary numbers or codes that tell the computer what to do. Instructions specify the ways in which the data is to be processed. For instance, there are instructions that cause arithmetic operations to take place or data to be transferred from one place to another.

The instructions listed in a special sequence form a program. A program is a list of instructions that causes data to be processed in a unique way. A program is a step-by-step procedure that solves a problem, performs a control operation, or otherwise manipulates data according to some recipe. Programs are stored in memory along with the data that they process. In some micros there are separate memories for data and instructions. The programs that a computer uses are called software.

Data and instructions can be stored in or retrieved from memory during processing. When data is stored, we say that it is written into memory. When data is retrieved, we say that it is read from memory. A typical write operation transfers data from an analog-to-digital converter and stores it in memory. A common read operation accesses data in memory to be transferred to an LCD screen.

Now let’s look at the operation of the CPU. The control unit is that portion of the digital computer responsible for the automatic operation. The control unit sequentially examines the instructions in a program and issues signals to the other sections of the computer that carry out designated operations.

Each instruction is fetched (read) from memory by the control unit, interpreted, and then executed one at a time until the program is completed. This is called the fetch-execute cycle, which is repeated on each instruction until the program runs to completion. The execution of each instruction may call for accessing one or more data words in the memory or storing a data word in memory.

The ALU is the section of the computer that carries out many of the functions that are specified by the instructions. In other words, the ALU actually processes the data. Specifically, the ALU carries out two main types of processing: arithmetic operations (such as addition, subtraction, multiplication, and division) or logic operations (such as AND, OR, complement, or exclusive OR). For example, if an add instruction is stored in memory, the control section will fetch it, interpret it, and send signals to the ALU that cause two numbers to be added.

The ALU also performs data movement operations. It can move data or instruction words from one place to another inside the CPU or it can carry out memory read/write or input/output operations. These are called load and store instructions.

A key part of the CPU associated with the ALU is the registers. Most ALUs have two or more registers. High-powered CPUs may have a group of 16 or more registers, called general-purpose registers (GPRs). The registers are used to temporarily store the data being processed by the ALU and the results of the computations. Other registers in the CPU store a number called an address where the data or instructions are stored, store the instruction being executed, or act as a stop-off place for data into or out of the CPU.

The control section, ALU, and the registers in all micros are very closely related. They operate together and are always considered as a single unit. As indicated earlier, the combination of the control and the ALU sections is called the CPU (see Figure 6.4). In addition, microprocessors are single-chip CPUs. Besides being called CPUs, microprocessors are sometimes called MPUs or microprocessing units. You will also see the expression μPused to refer to a microprocessor. The μ is the Greek letter mu, which means micro; theP means processor.

A microcomputer consists of a microprocessor (the CPU) plus external memory and I/O circuits. Or it could be an embedded controller with every- thing on one chip. The memory is either SRAM or DRAM for data and pro- grams and EEPROM or flash for the program.

The I/O unit of the computer is the set of logic circuits that permits the CPU and memory to communicate with the outside world. The I/O circuits are referred to as interfaces. All data transfers into and out of the computer pass through the I/O interfaces.

The external peripheral devices, or peripherals, connected to the I/O unit are electronic or electromechanical units that are used for data entry or data display. Data is most commonly entered into the computer through an input keyboard or a disk drive.

The output data is usually displayed on a video monitor or small LCD screen. “Hard copy” on paper is created by a printer. There are a wide variety of other external input/output devices such as scanners, voice synthesizers, and barcode readers.

In an embedded microcontroller, the peripheral devices include keyboard, ADC, sensors, magnetic stripe readers, barcode scanner, and so on. Outputs go to relays, motors, lights, and liquid crystal displays (LCDs).

Leave a comment

Your email address will not be published. Required fields are marked *