Page 68 - DCAP210_INTRODUCTION__TO_MICROPROCESSORS
P. 68
Introduction to Microprocessors
Notes
ROM cannot be used as stack because it is not possible to write to ROM.
By the way, nearly all computers contain some amount of ROM (it is possible to create a simple
computer that contains no RAM; many microcontrollers do this by placing a handful of RAM
bytes on the processor chip itself but generally impossible to create one that contains no ROM).
On a PC, the ROM is called the BIOS (Basic Input/output System). When the microprocessor
starts, it begins executing instructions it finds in the BIOS. The BIOS instructions do things like
test the hardware in the machine, and then it goes to the hard disk to fetch the boot sector (How
Hard Disks Work—for details). This boot sector is another small program, and the BIOS store it
in RAM after reading it off the disk. The microprocessor then begins executing the boot sector’s
instructions from RAM. The boot sector program will tell the microprocessor to fetch something
else from the hard disk into RAM, which the microprocessor then executes, and so on. This is
how the microprocessor loads and executes the entire operating system.
RAM chip addresses size is 7 bit and ROM chip addresses size is 8 bit.
Figure 4.4: RAM Chip
4.4.1 Actions of the Memory Unit
• Program Memory: A memory that contains the program (which we had written), after we’ve
burned it. As a reminder, Program Counter executes commands stored in the program
memory, one after the other.
• Data Memory: This is RAM memory type, which contains a special registers like SFR (Special
Faction Register) and GPR (General Purpose Register). The variables that we store in the Data
Memory during the program are deleted after we turn off the micro.
These two memories have separated data buses, which makes the access to each one of them
very easy.
• Data EEPROM (Electrically Erasable Programmable Read-Only Memory): A memory that
allows storing the variables as a result of burning the written program.
Cache memory is a small high-speed memory. It is used for temporary storage
of data and information between the main memory and the CPU. The cache
memory is only in RAM.
62 LOVELY PROFESSIONAL UNIVERSITY