Teach Yourself PIC Microcontrollers | www.electronicspk.com | 18
to find out its contents.
Memory components are exactly like that. Each memory address corresponds to one memory location. The
content of any location becomes known by its addressing. Memory consists
of all memory locations and
addressing is nothing but selecting one of them. This means that, on one hand it is necessary to select the
desired
memory location, on the other hand it is necessary to wait for the contents of that location. In
addition to read, memory also has to allow writing to these locations. There are several types of memory
within the microcontroller:
ROM memory (Read Only Memory)
ROM memory is used to permanently save program being executed. Clearly, the size of a program that can
be written depends on the size of this memory. Today’s microcontrollers commonly use 16-bit
addressing,
which means that they are able to address up to 64 Kb memory, i.e. 65535 locations. For the sake of
illustration, if you are the beginner, your program will rarely exceed
limit
of several hundreds instructions. There are several types of ROM.
Masked ROM. Microcontrollers containing this ROM are reserved for
the great manufacturers. Program is loaded into the chip by the
manufacturer. In case
of large scale manufacture, the price is very low.
Forget it...
OTP ROM (One Time Programmable ROM). If the microcontroller
contains this memory, you can download
a program into the chip, but the
process of program downloading is “one-way ticket”, meaning that it can
be done only once. If you after downloading detect some error in a
program, the only thing you can do is to correct
it and download that
program to another chip.
Chia sẻ với bạn bè của bạn: