Posts

External Memory

Image
External Memory The system designer is not limited by the amount of internal RAM and ROM available on chip. Two separate external memory spaces are made available by the 16-bit PC and DPTR and by different control pins for enabling external ROM and RAM chips. Internal control circuitry accesses the correct physical memory, depending upon the machine cycle state and the opcode being executed. There are several reasons for adding external memory, particularly program memory, when applying the 8051 in a system. When the project is in the prototype stage, the expense-in time and money-of having a masked internal ROM made for each program "try" is prohibitive. To alleviate this problem, the manufacturers make available an EPROM version, the 8751, which has 4K of on-chip EPROM that may be programmed and erased as needed as the program is developed. The resulting circuit board layout will be identical to one that uses a factory-programmed 8051. The only drawbacks to the 8751 are...

Input/Output Pins, Ports, and Circuits

Image
Input/Output Pins, Ports, and Circuits One major feature of a microcontroller is the versatility built into the input/output (110) circuits that connect the 8051 to the outside world. As noted in Chapter I, microprocessor designs must add additional chips to interface with external circuitry; this ability is built into the microcontroller. To be commercially viable, the 8051 had to incorporate as many functions as were technically and economically feasible. The main constraint that limits numerous functions is the number of pins available to the 8051 circuit designers. The DIP has 40 pins, and the success of the design in the marketplace was determined by the flexibility built into the use of these pins. For this reason, 24 of the pins may each be used for one of two entirely different functions, yielding a total pin configuration of 64. The function a pin performs at any given instant depends, first, upon what is physically connected to it and, then, upon what software commands ...

8051 Microcontroller Hardware

Image
Introduction The first task faced when learning to use a new computer is to become familiar with the capability of the machine. The features of the computer are best learned by studying the internal hardware design, also called the architecture of the device, to determine the type, number, and size of the registers and other circuitry. The hardware is manipulated by an accompanying set of program instructions, or software, which is usually studied next. Once familiar with the hardware and software, the system designer can then apply the microcontroller to the problems at hand. A natural question during this process is "What do I do with all this stuff?" Similar to attempting to write a poem in a foreign language before you have a vocabulary and rules of grammar, writing meaningful programs is not possible until you have become ac­quainted with both the hardware and the software of a computer. This chapter provides a broad overview of the architecture of the 8051 . In ...

SUMMARY of MPU memory and I/O

Image
SUMMARY In this chapter, we examined the requirements of the Microprocessor Unit (MPU) to communicate with memory and I/O devices and to process binary data. Based on those requirements, we designed a generalized model of the M PU. We discussed memory in terms of its storage elements, namely, latches and registers and techniques of assigning addresses. The steps required for the MPU to communicate with memory and I/Os were briefly described. The impor­tant concepts are summarized as follows. · The MPU performs four primary operations: Memory Read, Memory Write, I/O Read, and I/O Write. · To communicate with memory and I/Os, the MPU needs three types of buses: the unidirectional address bus to send memory and I/O addresses, the bidirec­tional data bus to transfer data, and control signals to enable the devices. · The MPU should have signal lines to accept and to acknowledge external re­quests. These requests are Reset (go back to beginning), interrupt ( stop the ongoing proces...

EXAMPLE OF A MICROPROCESSOR-BASED SYSTEM

Image
EXAMPLE OF A MICROPROCESSOR-BASED SYSTEM In the last three sections, we discussed a generalized MPU model. prime memory and its organization model. and I/Os. The discussion can be summarized in the block diagram of a microprocessor-based system as shown in Figure 14. It in­cludes a generalized MPU, two types of prime memory. and two I/O devices. All address lines are used to address memory. and only the low-order ad­dress bus is used to identify I/O devices, indicating that they are connected as peripheral-mapped I/O (the details of Chip Select decoding are omitted here). The MICROPROCESSOR-BASED SYSTEM: MPU, MEMORY, AND I/O data bus is bidirectional and common to all devices. The four control signals gen­erated by the MPU are connected to different peripheral!" as shown in Figure 2.14. HOW DOES THE SYSTEM WORK? Let us assume that a simple program with three instructions is already written and stored in binary in R/W memory. Those instructions are 1. Read on/off swit...

INPUT AND OUTPUT (1/0) DEVICES

INPUT AND OUTPUT (1/0) DEVICES Input/Output devices are the means through which the MPU communicates with "the outside world." The MPU accepts binary data as input from devices such as keyboards and analog-to-digital (A/D) converters and sends data to output devices such as LEDs or printers. There are two different methods b which an MPU can identify I/O devices :one uses an 8-bit address and the other a 16- bit address These methods are described briefly in the following sections. I/Os with 8-Bit Addresses (Peripheral-Mapped I/O) In this type of I/O, the MPU uses eight address lines to identify an input or an output device; this is also known as peripheral-mapped I/O .The eight address lines can have 256 (28 combinations) a dresses ;thus the MPU can identify 256 input devices and 256 output devices with addresses ranging from 00 H to FF H · The input and output devices are differentiated by the control signals I/O Read for input devices and I/O Write for output device...

Memory Classification

Image
Memory Classification Memory can be classified into two groups: prime(or main) memory and storage memory .The RIWM and ROM discussed in the last section are examples of prime memory; this is the memory the microcomputer uses in executing and storing programs. This memory should be able to respond fast enough to keep up with the execution speed of the microprocessor. Therefore. it should be random-access memory, meaning that the microprocessor should be able to access information from any register with the same speed (independent of its place in the chip). Storage memory includes examples such as magnetic disks and tapes (see Figure 13). This memory is used to store programs and results after the comple­tion of program execution. Information stored in' these memories is nonvolatile, meaning information remains intact even if the system is turned off. Generally, these memory devices are not a part of any system; they are made part of the system only when stored programs need to b...