Page 143 - Programming Microcontrollers in C
P. 143

128    Chapter 3  What Are Microcontrollers?

                              Packages that contain EPROM have a quartz glass window
                          through which the ultraviolet light can pass with minimum attenuation.
                          These packages are quite expensive, and therefore, microcontrollers
                          with EPROM are usually too expensive to use. EPROM was used for
                          development purposes in the past, but it is just too expensive in light
                          of more recent developments to be used for that purpose today.
                              For limited production purposes, a less expensive version of the
                          EPROM chip is available. This is the one time programmable (OTP)
                          chip. An OTP chip has the exact same silicon component as an
                          EPROM, but it is packaged in a standard plastic package. This package
                          is much less expensive than the windowed package discussed
                          previously. However, once the chip has been programmed, the
                          program contents cannot be changed.
                              There is yet another means of storing programs or, in some
                          instances, data in a microcontroller. This technique is called
                          electrically erasable programmable read-only memory (EEPROM).
                          EEPROM is programmable from instructions within the
                          microcontroller. EEPROM also requires a high programming voltage.
                          If there are large blocks of EEPROM on the chip, the programming
                          voltage is usually applied during the programming cycle through a
                          pin connected to an external voltage source. In cases where the amount
                          of EEPROM to be programmed is relatively small, a charge pump on
                          the microcontroller chip will allow the EEPROM to be programmed
                          with no externally applied voltage. The amount of EEPROM that
                          can be programmed with an on-board charge pump is usually so
                          small that it is not useful for storing program instructions. But on-
                          board EEPROM can be quite useful in the storage of data generated
                          by the program that must be saved through a power-down cycle.
                          Sometimes in the execution of the program, some data are generated
                          that must be saved for later use. These data are called volatile data or
                          variables, and are usually stored in random access memory (RAM).
                          Careful design of a program will usually result in the need for much
                          less RAM than ROM. In most microcontrollers, the amount of RAM
                          is usually 60 to at most a few hundred bytes. The amount of ROM,
                          EPROM or EEPROM usually runs from 1000 bytes upwards to a
                          few tens of thousands of bytes.
                              EEPROM is quite expensive, and has been replaced by a newer
                          technology called FLASH memory. FLASH programs in a manner
   138   139   140   141   142   143   144   145   146   147   148