11ETD (1086184), страница 12
Текст из файла (страница 12)
Addresses use bits [13:5] and bits [4:0] are don’t care. EXCOL can only be read in special modes and always returns zero in normal modes. EXCOL can be writtenin special modes only.EXROW — Select Extra Rows0 = User array selected1 = User array is disabled and two extra rows are available. Addresses use bits[7:0] and bits [13:8] are don’t care. EXROW can only be read in special modesand always returns zero in normal modes. EXROW can be written in specialmodes only.T[1:0] — EPROM Test Mode Select BitsT1T0Function Selected00Normal Mode01Reserved10Gate Stress11Drain StressThese bits allow selection of either gate stress or drain stress test modes.
They canbe read only in special modes and always read zero in normal modes. T[1:0] can onlybe written in special modes.PGM — EPROM Programming Voltage Enable0 = Programming voltage to EPROM array disconnected1 = Programming voltage to EPROM array connectedPGM can be read any time and can only be written when ELAT = 1.M68HC11 E SERIESTECHNICAL DATAOPERATING MODES AND ON-CHIP MEMORYMOTOROLA4-1944.4 EEPROMSome E-series devices contain 512 bytes of on-chip EEPROM. The MC68HC811E2contains 2048 bytes of EEPROM with selectable base address.4.4.1 EEPROM ProgrammingThe erased state of an EEPROM bit is one.
During a read operation, bit lines are precharged to one. The floating gate devices of programmed bits conduct and pull the bitlines to zero. Unprogrammed bits remain at the precharged level and are read asones. Programming a bit to one causes no change. Programming a bit to zero changesthe bit so that subsequent reads return zero.When appropriate bits in the BPROT register are cleared, the PPROG register controls programming and erasing the EEPROM. The PPROG register can be read orwritten at any time, but logic enforces defined programming and erasing sequences toprevent unintentional changes to EEPROM data.
When the EELAT bit in the PPROGregister is cleared, the EEPROM can be read as if it were a ROM.4The on-chip charge pump that generates the EEPROM programming voltage fromVDD uses MOS capacitors, which are relatively small in value. The efficiency of thischarge pump and its drive capability are affected by the level of VDD and the frequencyof the driving clock. The load depends on the number of bits being programmed orerased and capacitances in the EEPROM array.The clock source driving the charge pump is software selectable. When the clock select (CSEL) bit in the OPTION register is zero, the E clock is used; when CSEL is one,an on-chip resistor-capacitor (RC) oscillator is used.The EEPROM programming voltage power supply voltage to the EEPROM array is notenabled until there has been a write to PPROG with EELAT set and PGM cleared.
Thismust be followed by a write to a valid EEPROM location or to the CONFIG address,and then a write to PPROG with both the EELAT and EPGM bits set. Any attempt toset both EELAT and EPGM during the same write operation results in neither bit beingset.4.4.1.1 BPROT RegisterThis register prevents inadvertent writes to both the CONFIG register and EEPROM.The active bits in this register are initialized to one out of reset and can only be clearedduring the first 64 E-clock cycles after reset in the normal modes. When these bits arecleared, the associated EEPROM section and the CONFIG register can be programmed or erased. EEPROM is only visible if the EEON bit in the CONFIG registeris set.
The bits in the BPROT register can be written to one at any time to protect EEPROM and the CONFIG register. In test or bootstrap modes, write protection is inhibited and BPROT can be written repeatedly. Address ranges for protected areas ofEEPROM differ significantly for the MC68HC811E2. Refer to the following description.MOTOROLA4-20OPERATING MODES AND ON-CHIP MEMORYM68HC11 E SERIESTECHNICAL DATABPROT — Block ProtectRESET:Bit 7—0$10356—05—04PTCON13BPRT312BPRT211BPRT11Bit 0BPRT01Bits [7:5] — Not implementedAlways read zeroPTCON — Protect CONFIG Register0 = CONFIG register can be programmed or erased normally1 = CONFIG register cannot be programmed or erasedBPRT[3:0] — Block Protect Bits for EEPROMWhen set, these bits protect a block of EEPROM from being programmed or electronically erased.
Ultraviolet light, however, can erase the entire EEPROM contents regardless of BPRT[3:0] (windowed packages only). Refer to Table 4-7 and Table 4-8.When cleared, BPRT[3:0] allow programming and erasure of the associated block.Table 4-7 EEPROM Block ProtectBit NameBPRT0BPRT1BPRT2BPRT3Block Protected$B600 – $B61F$B620 – $B65F$B660 – $B6DF$B6E0 – $B7FFBlock Size32 Bytes64 Bytes128 Bytes288 BytesTable 4-8 EEPROM Block Protect (MC68HC811E2)Bit NameBPRT0BPRT1BPRT2BPRT3Block Protected$x800 – $x9FF*$xA00 – $xBFF*$xC00 – $xDFF*$xE00 – $xFFF*Block Size512 Bytes512 Bytes512 Bytes512 Bytes*x is determined by the value of EE[3:0] in CONFIG.
Refer to the CONFIG register description for MC68HC811E2.4.4.1.2 PPROG RegisterThe PPROG register selects and controls the EEPROM programming function. Bits inPPROG enable the programming voltage, control the latching of data to be programmed, and select the method of erasure (byte, row, etc.).PPROG — EPROM and EEPROM Programming ControlRESET:Bit 7ODD06EVEN05ELAT104BYTE03ROW0$103B2ERASE01EELAT0Bit 0EPGM0NOTES:1. MC68HC711E9 only.M68HC11 E SERIESTECHNICAL DATAOPERATING MODES AND ON-CHIP MEMORYMOTOROLA4-214ODD — Program Odd Rows in Half of EEPROM (Test)EVEN — Program Even Rows in Half of EEPROM (Test)ELAT — EPROM/OTPROM Latch ControlFor the MC68HC711E9, EPGM enables the high voltage necessary for both EPROM/OTPROM and EEPROM programming. For MC68HC711E9, ELAT and EELAT aremutually exclusive and cannot both equal one.0 = EPROM address and data bus configured for normal reads1 = EPROM address and data bus configured for programmingByte — Byte/Other EEPROM Erase ModeThis bit overrides the ROW bit.0 = Row or bulk erase1 = Erase only one byte4ROW — Row/All EEPROM Erase ModeIf BYTE is one, ROW has no meaning.0 = Bulk erase1 = Row eraseTable 4-9 EEPROM EraseBYTEROWAction00Bulk Erase (Entire array)01Row Erase (16 Bytes)10Byte Erase11Byte EraseERASE — Erase Mode Select0 = Normal read or program mode1 = Erase modeEELAT — EEPROM Latch Control0 = EEPROM address and data bus configured for normal reads and cannot beprogrammed1 = EEPROM address and data bus configured for programming or erasing andcannot be readEPGM — EPROM/OTPROM/EEPROM Programming Voltage Enable0 = Programming voltage to EEPROM array switched off1 = Programming voltage to EEPROM array switched onDuring EEPROM programming, the ROW and BYTE bits of PPROG are not used.
Ifthe frequency of the E clock is 1 MHz or less, set the CSEL bit in the OPTION register.Recall that zeros must be erased by a separate erase operation before programming.The following examples of how to program an EEPROM byte assume that the appropriate bits in BPROT are cleared.MOTOROLA4-22OPERATING MODES AND ON-CHIP MEMORYM68HC11 E SERIESTECHNICAL DATAPROGLDABSTABSTAA#$02$103B$XXXXLDABSTABJSRCLR#$03$103BDLY10$103BEELAT = 1Set EELAT bitStore data to EEPROM address (for valid EEPROMaddress see memory map for each device)EELAT = 1, EPGM = 1Turn on programming voltageDelay 10 msTurn off high voltage and set to READ mode4.4.1.3 EEPROM Bulk EraseThe following is an example of how to bulk erase the entire EEPROM. The CONFIGregister is not affected in this example.BULKELDABSTABSTAA#$06$103B$XXXXLDABSTABJSRCLR#$07$103BDLY10$103BEELAT = 1Set EELAT bitStore data to any EEPROM address (for valid EEPROMaddress see memory map for each device)EELAT = 1, EPGM = 1Turn on programming voltageDelay 10 msTurn off high voltage and set to READ mode4.4.1.4 EEPROM Row EraseThe following example shows how to perform a fast erase of large sections of EEPROM.ROWELDABSTABSTABLDABSTABJSRCLR#$0E$103B0,X#$0F$103BDLY10$103BROW = 1, ERASE = 1, EELAT = 1Set to ROW erase modeWrite any data to any address in ROWROW = 1, ERASE = 1, EELAT = 1, EPGM = 1Turn on high voltageDelay 10 msTurn off high voltage and set to READ mode4.4.1.5 EEPROM Byte EraseThe following is an example of how to erase a single byte of EEPROM.BYTEELDABSTABSTABLDABSTABJSRCLR#$16$103B0,X#$17$103BDLY10$103BBYTE = 1, ERASE = 1, EELAT = 1Set to BYTE erase modeWrite any data to address to be erasedBYTE = 1, ERASE = 1, EELAT = 1, EPGM = 1Turn on high voltageDelay 10 msTurn off high voltage and set to READ mode4.4.1.6 CONFIG Register ProgrammingBecause the CONFIG register is implemented with EEPROM cells, use EEPROM procedures to erase and program this register.
The procedure for programming is thesame as for programming a byte in the EEPROM array, except that the CONFIG register address is used. CONFIG can be programmed or erased (including byte erase)while the MCU is operating in any mode, provided that PTCON in BPROT is clear. Tochange the value in the CONFIG register, complete the following procedure.
Do notinitiate a reset until the procedure is complete.M68HC11 E SERIESTECHNICAL DATAOPERATING MODES AND ON-CHIP MEMORYMOTOROLA4-2341. Erase the CONFIG register.2. Program the new value to the CONFIG address.3. Initiate reset.4.4.2 EEPROM SecurityThe optional security feature, available only on ROM-based MCUs, protects the EEPROM and RAM contents from unauthorized access. A program, or a key portion of aprogram, can be protected against unauthorized duplication.
To accomplish this, theprotection mechanism restricts operation of protected devices to the single-chipmodes. This prevents the memory locations from being monitored externally becausesingle-chip modes do not allow visibility of the internal address and data buses. Resident programs, however, have unlimited access to the internal EEPROM and RAMand can read, write, or transfer the contents of these memories.4An enhanced security feature which protects EPROM contents, RAM, and EEPROMfrom unauthorized accesses is available in MC68S711E9. Refer to APPENDIX B MECHANICAL DATA AND ORDERING INFORMATION for the exact part number.MOTOROLA4-24OPERATING MODES AND ON-CHIP MEMORYM68HC11 E SERIESTECHNICAL DATASECTION 5 RESETS AND INTERRUPTSResets and interrupt operations load the program counter with a vector that points toa new location from which instructions are to be fetched. A reset immediately stopsexecution of the current instruction and forces the program counter to a known startingaddress.