`
`CONTROL SYSTEMS
`
`memory controller, thus allowing code to be executed from it. Code RAM is especially useful
`for end—ol'—line testing during ECU manufacturing by allowing test code to be downloaded via
`the serial port peripheral.
`
`ROM. Read—only memory (ROM), as the name implies. is memory that can be read but not
`written to. ROM is used for storage of user code or data that does not change since it is a non-
`volatile memory that retains its contents after power is removed. Code or data is either
`entered during the nianutacturing process (masked ROM. or MROM) or by later program-
`ming (programmable ROM, or PROM); either way, once entered it is unalterable.
`A ROM cell by itself (Fig. 11.21) is nothing more than a transistor. ROM cells must be used
`in a matrix of word and bit lines (as shown in Fig. 11.22) in order to store information. The
`word lines are connected to the address decoder and the bit lines are connected to output
`huffers.'l'he user‘s code is permanently stored by including or omitting individual cells at word
`anc bit line junctions within the ROM array. For MROMs, this is done during wafer fabrica-
`tion. l-'or PROMs, this is done by blowing a fuse in the source/drain connection of each cell. To
`read an address within the array. the address decoder applies the address to the memory
`nia rix. For any given intersection of a word and bit line, the absence of a cell transistor allows
`no current to flow and causes the transistor to be off. This indicates an unprogramined ROM
`cell, The presence of a complete cell conducts and is sensed as a logical
`indicating a pro-
`grammed cell.The stored data on the bit lines is then driven to the output buffers.
`\1ROMs are typically used for applications whose code is stable and in volume produc-
`tion. After the development process is complete and the user's program has been verified. the
`user submits the ROM code to the microcontroller manufacturer.The microcontroller manu-
`fac urer then produces a mask that is used during manufacturing to permanently embed the
`program within the microcontroller. This mask layer either enables or disables individual
`ROM cells at the junctions of the word and bit lines. An advantage of MROM microcon-
`tro.lers is that they come with user code embedded. which saves time and money since post-
`production programming is not necessary. A disadvantage of MROM devices is that, since the
`mask with the user code has to be supplied early in the manufacturing process. throughput
`time (TPT) is longer.
`Some versions of ROM (such as lntel’s Quick-ROM) are actually not ROMS, but rather
`EPROMs. which are programmed at
`the factory. These devices are packaged in plastic
`devices, which prevents them from being erased since ultraviolet light cannot be applied to
`the actual EPROM array. Throughput time for QROMs is faster since the user code isn't
`required until after the actual manufacturing of the microcontroller is complete. As with
`
`EIet:t:1na.l_Sunb9l
`
`DRAIN
`
`ma
`
`SOURCE
`
`Page 000006
`
`nlanmm
`
`(GATE
`
`GATE OX]DE
`
`
`
`(301-‘RC3
`
`mam”)
`
`P SUBSTRATE
`
`FIGURE 11.21 ROM memory cell.
`
`
`
`AUTOMOTIVE MICROCONTROLLERS
`
`11.27
`
`WORD lines from address decoder
`
`0
`
`1
`
`2
`
`3
`
`buffers
`
`BITlinestooutput
`
`FIGURE 11.22 Simplified ROM memory matrix.
`
`MROMS, the user supplies the ROM code to the microcontroller manufacturer. Instead of
`creating a mask with the ROM code, the manufacturer programs it into the device just prior
`to final test.
`
`EPROM. EPROM devices are typically used during application development since this is
`when user code is changed often. EPROMS are delivered to the user unprogrammed. This
`allows the user to program the code into memory just prior to installation into an ECU mod-
`ule. Many EPROM microcontrollers actually provide a mechanism for in-module program-
`ming. This feature allows the user to program the device via the serial port while it is installed
`in the module. EPROM devices come assembled in packages either with or without a trans-
`parent window. Windowed devices are true EPROM devices that allow the user to erase the
`memory contents by exposing the EPROM array to ultraviolet light. These devices may be
`reprogrammed over and over again and thus are ideally suited for system development and
`debug during which code is changed often. EPROM devices assembled in a package without a
`window are commonly referred to as one-time programmable devices or OTPs. OTPs may only
`be programmed once, since the absence of a transparent window prevents UV erasure. OTPs
`are suited for limited production validation (PV) builds in which the code will not be erased.
`A typical EPROM cell is shown in Fig. 11.23. It is basically an N-channel transistor that has
`an added polyl floating gate to store charge. This floating gate is not connected and is sur-
`rounded by insulating oxide that prevents electron flow. The mechanism used to program an
`EPROM cell is known as hot electron injection. Hot electron injection occurs when very high
`drain (9-V) and select gate (12-V) voltages are applied.This gives the negatively charged elec-
`trons enough energy to surmount the oxide barrier and allows them to be stored on the gate.
`
`Page 000007
`
`
`
`11.28
`
`CONTROL SYSTEMS
`
`This has the same effect as a negative applied gate voltage and turns the transistor off. When
`the cell is unprogrammed, it can be turned on like a normal transistor by applying 5 V to the
`poly2 select gate.When it is programmed. the 5 V will not turn on the eell.The state of the cell
`is determined by attempting to turn on the cell and detecting if it turns on. Erasure is per-
`formed through the application of ultraviolet (1; V) light, which gives just the right amount of
`energy necessary for negatively charged electrons to surmount the oxide barrier and leave the
`floating gate.
`
`Dharam
`
`(GATE)
`
` . GATE OXIDE
`(DRAIN)
`
`l
`
`P SUBSTRATE
`
`TN DIFF.
`(sounca
`
`FIGURE 11.23 EPROM memory cell.
`
`EledmflLS¥II1bnl
`
`DRAIN
`
`‘
`GATE T‘ t,+l
`J
`
`PolytFIodrgGdI
`
`SOURCE
`
`Flash memory is the newest nonvolatile memory technology and is very similar to
`Flash.
`EPROM. The key difference is that flash memory can be electrically erased. Once programmed,
`flash memory contents remain intact until an erase cycle is initiated via software. Like EEPROM.
`flash memory requires a programming and erase voltage of approximately l2.0 V. Since a clean.
`regulated l2-V reference is not readily available in automotive environments, this need is often
`provided for through the incorporation of an on-chip charge pump. The charge pump produces
`the voltage and current necessary for programming and erasure from the standard 5-V supply
`voltage. The advantage of flash is ir1 its capability to be programmed and erased in-module with-
`out having to be removed. ln—module reprogrammability is desirable since in-vehicle validation
`testing doesn't always allow for easy access to the mieroeontroller. Flash also allows for last-
`minute code changes, data table upgrades, and general code customization during ECU assem-
`bly. Since a flash cell is nearly identical in size to that of an EPROM cell, the high reliability and
`high device density capable with EPROM is retained.The main disadvantage of flash is the need
`for an on-chip charge pump and special program and erase circuitry. which adds cost.
`A flash memory cell is essentially the same as an EPROM cell, with the exception of the
`floating gate. The difference is a thin oxide layer which allows the cell to be electrically erased.
`The mechanism used to erase data is known as F0wler—N0rdI1eim Iminelirtg. which allows the
`charge to be transferred from the floating gate when a large enough field is created. 1-lot elec-
`tron injection is the mechanism used to program a cell, exactly as is done with EPROM cells.
`When the floating gate is positively charged, the cell will read a “*1”. when negatively charged,
`the cell will read a “O”.
`
`EEPROM. EEPROM (electrically erasable and programmable ROM. commonly referred to
`as EEROM) is a ROM that can be electrically erased and programmed. Once programmed, EEP-
`ROM contents remain intact until an erase cycle is initiated via software. Like flash,programming
`and erase voltages of approximately 12 V are required. Since a clean. regulated l2-V reference is
`not readily available in automotive environments, this requirement is satisfied using an on-chip
`charge pump as is done for flash memory arrays. Like flash, the advantage of EEPROM is its
`
`Page 000008
`
`
`
`AU'l'().Vl(,)’l'lVl: MI(‘RO(‘O.\ITROLLERS
`
`11.29
`
`capability to be programmed and erased in-module.This allows the user to erase and program the
`device in the module without having to remove it. EEI-’ROM‘s most significant disadvantage is
`the need for an on-chip charge pump. Special program and erase circuitry also adds cost.
`An EEPROM cell is essentially the same as an EPROM cell with the exception of the
`floating gate being isolated by a thin oxide layer. The main difference from flash is that
`Fowler-Nordheim electron tunneling is used for both programming and erasure. This mecha-
`nism allows charge to be transferred to or from the floating gate (depending upon the polar-
`ity of the field) when a large enough field is created. When the floating gate is positively
`charged, the cell will read a “1”; when negatively charged, the cell will read a ‘‘0‘‘.
`
`11.2.2 Off-Chip Memory
`
`Off-chip memory offers the most flexibility to the system designer. but at a price; it takes up
`additional PCB real estate as well as additional I/O pins. In cost— and si7.e—conscience applica-
`tions, such as automotive ABS. system designers almost exclusively use on-chip memory.
`However, when memory requirements grow to sizes in excess ofwhat is offered on-chip (such
`as is common in electronic engine control), the system designer must implement an off-chip
`memory system. Off-chip memory is flexible because the user can implement various memory
`devices in the configuration of his choice. Most microeontrollers on the market today offer a
`wide variety of control pins and timing modes to allow the system designer flexibility when
`interfacing to a wide range of external memory systems.
`
`If circuit designers must use external memory in their appli-
`Accessing External Memory.
`cations, the type of external address/data bus incorporated onto the microcontroller should be
`considered. If external memory is not used, this will have, if any, impact upon the application.
`There are two basic types of interfaces used in external memory systems. Both of these are
`parallel interfaces in which bits of data are moved in a parallel fashion and are referred to as
`l7Zlllllpl€.¥J€£l
`and demultiplexed address/data buses.
`
`Multiplexed Address/Data Buses. As the name implies, multiplexed address/data buses
`allow the address as well as the data to be passed over the same microcontroller pins by mul-
`tiplexing the two in time. Figure 11.24 illustrates a typical multiplexed 16-bit address/data bus
`system as is implemented with Intel’s 8XCl%Kx family of mieroeontrollers.
`
`
`
`
`
`C?
`
`EPROM
`(Low)
`
`W‘
`
`LOW ADDRESS
`
`
`
`EPROM
`
`(High)
`
`LOW ADDRESS
`
`ll733°N HIGHADDRESS I HIGHADDRESS
`
`
`DATA
`
`.F_I
`
`
`
`ALE I ADV
`
`
`
`A007
`
`373
`
`8XCt96Kx
`
`
`
`FIGURE 11.24 Multiplexed address/data bus system.
`
`Page 000009