
vii
38K2 Group User’s Manual
List of figures
Fig. 148 CPU rewrite mode set/release flowchart ............................................................... 1-103
Fig. 149 Program flowchart ..................................................................................................... 1-105
Fig. 150 Erase flowchart ......................................................................................................... 1-106
Fig. 151 Full status check flowchart and remedial procedure for errors ......................... 1-108
Fig. 152 Structure of ROM code protect control register ................................................... 1-109
Fig. 153 ID code store addresses ......................................................................................... 1-110
Fig. 154 Pin connection diagram in standard serial I/O mode (1) .................................... 1-114
Fig. 155 Timing for page read ................................................................................................ 1-116
Fig. 156 Timing for reading status register .......................................................................... 1-116
Fig. 157 Timing for clear status register ............................................................................... 1-117
Fig. 158 Timing for page program ......................................................................................... 1-117
Fig. 159 Timing for erase all blocks ...................................................................................... 1-118
Fig. 160 Timing for download ................................................................................................. 1-119
Fig. 161 Timing for version information output .................................................................... 1-120
Fig. 162 Timing for Boot ROM area output .......................................................................... 1-120
Fig. 163 Timing for ID check .................................................................................................. 1-121
Fig. 164 ID code storage addresses ..................................................................................... 1-121
Fig. 165 Full status check flowchart and remedial procedure for errors ......................... 1-124
Fig. 166 Example circuit application for standard serial I/O mode ................................... 1-125
Fig. 167 Definition of A-D conversion accuracy ................................................................... 1-127
Fig. 168 A-D conversion equivalent circuit ........................................................................... 1-130
Fig. 169 A-D conversion timing chart .................................................................................... 1-130
CHAPTER 2 APPLICATION
Fig. 2.1.1 Memory map of registers related to I/O port ........................................................... 2-2
Fig. 2.1.2 Structure of Port Pi (i = 0 to 6) ................................................................................. 2-3
Fig. 2.1.3 Structure of Port Pi direction register (i = 0 to 6) .................................................. 2-3
Fig. 2.1.4 Structure of Port P0 pull-up control register ............................................................ 2-4
Fig. 2.1.5 Structure of Port P5 pull-up control register ............................................................ 2-4
Fig. 2.2.1 Memory map of registers related to interrupt .......................................................... 2-8
Fig. 2.2.2 Structure of Interrupt request register 1 ................................................................... 2-8
Fig. 2.2.3 Structure of Interrupt request register 2 ................................................................... 2-9
Fig. 2.2.4 Structure of Interrupt control register 1 .................................................................... 2-9
Fig. 2.2.5 Structure of Interrupt control register 2 .................................................................. 2-10
Fig. 2.2.6 Structure of Interrupt edge selection register ........................................................ 2-10
Fig. 2.2.7 Interrupt operation diagram ....................................................................................... 2-12
Fig. 2.2.8 Changes of stack pointer and program counter upon acceptance of interrupt request
..................................................................................................................................... 2-13
Fig. 2.2.9 Time up to execution of interrupt processing routine ........................................... 2-14
Fig. 2.2.10 Timing chart after acceptance of interrupt request ........................................... 2-14
Fig. 2.2.11 Interrupt control diagram ......................................................................................... 2-15
Fig. 2.2.12 Example of multiple interrupts ................................................................................ 2-17
Fig. 2.2.13 Connection example and port P0 block diagram when using key input interrupt .
................................................................................................................................... 2-19
Fig. 2.2.14 Registers setting related to key input interrupt (corresponding to Figure 2.2.13) .
................................................................................................................................... 2-20
Fig. 2.2.15 Sequence of changing relevant register ............................................................... 2-21
Fig. 2.2.16 Sequence of check of interrupt request bit .......................................................... 2-22
Fig. 2.3.1 Memory map of registers related to timers ............................................................ 2-23
Fig. 2.3.2 Structure of Prescaler 12, Prescaler X ................................................................... 2-23
Fig. 2.3.3 Structure of Timer 1 .................................................................................................. 2-24
Fig. 2.3.4 Structure of Timer 2, Timer X .................................................................................. 2-24