CHAPTER ONEINTRODUCTION 1.1 OVERVIEW
It is really dazzling how digital systems have taken up the world of electronics. Virtually all electronic appliances and devices today are microprocessor or microcomputer based. Digital systems have indeed displaced the analog options in most fields. To the layman, all credit would go to the microprocessors for these great performances. But, little do we know about the co-operation of the microprocessors and memory. The microprocessors work hand in hand with appropriate memory devices to carry out its function. The microprocessor is a very powerful digital device but is indeed useless without a memory. Thus the usefulness of the memory in the digital world cannot be overemphasized. Apart from the system bus, the two main components of a microprocessor based system are the microprocessor and the memory. A microprocessor basically gets instructions to execute from a memory device and also uses another for its working space that is, a temporary storage space. Microprocessor based system design involves the programming of the microprocessor to be used. Programming a microprocessor may sound like the process of loading instructions into a microprocessor, but in the real sense, a memory is programmed for the microprocessor. So, designers of microprocessor systems face the problem of burning their codes into a memory chip. This project involves the utilization of the some basic principle acquired during the course of study in this institution to solve the problem of memory programming for digital systems design. A major advantage of digital systems over analog systems is their ability to easily store large quantities of digital information and data for short or long periods. This memory capability is what makes digital systems so versatile and adaptable to many situations.
2 1.2 MEMORY HIERARCHY Simply put, the term memory hierarchy refers to the ranking, ordering or arrangement of the various groups of memories in terms of their order of importance, cost, size and even access time. Figure 1 below shows the order of memories on the basis of the determinants above.
Register Cache Prima ry memory S econda ry memory T ertiary Memory
Figure 1: Memory Hierarchy
As can be seen from the figure above, registers are at the highest level of the memory hierarchy and the tertiary memories at the lowest level. Generally, capacity and access time decreases as you go up the hierarchy. Cost and importance of the memory increases as the hierarchy goes up.
Registers Registers are at the top of this hierarchy. They are usually situated on the same silicon real estate as the microprocessor. Because of the size of the silicon real estate, the register memory is the smallest in terms of capacity. Registers could be as small as 8 bits in size. They serve as temporary storage devices for the microprocessor. These memories are extensively used when the microprocessor is carrying out arithmetic and logical operations. They have the advantage of being the fastest in terms of their access time.
3 1.2.2 Cache The Cache memory comes after the register in the hierarchy. The cache is a small semiconductor memory that could be situated on the microprocessor (Level 1 cache) or outside the microprocessor (Level 2 cache). This is exactly what cache memory does for you. Cache memory sits between the CPU and main memory. It is a small amount of very fast memory. Unlike normal memory, the bytes appearing within a cache do not have fixed addresses. Instead, cache memory can reassign the address of a data object. This allows the system to keep recently accessed values in the cache.
Primary Memory Next on the hierarchy is the primary memory. This comprises essentially semi-conductor memories. The semi-conductor memory is made of an array of registers that are uniquely addressable. These memories include the Read Only Memory (ROM) and the Random Access Memory (RAM). The ROM is a non-volatile memory. It has the ability to retain its content even after the source of power has been removed. This is the reason why ROM is specifically used in applications where the data is permanent or will not change frequently.
Secondary Memory The secondary memory is essentially made of the magnetic storage. The hard disk fall into this level in the hierarchy. This device devices access time is slow compared to the previous three but it has the advantage of having the largest capacity of them all. It is at present the main permanent storage medium for computers. Though magnetic media could come in the form of either magnetic tape or disks, for microcomputers, tape storage is somewhat inconvenient as it is a serial access medium with very little parallelism. Therefore disk storage is preferred in many, but not all applications.
Tertiary Memory This is last in the memory hierarchy. This implies that they are the slowest and the least expensive. This class is basically comprised of all removable storage devices like the Flash disk, floppy disk, CDs, DVDs and even the Blue Laser.
The place of the EPROM The EPROM belongs to the class of primary memory. This implies a relatively moderate speed, fair cost and size and that the memory is of good importance. The EPROM falls into the highest memory class that is disposed to the user or system designer for use or programming. So, it was justified spending a great deal of time and resources in the development of an EPROM programmer.
SYSTEM DESIGN OBJECTIVE In the early part of this chapter, the introduction to be specific, it was stated that one of the challenges faced by a digital system designer is the means of writing data onto a nonvolatile memory device. Bearing this in mind, we structured our objectives towards implementing and designing a system that could solve this problem. This design was carried out with the following objectives in mind.
(1) To design a circuit that meets the demands of the hardware requirements for the programming of the EPROM chip (The 27C64). (2) To demonstrate proficiency in computer interfacing by interfacing the circuit with the microcomputer such that they can communicate effectively. (3) To develop the software driver for this hardware circuit. The software is to act as an interface between the user (human) and the entire software and hardware system. (4) This software driver should have two basic functionalities. Primarily, the software driver should be able to write desired data to specified locations in the EPROM chip. (5) This software driver should have the capability to read data from specified locations or address range on the EPROM chip. (6) The software should be able to create data files where the contents read from the EPROM could be saved.
5 1.4 INTERFACING TECHNIQUES Peripheral devices are usually external to the computer systems internal bus. They are devices with no direct connection to the system bus. Printers, mice, video cameras, scanners, data/fax modems, plotters and lots of other peripheral devices exist. Unfortunately, their existence is beyond the confines of the desktop or server machine. We need a way to reach out to them. The process we undergo in order to reach out to them is called interfacing. In the computer world, a port is a set of signal lines that the microprocessor, or CPU, uses to exchange data with other components especially peripheral devices. Most computer ports are digital, where each signal, or bit, is either a 0 or a 1. A parallel port transfers multiple bits at once, while a serial port transfers a bit at a time. This is the basic difference between the serial port and the parallel port though the serial port can transfer data in both directions simultaneously. Interfacing external devices to the computer could be achieved either through the serial port, the parallel port or even the USB port of the computer.
The Serial Port is relatively harder to interface than the Parallel Port. Generally, serial transmission and reception of data involves and requires complex circuitry. Any device connected to the serial port will have its data converted to a serial form before transmission and then back to its parallel format after reception. This can be done using a Universal Asynchronous Receiver/Transmitter (UART). The Parallel Port is the most commonly used port for interfacing home made projects. This port will allow the input of up to 9 bits or the output of 12 bits at any one given time, thus requiring minimal external circuitry to implement many simpler tasks. The port is composed of 4 control lines, 5 status lines and 8 data lines. It's found commonly on the back of your PC as a D-Type 25 Pin female connector.
The parallel port of the computer is the option chosen for the interfacing of the EPROM programmer circuit to the computer system. This is due to some reasons such as its wide availability, its ease of interfacing and the timing of the project.
6 CHAPTER TWO FUNDAMENTAL CONCEPTS
THE CONCEPT OF MEMORY
In the digital sense, a memory is basically a group of registers capable of holding binary values for a given period of time and under specific conditions. In other words, a memory device is a storage device and is made up of a storage medium which could either be a magnetic, optical or a semiconductor medium. Magnetic media are generally capable of storing larger quantities of data than semiconductor memories, but the access time (time it takes to locate, then read or write data) is usually much more for magnetic devices. Optical media memories such as compact discs (CDs) and digital versatile discs (DVDs) uses crystal alloys to hold data and optical means (light rays) to read data from and write data onto the media. Semiconductor memories are at the higher l