20.07.2015 Views

M16C/62 Group DATASHEET

M16C/62 Group DATASHEET

M16C/62 Group DATASHEET

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CPU Rewrite Mode (Flash Memory Version)Mitsubishi microcomputers<strong>M16C</strong> / <strong>62</strong> <strong>Group</strong>SINGLE-CHIP 16-BIT CMOS MICROCOMPUTERSoftware CommandsTable 1.29.1 lists the software commands available with the <strong>M16C</strong>/<strong>62</strong> (flash memory version).After setting the CPU rewrite mode select bit to 1, write a software command to specify an erase orprogram operation. Note that when entering a software command, the upper byte (D8 to D15) is ignored.The content of each software command is explained below.Table 1.29.1. List of Software Commands (CPU Rewrite Mode)First bus cycle Second bus cycle Third bus cycleCommandDataDataDataMode Address Mode Address Mode Address(D0 to D7)(D0 to D7)(D0 to D7)Read arrayRead status registerClear status registerWriteWriteWriteX (Note 6)XXFF1670165016Read X SRD (Note 2)Page program (Note 3) Write X 4116 Write WA0(Note 3) WD0 (Note 3) Write WA1 WD1Block erase Write X 2016 Write BA (Note 4) D016Erase all unlock block Write X A716 Write X D016Lock bit program Write X 7716 Write BA D016Read lock bit status Write X 7116 Read BA D6 (Note 5)Note 1: When a software command is input, the high-order byte of data (D8 to D15) is ignored.Note 2: SRD = Status Register DataNote 3: WA = Write Address, WD = Write DataWA and WD must be set sequentially from 0016 to FE16 (byte address; however, an even address). The page size is256 bytes.Note 4: BA = Block Address (Enter the maximum address of each block that is an even address.)Note 5: D6 corresponds to the block lock status. Block not locked when D6 = 1, block locked when D6 = 0.Note 6: X denotes a given address in the user ROM area (that is an even address).Read Array Command (FF16)The read array mode is entered by writing the command code “FF16” in the first bus cycle. When aneven address to be read is input in one of the bus cycles that follow, the content of the specifiedaddress is read out at the data bus (D0–D15), 16 bits at a time.The read array mode is retained intact until another command is written.Read Status Register Command (7016)When the command code “7016” is written in the first bus cycle, the content of the status register isread out at the data bus (D0–D7) by a read in the second bus cycle.The status register is explained in the next section.Clear Status Register Command (5016)This command is used to clear the bits SR3 to 5 of the status register after they have been set. Thesebits indicate that operation has ended in an error. To use this command, write the command code“5016” in the first bus cycle.241

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!