![](http://datasheet.mmic.net.cn/Renesas-Electronics-America/UPD78F1146AF1-AN1-A_datasheet_99855/UPD78F1146AF1-AN1-A_17.png)
User’s Manual U17854EJ9V0UD
15
22.4 Setting of Option Byte ............................................................................................................. 659
CHAPTER 23 FLASH MEMORY.......................................................................................................... 660
23.1 Writing with Flash Memory Programmer............................................................................... 660
23.2 Programming Environment..................................................................................................... 663
23.3 Communication Mode.............................................................................................................. 663
23.4 Connection of Pins on Board.................................................................................................. 664
23.4.1 FLMD0 pin ....................................................................................................................................664
23.4.2 TOOL0 pin ....................................................................................................................................665
23.4.3 RESET pin ....................................................................................................................................665
23.4.4 Port pins........................................................................................................................................666
23.4.5 REGC pin......................................................................................................................................666
23.4.6 X1 and X2 pins..............................................................................................................................666
23.4.7 Power supply ................................................................................................................................666
23.5 Registers that Control Flash Memory .................................................................................... 666
23.6 Programming Method .............................................................................................................. 667
23.6.1 Controlling flash memory ..............................................................................................................667
23.6.2 Flash memory programming mode ...............................................................................................667
23.6.3 Selecting communication mode ....................................................................................................668
23.6.4 Communication commands...........................................................................................................668
23.7 Security Settings ...................................................................................................................... 670
23.8 Processing Time of Each Command When Using PG-FP4 or PG-FP5
(Reference Values).................................................................................................................. 672
23.9 Flash Memory Programming by Self-Programming ............................................................. 673
23.9.1 Boot swap function........................................................................................................................675
23.9.2 Flash shield window function ........................................................................................................677
CHAPTER 24 ON-CHIP DEBUG FUNCTION ..................................................................................... 678
24.1 Connecting QB-MINI2 to 78K0R/KE3 ..................................................................................... 678
24.2 On-Chip Debug Security ID ..................................................................................................... 679
24.3 Securing of user resources..................................................................................................... 679
CHAPTER 25 BCD CORRECTION CIRCUIT ..................................................................................... 681
25.1 BCD Correction Circuit Function............................................................................................ 681
25.2 Registers Used by BCD Correction Circuit ........................................................................... 681
25.3 BCD Correction Circuit Operation.......................................................................................... 682
CHAPTER 26 INSTRUCTION SET ....................................................................................................... 684
26.1 Conventions Used in Operation List ...................................................................................... 685
26.1.1 Operand identifiers and specification methods .............................................................................685
26.1.2 Description of operation column....................................................................................................686
26.1.3 Description of flag operation column .............................................................................................687
26.1.4 PREFIX Instruction .......................................................................................................................687
26.2 Operation List ........................................................................................................................... 688