Page 69 - DCAP210_INTRODUCTION__TO_MICROPROCESSORS
P. 69
Unit 4: Microprocessor Architecture
Each one of them has a different role. Program Memory and Data Memory are two memories Notes
that are needed to build a program, and Data EEPROM is used to save data after the microcontroller
is turned off.
Program Memory and Data EEPROM are non-volatile memories, which store the information
even after the power is turned off. These memories called Flash or EEPROM. In contrast, Data
Memory does not save the information because it needs power in order to maintain the information
stored in the chip.
4.4.2 Memory and Addressing
There are several different types of memory in a micro. One is Program memory. This is where
the program is located. Another is Data memory. This is where data that might be used by the
program is located. The neat (or strange) thing is that they both reside in the same memory space
and can be altered by the program. That is right; a program can actually alter itself if that was
necessary. Two terms are used when talking about memory: Reading (load) is getting a value
from memory and writing (store) is putting a value into memory.
There are three buses associated with the memory subsystem. One is the address bus, the second
is the data bus, and the third is the control bus. It’s important for you to know exactly how all this
works, because these buses transport data and addresses everywhere. All three are connected to
the memory subsystem. It’s also good to know the function of each to better understand what’s
happening. In the 8085 CPU, the address bus is 16 bits wide. It acts to select one of the unique 216
(64K) memory locations. The control bus determines whether this will be a read or a write. In the
case of an instruction fetch, the control bus is set up for a read operation. Data is read or written
through the data bus, which is 8 bits wide. This is why all registers and memory are 8 bits wide,
it’s the width of the data bus on the 8085 CPU. A bus is just a group of connections that all share
a common function. Instead of speaking of each bit or connection in the address separately, for
example, all 16 are taken together and referred to simply as the address bus. The same is true for
the control and data buses.
A byte is the most used number in a micro because each memory location or register is one byte
wide. Memory has to be thought of as a sort of file cabinet with each location in it being a folder
in the cabinet. In a file cabinet, you go through the tabs on the folders until you find the right one.
To get to each memory location, a different method is used. Instead, a unique address is assigned
to each location. In most micros this address is a word or 16 bits, or 4-digit hex. This allows for a
maximum of 65536 (216 or 64K) unique addresses or memory locations that can be accessed.
These addresses are usually referred to by a 4-digit hex number. Memory usually starts at address
0000h and could go up to FFFFh (216 or 64K or 65536 in total). To access these locations, a 16-bit
address is presented to memory and the byte at that location is either read or written.
Small Cabbage Processor
his small business case study prepares, ferments, and packages sauerkraut. Their busiest
time is August-November, when they employ seasonal workers (many who do not
Tspeak English). The process starts with the cleaning, coring, and shredding of raw
cabbage. The outer leaves are peeled off by hand as the cabbage passes on a conveyor. The
equipment in this room is noisy when running; employees wear earplugs and gloves. The
fermentation processes occurs in large, two-storey tanks. Workers enter the tanks to load the
sauerkraut into a vacuum hose, which carries it to the packaging lines. They wear harnesses
hooked to overhead safety lines while performing this work. A confined-space entry permit
program is followed. All employees are required to wear safety glasses, earplugs, bump caps,
and hairnets. On the packaging floor, there are lines that run metal and glass containers.
Contd...
LOVELY PROFESSIONAL UNIVERSITY 63