Panasonic MN103001G/F01K manuel d'utilisation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466

Aller à la page of

Un bon manuel d’utilisation

Les règles imposent au revendeur l'obligation de fournir à l'acheteur, avec des marchandises, le manuel d’utilisation Panasonic MN103001G/F01K. Le manque du manuel d’utilisation ou les informations incorrectes fournies au consommateur sont à la base d'une plainte pour non-conformité du dispositif avec le contrat. Conformément à la loi, l’inclusion du manuel d’utilisation sous une forme autre que le papier est autorisée, ce qui est souvent utilisé récemment, en incluant la forme graphique ou électronique du manuel Panasonic MN103001G/F01K ou les vidéos d'instruction pour les utilisateurs. La condition est son caractère lisible et compréhensible.

Qu'est ce que le manuel d’utilisation?

Le mot vient du latin "Instructio", à savoir organiser. Ainsi, le manuel d’utilisation Panasonic MN103001G/F01K décrit les étapes de la procédure. Le but du manuel d’utilisation est d’instruire, de faciliter le démarrage, l'utilisation de l'équipement ou l'exécution des actions spécifiques. Le manuel d’utilisation est une collection d'informations sur l'objet/service, une indice.

Malheureusement, peu d'utilisateurs prennent le temps de lire le manuel d’utilisation, et un bon manuel permet non seulement d’apprendre à connaître un certain nombre de fonctionnalités supplémentaires du dispositif acheté, mais aussi éviter la majorité des défaillances.

Donc, ce qui devrait contenir le manuel parfait?

Tout d'abord, le manuel d’utilisation Panasonic MN103001G/F01K devrait contenir:
- informations sur les caractéristiques techniques du dispositif Panasonic MN103001G/F01K
- nom du fabricant et année de fabrication Panasonic MN103001G/F01K
- instructions d'utilisation, de réglage et d’entretien de l'équipement Panasonic MN103001G/F01K
- signes de sécurité et attestations confirmant la conformité avec les normes pertinentes

Pourquoi nous ne lisons pas les manuels d’utilisation?

Habituellement, cela est dû au manque de temps et de certitude quant à la fonctionnalité spécifique de l'équipement acheté. Malheureusement, la connexion et le démarrage Panasonic MN103001G/F01K ne suffisent pas. Le manuel d’utilisation contient un certain nombre de lignes directrices concernant les fonctionnalités spécifiques, la sécurité, les méthodes d'entretien (même les moyens qui doivent être utilisés), les défauts possibles Panasonic MN103001G/F01K et les moyens de résoudre des problèmes communs lors de l'utilisation. Enfin, le manuel contient les coordonnées du service Panasonic en l'absence de l'efficacité des solutions proposées. Actuellement, les manuels d’utilisation sous la forme d'animations intéressantes et de vidéos pédagogiques qui sont meilleurs que la brochure, sont très populaires. Ce type de manuel permet à l'utilisateur de voir toute la vidéo d'instruction sans sauter les spécifications et les descriptions techniques compliquées Panasonic MN103001G/F01K, comme c’est le cas pour la version papier.

Pourquoi lire le manuel d’utilisation?

Tout d'abord, il contient la réponse sur la structure, les possibilités du dispositif Panasonic MN103001G/F01K, l'utilisation de divers accessoires et une gamme d'informations pour profiter pleinement de toutes les fonctionnalités et commodités.

Après un achat réussi de l’équipement/dispositif, prenez un moment pour vous familiariser avec toutes les parties du manuel d'utilisation Panasonic MN103001G/F01K. À l'heure actuelle, ils sont soigneusement préparés et traduits pour qu'ils soient non seulement compréhensibles pour les utilisateurs, mais pour qu’ils remplissent leur fonction de base de l'information et d’aide.

Table des matières du manuel d’utilisation

  • Page 1

    MICROCOMPUTER MN1030 MN103001G/F01K LSI User ’ s Manual Pub.N o .23101-050E[...]

  • Page 2

    [...]

  • Page 3

    If you have any inquiries or questions about this book or our semiconductors, please contact one of our sales offices listed at the back of this book. (1) An export permit needs to be obtained from the competent authorities of the Japanese Government if any of the products or technologies described in this book and controlled under the "Foreig[...]

  • Page 4

    [...]

  • Page 5

    2. CPU 3. Extension Instruction Specifications 4. Memory Modes 5. Operating Mode 6. Clock Generator 7. Internal Memory 8. Bus Controller (BC) 9. Interrupt Controller 10. 8-bit Timers 11. 16-bit Timers 12. Watchdog Timer Table of Contents/List of Figures and Tables 1 0 3 5 4 7 6 9 8 10 11 12 2 13. Serial Interface 13 1. General Specifications[...]

  • Page 6

    [...]

  • Page 7

    14. A/D Converter 15. I/O Ports 16. Internal Flash Memory 17. Ordering Mask ROM Appendix 14 15 16 17[...]

  • Page 8

    [...]

  • Page 9

    Table of Contents/List of Figures and Tables 0[...]

  • Page 10

    ii Table of Contents 1. General Specifications 1.1 Overview .................................................................................................................... .... 1-2 1.2 Features .................................................................................................................... ...... 1-2 1.3 Block Diagram .....[...]

  • Page 11

    iii 5. Operating Mode 5.1 Overview .................................................................................................................... .... 5-2 5.2 Reset Mode .................................................................................................................. .. 5-3 5.3 Low Power Mode .................................[...]

  • Page 12

    iv 8.13.2 16-bit Bus with Handshaking, in Synchronous Mode and in Address/Data Separate Mode ...................................................................... 8-35 8.13.3 16-bit Bus in Asynchronous Mode and in Address/Data Separate Mode ............................................................................................ 8-37 8.13.4 8-b[...]

  • Page 13

    v 10.6 Description of Operation ............................................................................................ 10-20 10.6.1 Interval Timers and Timer Output ............................................................ 10-20 10.6.2 Event Counting ......................................................................................... [...]

  • Page 14

    vi 13.4.2 Block Diagram of UART Serial Interface ................................................ 13-37 13.4.3 Description of Registers for the UART Serial Interface ........................... 13-38 13.4.4 Description of Operation ........................................................................... 13-45 14. A/D Converter 14.1 Overview ....[...]

  • Page 15

    vii 15.9.3 Pin Configurations .................................................................................... 15-44 15.10 Port 8 .................................................................................................................... ...... 15-45 15.10.1 Block Diagram ................................................................[...]

  • Page 16

    viii List of Figures and Tables List of Figures 1. General Specifications Fig. 1-3-1 MN103001G Block Diagram .................................................................................... 1-4 Fig. 1-4-1 Pin Assignments Diagram ......................................................................................... 1-5 2. CPU Fig. 2-2-1 CPU C[...]

  • Page 17

    ix Fig. 8-7-1 Address Format When Accessing External Memory .............................................. 8-26 Fig. 8-7-2 Space Partitioning ................................................................................................... .8 - 2 7 Fig. 8-12-1 Internal I/O Space Access .............................................................[...]

  • Page 18

    x Fig. 8-13-21 Access Timing on a 16-bit Bus with Handshaking, in Synchronous Mode and in Address/Data Multiplex Mode (MCLK = SYSCLK multiplied by 2) ................ 8-49 Fig. 8-13-22 Access Timing on a 16-bit Bus with Handshaking, in Synchronous Mode and in Address/Data Multiplex Mode (MCLK = SYSCLK) ......................................... 8-50[...]

  • Page 19

    xi 10. 8-bit Timers Fig. 10-3-1 8-bit Timer Block Diagram (Timers 0 to 3) ............................................................ 10-3 Fig. 10-3-2 8-bit Timer Block Diagram (Timers 4 to B) ........................................................... 10-4 Fig. 10-3-3 8-bit Timer Connection Diagram (Overall) ......................................[...]

  • Page 20

    xii 12. Watchdog Timer Fig. 12-3-1 Block Diagram ....................................................................................................... . 12-3 Fig. 12-5-1 Operation Diagram 1: When Reset Is Released ...................................................... 12-7 Fig. 12-5-2 Operation Diagram 2: When Recovering from STOP Mode ..........[...]

  • Page 21

    xiii Fig. 14-5-2 External Trigger Input Conversion Example (for Channels 0 to 2, One Time Each) ..................................................................... 14-8 Fig. 14-5-3 External Trigger Input Conversion Example .......................................................... 14-9 Fig. 14-5-4 External Trigger Input Conversion Example (for Ch[...]

  • Page 22

    xiv 17. Ordering Mask ROM Fig. 17-2-1 ROM Ordering Method 1 ........................................................................................ 17-2 Fig. 17-2-2 ROM Ordering Method 2 ........................................................................................ 17-3 Appendix Fig. C-1 Memory Connection Example ........................[...]

  • Page 23

    xv List of Tables 1. General Specifications Table 1-4-1 Pin Assignments ..................................................................................................... ... 1-6 Table 1-4-2 Pin Function Table (1/2) ............................................................................................ 1-7 Table 1-4-2 Pin Function Table (2/[...]

  • Page 24

    xvi 10. 8-bit Timers Table 10-4-1 List of 8-bit Timer Functions .................................................................................. 10-9 Table 10-5-1 List of 8-bit Timer Registers (1/2) ........................................................................ 10-10 Table 10-5-1 List of 8-bit Timer Registers (2/2) .....................[...]

  • Page 25

    xvii Table 15-13-1Port B Configuration ............................................................................................. 1 5-60 Table 15-14-1Port C Configuration ............................................................................................. 1 5-63 Table 15-15-1Treatment of Unused Pins .....................................[...]

  • Page 26

    xviii[...]

  • Page 27

    1 0 1. General Specifications[...]

  • Page 28

    1-2 General Specifications 1.1 Overview The MN1030 Series is a 32-bit microcontroller that maintains the software assets of Matsushita Electronics' 16-bit MN102 Series of microcontrollers by offering ease of use and excellent cost-performance with a simple, high- performance architecture. Built around a compact 32-bit CPU core with a basic ins[...]

  • Page 29

    1-3 General Specifications High-speed/high-performance bus interface ■ Can select either separate address/data buses or multiplex address/data bus • Address: 24 bits/Data: 8/16 bits ■ External memory space can be partitioned into four blocks • Chip select signal output for each block • Blocks 2 to 3 can be switched between fixed wait inse[...]

  • Page 30

    1-4 General Specifications Clock and system controller A/D 10-bit 4 inputs SIF UART x 1 multipurpose x 1 synchronous system x 2 ROM 128 KB (flash memory 256 KB) Data RAM 8 KB 32-bit CPU core I/O ports 72 pins (all multipurpose) Timers 16-bit x 4 8-bit x 12 WDT x 1 Interrupt controller 38 sources Bus controller includes DRAM controller ■ Input por[...]

  • Page 31

    1-5 General Specifications Fig. 1-4-1 Pin Assignments Diagram * "VDD2" in the case of the MN103001G, "VPP" in the case of the MN1030F01K. 1.4 Pin Description 1.4.1 Pin Assignments The pin assignments are shown in Fig. 1-4-1 and Table 1-4-1. 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 50 49 48 47 4[...]

  • Page 32

    1-6 General Specifications Table 1-4-1 Pin Assignments • Pins for which two or more names are shown are multipurpose pins. * "VDD2" in the case of the MN103001G, "VPP" in the case of the MN1030F01K. Pin No. Pin Name Pin No. Pin Name Pin No. Pin Name Pin No. Pin Name 1 PC3/A19 26 PVSS 51 P73/A23/CS3 76 P30/BG 2 PC2/A18 27 PVDD [...]

  • Page 33

    1-7 General Specifications 1.4.2 Pin Functions Table 1-4-2 shows the function of each pin of this microcontroller. Table 1-4-2 Pin Function Table (1/2) Category Pin name Input/ Number Pin Function Output of pins Power supply VDD 8 Digital system power supply (+3.3 V) VSS 7 Digital system GND VDD2(VPP) 1 “ VDD2 ” in the case of the MN103001G, ?[...]

  • Page 34

    1-8 General Specifications Table 1-4-2 Pin Function Table (2/2) Category Pin name Input/ Number Pin Function Output of pins Reset RST I 1 Reset input Interrupts NMIRQ I 1 External non-maskable interrupt input IRQ7 to 0 I 8 External interrupt 7 to 0 inputs (multipurpose) Serial interface SBI3 to 0 I 4 Serial 3 to 0 data inputs (multipurpose) SBO3 to[...]

  • Page 35

    2. CPU 2[...]

  • Page 36

    2-2 CPU 2.1 Basic Specifications of CPU • Structure Load/store architecture Data/Address/SP Registers x 9 (Data registers: 32-bit x 4, Address registers: 32-bit x 4, SP: 32-bit x 1) Other Registers (PC: 32-bit x 1, PSW: 16-bit x 1, Multiply/divide register: 32-bit x 1, Branch target registers: 32-bit x 2) • Instructions Number of instructions :[...]

  • Page 37

    2-3 CPU 2.2 Block Diagram The block diagram for this microcontroller, focusing on the CPU, is shown below. Fig. 2-2-1 CPU Core Block Diagram Instruction queue Interrupt control block Operand address AU LU Barrel shifter AU Program counter block Instruction address Instruction execution control block Instruction decoder Operand data Instruction User[...]

  • Page 38

    2-4 CPU 31 D0 D1 D2 D3 0 31 A0 A1 A2 A3 0 31 SP 0 31 PC 0 31 MDR 0 15 PSW 0 31 LIR 0 31 LAR 0 Data Register Address Register Stack Pointer Program Counter Multiply/Divide Register Processor Status Word Loop Instruction Register Loop Address Register Fig. 2-3-1 CPU Registers 2.3 Programming Model 2.3.1 CPU Registers • The register set is divided i[...]

  • Page 39

    2-5 CPU 0 Z 15 0 0 S1 S0 IE IM2 IM1 0000 IM0 VC N Fig. 2-3-2 Processor Status Word ■ Data Register (32-bit x 4) This register can be used generally for all operations. Operations are performed with a 32-bit length and the data size is converted when sending data to and from the memory or by executing the EXTB or EXTH instructions. When loading da[...]

  • Page 40

    2-6 CPU Z: Zero Flag This flag is set when an operation result is all zeroes, and is cleared by any other result. This flag is also cleared by a reset. N: Negative Flag This flag is set if the MSB of an operation result is "1", and is cleared if the MSB is "0". This flag is also cleared by a reset. C: Carry Flag This flag is set[...]

  • Page 41

    2-7 CPU 2.3.2 Control Registers This microcontroller uses the memory-mapped-I/O method and allocates the peripheral circuit registers to the internal I/O space between addresses x'20000000 and x'3FFFFFFF. The registers listed below are described in this section. For details on other control registers, refer to the respective sections that[...]

  • Page 42

    2-8 CPU Interrupt Vector Register (IVARn) The interrupt vector register (IVAR0 to IVAR6) contains the lower 16 bits of the start address of the interrupt handler for interrupts of the level accepted by the CPU. IVAR0 corresponds to level 0 interrupts; in similar fashion, IVAR1 to IVAR6 correspond to levels 1 to 6, respectively. IVAR0 to IVAR6 are a[...]

  • Page 43

    2-9 CPU CPU Mode Register (CPUM) The CPU mode register (CPUM) sets the clock operating mode for the CPU and peripheral blocks. This register is allocated to the internal I/O space at address x'20000040. Bit No. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Bit name ——— —— — —— — — OSCID STOP HALT SLEEP OSC1 OSC0 Reset 000 00 0 00 0[...]

  • Page 44

    2-10 CPU Am/An 0 31 PC 0 31 0 31 0 31 (32-bit address) 0 31 (32-bit address) 0 31 (32-bit address) 0 31 (32-bit address) 0 31 Register direct Immediate value Dm / Dn Am / An imm8 / regs imm16 imm32 imm40 imm48 Register indirect (Am) / (An) Register indirect with displacement Absolute Register indirect with index (Di, Am)/(Di, An) Address calculatio[...]

  • Page 45

    2-11 CPU 2.4.2 Data Types Data types can be processed in the four types of bit, byte, halfword and word data. Byte data, halfword data and word data can be handled as signed and unsigned data. The sign bit is MSB. The data in the memory must be aligned data. In other words, the two bits on the LSB side of addresses containing word data must be &quo[...]

  • Page 46

    2-12 CPU 2.4.3 Instruction Set The instruction set has a simple organization, and features the generation of compact and optimized code through a C compiler. The instruction code size is reduced by making the basic instruction word length one byte. As a result, increases in the code size of the assembler program can be kept to a minimum even though[...]

  • Page 47

    2-13 CPU • Bit instructions BTST Bit Test BSET Test and set (processing unit: byte) BCLR Test and clear (processing unit: byte) • Shift instructions ASR Shift Right Arithmetic LSR Shift Right Logical ASL Shift Left Arithmetic ASL2 Shift Left 2-bit Arithmetic ROR Rotate 1 bit to the right ROL Rotate 1 bit to the left • Branch instructions Bcc [...]

  • Page 48

    2-14 CPU 2.5 Interrupts 2.5.1 Overview of Interrupts The most important key to real-time control is the ability to shift quickly to interrupt handler processing. If an interrupt is generated during the execution of an instruction that requires multiple cycles for execution (multiplication or division instructions, for example), interrupt response i[...]

  • Page 49

    2-15 CPU 0I D 15 0 1 4 1 3 1 2 1 1 1 0 9876543 21 000000 0000 0 0I D 15 0 1 4 1 3 1 2 1 1 1 0 9876543 21 LV IE IR G0ICR (NMICR) GnICR (n = 2 to 19) 2.5.2 Registers [Flags in the PSW] (CPU) Interrupt-related flags in the processor status word (PSW) include interrupt enable and interrupt mask level. IE (Interrupt Enable) R/W • This flag allows all [...]

  • Page 50

    2-16 CPU LV2 to LV0 (Interrupt Priority Level) R/W • This 3-bit field sets the interrupt priority level. When the interrupt priority level set in LV2 to LV0 is higher than the interrupt mask level set in IM2 to IM0 in the PSW (i.e., the value set in LV2 to LV0 is smaller than the value set in IM2 to IM0), interrupts in the corresponding interrupt[...]

  • Page 51

    2-17 CPU [Interrupt Accept Group Register (IAGR)] R halfword/byte access During a register read, the interrupt accept group register (IAGR) indicates the smallest group number of the groups that are generating an interrupt of the interrupt levels accepted by the CPU, which are indicated by IM2 to IM0 of the PSW. This register is allocated to addres[...]

  • Page 52

    2-18 CPU 2.5.3 Interrupt Types The three types of interrupts are listed below: [Reset interrupt] The reset interrupt is the interrupt with the highest priority level, and is generated by setting the RST pin to "L" level. As a result of the reset interrupt, the registers, etc., are initialized. When the RST pin goes to "H" level,[...]

  • Page 53

    2-19 CPU [Level interrupts] Level interrupts are interrupts for which the interrupt level can be controlled through the interrupt enable (IE) and interrupt mask (IM2 to IM0) bits in the PSW. Level interrupts are interrupts from the interrupt group controllers external to the CPU (in other words, peripheral interrupts). There are 18 groups, or 35 in[...]

  • Page 54

    2-20 CPU (Example of pre-processing by the interrupt handler) 1. The registers are saved. The saved registers are those used by the interrupt handler. 2. The interrupt group analysis is executed. 2.1 The interrupt acknowledge sequence is executed. Interrupt acknowledge consists of reading out the interrupt accept group register (IAGR) to obtain the[...]

  • Page 55

    2-21 CPU An even higher interrupt response speed can be realized by assigning only one factor or only a few factors to a single interrupt level. Fig. 2-5-6 shows the interrupt sequence flow when assigning one factor to each interrupt level. Fig. 2-5-6 Interrupt Sequence Flow [Nested Interrupts] When a level interrupt occurs, nested interrupts can b[...]

  • Page 56

    2-22 CPU [Stack Frame] When an interrupt is accepted, a stack frame is allocated and the total 6 bytes of information in the PC and PSW are saved in order to return from the interrupt. However, since the transfer of data across the 32-bit boundary is prohibited, the SP value must constantly be set to a multiple of 4. Accordingly, a stack frame is a[...]

  • Page 57

    3. Extension Instruction Specifications 3[...]

  • Page 58

    Extension Instruction Specifications 3-2 3.1 Operation Extension Function The MN1030 series 32-bit microcontrollers are provided with 32 extension instructions which can be defined by users. This allows the desired processing to be performed at high speed for each model expansion by assigning multiply, multiply-accumulate, saturation and other appl[...]

  • Page 59

    Extension Instruction Specifications 3-3 3.2 Extension Instructions 3.2.1 Explanation of Notations The notations used to describe instruction manual are shown below. OP: Opcode Am, An: Address Register (m, n = 3 to 0) Dm, Dn: Data Register (m, n = 3 to 0) SP: Stack Pointer imm: Immediate value (used as the general meaning) imm8: 8-bit immediate val[...]

  • Page 60

    Extension Instruction Specifications 3-4 Multiply Register Multiply & Accumulate Register (Higher) Multiply & Accumulate Register (Lower) Multiply & Accumulate Overflow Detect Flag Register Bit 0 MCVF Bit 31 Bit 0 Bit 31 Bit 0 Bit 31 Bit 0 MDRQ MCRH MCRL 3.2.2 Extension Block Register Set The extension block has the following dedicated [...]

  • Page 61

    Extension Instruction Specifications 3-5 3.2.3 Extension Instruction Details PUTX (Register transfer instruction for high-speed multiplication: Load) [Instruction Format (Macro Name)] PUTX Dm [Assembler Mnemonic] udf20 Dm, Dm [Operation] The contents of Dm are transferred to the high-speed multiply register MDRQ. [Flag Changes] Flag Change Conditio[...]

  • Page 62

    Extension Instruction Specifications 3-6 PUTCX (Register transfer instruction for multiply-and-accumulate operation: Load) [Instruction Format (Macro Name)] PUTCX Dm, Dn [Assembler Mnemonic] udf21 Dm, Dn [Operation] This instruction transfers the contents of Dm to the multiply-and-accumulate register MCRH. This instruction also transfers the conten[...]

  • Page 63

    Extension Instruction Specifications 3-7 GETX (Register transfer instruction for high-speed multiplication: Store) [Instruction Format (Macro Name)] GETX Dn [Assembler Mnemonic] udf15 Dn, Dn [Operation] The contents of the high-speed multiply register MDRQ are transferred to Dn. [Flag Changes] Flag Change Condition V 0 Always 0 C 0 Always 0 N + 1 w[...]

  • Page 64

    Extension Instruction Specifications 3-8 GETCHX (Register high-order 32-bit transfer instruction for multiply-and-accumulate operation: Store) [Instruction Format (Macro Name)] GETCHX Dn [Assembler Mnemonic] udf12 Dn, Dn [Operation] This instruction transfers the contents of the multiply-and-accumulate register MCRH to Dn. The content of the multip[...]

  • Page 65

    Extension Instruction Specifications 3-9 GETCLX (Register low-order 32-bit transfer instruction for multiply-and-accumulate operation: Store) [Instruction Format (Macro Name)] GETCLX Dn [Assembler Mnemonic] udf13 Dn, Dn [Operation] This instruction transfers the contents of the multiply-and-accumulate register MCRL to Dn. The contents of the multip[...]

  • Page 66

    Extension Instruction Specifications 3-10 CLRMAC (Register clear instruction for multiply-and-accumulate operation) [Instruction Format (Macro Name)] CLRMAC [Assembler Mnemonic] udf22 D0, D0 [Operation] This instruction clears the contents of the multiply-and-accumulate registers MCRH and MCRL. This instruction also clears the contents of the multi[...]

  • Page 67

    Extension Instruction Specifications 3-11 MULQ (Signed high-speed multiplication instruction: between registers) [Instruction Format (Macro Name)] MULQ Dm, Dn [Assembler Mnemonic] udf00 Dm, Dn [Operation] This instruction performs multiplication quickly using the multiplier of the extension function unit. The contents of Dm (signed 32-bit integer: [...]

  • Page 68

    Extension Instruction Specifications 3-12 MULQI (Signed high-speed multiplication instruction: between immediate value and register) [Instruction Format (Macro Name)] MULQI imm, Dn [Assembler Mnemonic] udf00 imm8, Dn :imm8 is sign-extended udf00 imm16, Dn :imm16 is sign-extended udf00 imm32, Dn [Operation] This instruction performs multiplication q[...]

  • Page 69

    Extension Instruction Specifications 3-13 MULQU (Unsigned high-speed multiplication instruction: between registers) [Instruction Format (Macro Name)] MULQU Dm, Dn [Assembler Mnemonic] udf01 Dm, Dn [Operation] This instruction performs multiplication quickly using the multiplier of the extension function unit. The contents of Dm (unsigned 32-bit int[...]

  • Page 70

    Extension Instruction Specifications 3-14 MULQIU (Unsigned high-speed multiplication instruction: between immediate value and register) [Instruction Format (Macro Name)] MULQIU imm, Dn [Assembler Mnemonic] udfu01 imm8, Dn :imm8 is zero-extended udfu01 imm16, Dn :imm16 is zero-extended udfu01 imm32, Dn [Operation] This instruction performs multiplic[...]

  • Page 71

    Extension Instruction Specifications 3-15 MAC (Signed multiply-and-accumulate operation instruction: between registers) [Instruction Format (Macro Name)] MAC Dm, Dn [Assembler Mnemonic] udf28 Dm, Dn [Operation] This instruction performs the multiply-and-accumulate operation using the multiplier and adder in the extension function unit. The instruct[...]

  • Page 72

    Extension Instruction Specifications 3-16 MACH (Signed half word data multiply-and-accumulate operation instruction: between registers) [Instruction Format (Macro Name)] MACH Dm, Dn [Assembler Mnemonic] udf30 Dm, Dn [Operation] This instruction performs the multiply-and-accumulate operation using the multiplier and adder in the extension function u[...]

  • Page 73

    Extension Instruction Specifications 3-17 MACB (Signed byte data multiply-and-accumulate operation instruction: between registers) [Instruction Format (Macro Name)] MACB Dm, Dn [Assembler Mnemonic] udf32 Dm, Dn [Operation] This instruction performs the multiply-and-accumulate operation using the multiplier and adder in the extension function unit. [...]

  • Page 74

    Extension Instruction Specifications 3-18 MACU (Unsigned multiply-and-accumulate operation instruction: between registers) [Instruction Format (Macro Name)] MACU Dm, Dn [Assembler Mnemonic] udf29 Dm, Dn [Operation] This instruction performs the multiply-and-accumulate operation using the multiplier and adder in the extension function unit. The inst[...]

  • Page 75

    Extension Instruction Specifications 3-19 MACHU (Unsigned half word data multiply-and-accumulate operation instruction: between registers) [Instruction Format (Macro Name)] MACHU Dm, Dn [Assembler Mnemonic] udf31 Dm, Dn [Operation] This instruction performs the multiply-and-accumulate operation using the multiplier and adder in the extension functi[...]

  • Page 76

    Extension Instruction Specifications 3-20 MACBU (Unsigned byte data multiply-and-accumulate operation instruction: between registers) [Instruction Format (Macro Name)] MACBU Dm, Dn [Assembler Mnemonic] udf33 Dm, Dn [Operation] This instruction performs the multiply-and-accumulate operation using the multiplier and adder in the extension function un[...]

  • Page 77

    Extension Instruction Specifications 3-21 SAT16 (16-bit saturation operation instruction) [Instruction Format (Macro Name)] SAT16 Dm, Dn [Assembler Mnemonic] udf04 Dm, Dn [Operation] When Dm is a 16-bit signed number which is the maximum positive value (0x00007fff) or more, the maximum positive value (0x00007fff) is written into Dn. When Dm is a 16[...]

  • Page 78

    Extension Instruction Specifications 3-22 SAT24 (24-bit saturation operation instruction) [Instruction Format (Macro Name)] SAT24 Dm, Dn [Assembler Mnemonic] udf05 Dm, Dn [Operation] When Dm is a 24-bit signed number which is the maximum positive value (0x007fffff) or more, the maximum positive value (0x007fffff) is written into Dn. When Dm is a 24[...]

  • Page 79

    Extension Instruction Specifications 3-23 MCST (Multiply-and-accumulate operation results 8-, 16-, 32-bit saturation operation instruction) [Instruction Format (Macro Name)] MCST Dm, Dn MCST imm8, Dn [Assembler Mnemonic] udf02 Dm, Dn udf02 imm8, Dn : Only 0x20, 0x10, and 0x08 are valid as values for imm8 [Operation] This instruction sets the conten[...]

  • Page 80

    Extension Instruction Specifications 3-24 [Flag Changes] When multiply-and-accumulate operation overflow was not detected (MCVF = 0) Flag Change Condition V 0 Indicates that the multiply-and-accumulate operation is valid. C 0 Always 0 N * Undefined Z * Undefined When multiply-and-accumulate operation overflow was detected (MCVF = 1) Flag Change Con[...]

  • Page 81

    Extension Instruction Specifications 3-25 MCST9 (Multiply-and-accumulate operation results 9-bit saturation operation instruction/positive value conversion instruction) [Instruction Format (Macro Name)] MCST9 Dn [Assembler Mnemonic] udf03 Dn, Dn [Operation] When the 32-bit result of the multiply-and-accumulate operation that is stored in the multip[...]

  • Page 82

    Extension Instruction Specifications 3-26 MCST48 (Multiply-and-accumulate operation results 48-bit saturation operation instruction) [Instruction Format (Macro Name)] MCST48 Dn [Assembler Mnemonic] udf06 Dn, Dn [Operation] When the 64-bit result of the multiply-and-accumulate operation that is stored in the multiply-and-accumulate registers MCRH an[...]

  • Page 83

    Extension Instruction Specifications 3-27 Bit 31 Bit 0 1 00 000 000 000 000 00 Dn before execution Dn after execution Search range Search direction MSB LSB BSCH (Bit search instruction) [Instruction Format (Macro Name)] BSCH Dm, Dn [Assembler Mnemonic] udf07 Dm, Dn [Operation] Bit search is performed within the bit string of the 32 bits contained i[...]

  • Page 84

    Extension Instruction Specifications 3-28 SWAP (Data swapping instruction that swaps bytes [high-order to low-order and vice versa] in four-byte data) [Instruction Format (Macro Name)] SWAP Dm, Dn [Assembler Mnemonic] udf08 Dm, Dn [Operation] This instruction swaps the positions of the high-order and low-order 8-bit bytes within the respective high[...]

  • Page 85

    Extension Instruction Specifications 3-29 [Flag Changes] Flag Change Condition V * Undefined C * Undefined N * Undefined Z * Undefined [Programming Cautions] PSW updating by flag changes is delayed by one instruction. However, Bcc and Lcc instructions can evaluate flags without waiting for flag reflection to PSW. The operations of "udf08 imm8,[...]

  • Page 86

    Extension Instruction Specifications 3-30 Bit 31 Bit 0 MSB LSB Dm before execution Dn after execution Dm[31:24] Dm[23:16] Dm[15:8] Dm[7:0] Bit 31 Bit 0 MSB LSB Dm[7:0] Dm[15:8] Dm[23:16] Dm[31:24] SWAPH (Data swapping instruction [high-order to low-order and vice versa] in two-byte data) [Instruction Format (Macro Name)] SWAPH Dm, Dn [Assembler Mne[...]

  • Page 87

    Extension Instruction Specifications 3-31 Multiply-and- accumulate instruction *3 MCRH, MCRL access instruction *4 MCRH, MCRL access instruction *4 Multiply-and- accumulate instruction *3 High-speed multiplication instruction * 5 Multiply-and- accumulate instruction *3 High-speed multiplication instruction *5 3.2.4 Programming Notes ■ Notes on in[...]

  • Page 88

    Extension Instruction Specifications 3-32 (a ) Note on the description of word/half-word data multiply-and-accumulate instructions and multiply-and- accumulate instructions When executing a word/half-word data multiply-and-accumulate instruction followed by a multiply-and-accumulate instruction, the result produced by the word/half-word data multip[...]

  • Page 89

    Extension Instruction Specifications 3-33 (b) Note on the description of word/half-word data multiply-and-accumulate instructions and MCRH, MCRL access instructions When executing a word/half-word data multiply-and-accumulate instruction followed by an MCRH, MCRL access instruction, the result produced by the word/half-word data multiply-and-accumu[...]

  • Page 90

    Extension Instruction Specifications 3-34 (c) Note on the description of byte data multiply-and-accumulate instructions and MCRH, MCRL access instructions When executing a byte data multiply-and-accumulate instruction followed by an MCRH, MCRL access instruction, the result produced by the byte data multiply-and-accumulate instruction is used in th[...]

  • Page 91

    Extension Instruction Specifications 3-35 (d) Note on the description of multiply-and-accumulate instructions and multiply-and-accumulate instructions or multiply-and-accumulate instructions and quick multiplication instructions When executing a multiply-and-accumulate instruction followed by another multiply-and-accumulate instruction or a quick m[...]

  • Page 92

    Extension Instruction Specifications 3-36 (e) Note on the description of memory access and multiply-and-accumulate instruction or high-speed multiplication instruction There is an error occasion - CPU hung-up - as written below, if High-speed multiplication instruction or Multiply- and-accumulate instruction is executed within 2 instructions after [...]

  • Page 93

    Extension Instruction Specifications 3-37 If a stack area is in the internal RAM, any error making potential condition shown on the following cases 4 to 12 is not generated. Memory access instruction accesses to the space other than internal RAM Lcc instruction High-speed multiplication instruction or Multiply-and-accumulate instruction The case wh[...]

  • Page 94

    Extension Instruction Specifications 3-38 <Error actualizing condition> Error actualizing condition is generated by the first extension instruction executed in the interrupt program, or after switching of the task. Error actualizing condition is shown below. The error making potential condition is cleared when there is no problem. When the co[...]

  • Page 95

    Extension Instruction Specifications 3-39 In addition, please obey the following recommended conditions of 3 points when a program is developed by the assembler so that this error would not occur. As for the program developed by the PanaXSeries C compiler, the following recommended conditions are guaranteed. 1. Please use RTI instruction on a retur[...]

  • Page 96

    Extension Instruction Specifications 3-40[...]

  • Page 97

    4. Memory Modes 3 4[...]

  • Page 98

    Memory Modes 4-2 4.1 Memory Mode Types and Selection This microcontroller has a 32-bit linear address space of up to 4 Gbytes. The address space is comprised of internal memory space built into the chip and external memory space located outside the chip. The internal memory space can be further divided into internal data space which allows high- sp[...]

  • Page 99

    Memory Modes 4-3 4.2 Memory Mode Pin Processing Fix the input levels for the memory mode pins (MMOD0,1) as shown in Table 4-2-1 and Fig. 4-2-1 with pull-up/ pull-down resistors. For details on the pull-up/pull-down resistance, refer to “High-speed Serial Control Card Operation Manual”. Table 4-2-1 Memory Mode Setting MMOD1 MMOD0 Memory mode L H[...]

  • Page 100

    Memory Modes 4-4 4.3 Description of Memory Mode 4.3.1 Memory Extension Mode The memory mode which comprises a system from both internal and external memory is called memory extension mode. This mode enables configuration of a system where the program and data make the best use of the high- speed performance of internal memory and the large capacity[...]

  • Page 101

    Memory Modes 4-5 4.3.2 Processor Mode The memory mode which executes externally located instructions while using the internal data RAM and I/O ports is called processor mode. The internal instruction ROM and the internal flash memory are not used for this mode. Processor mode has memory space of up to 3 GB from addresses x'00000000 to x'B[...]

  • Page 102

    Memory Modes 4-6[...]

  • Page 103

    5. Operating Mode 5[...]

  • Page 104

    Operating Mode 5-2 5.1 Overview The 32-bit microcontroller has the following three operating modes. Oscillator start/stop and CPU and peripheral circuit start/stop switching control functions are provided to support low power consumption. Operating modes 1. Reset mode (RESET) 2. Normal operation mode (NORMAL) 3. Low power mode Stop mode (STOP) Halt[...]

  • Page 105

    Operating Mode 5-3 5.2 Reset Mode • The mode in which the reset (RST) pin is active ( “ L ” level) is called “ Reset Mode ” . • When the reset pin is low, the chip is reset (initialized) internally. When the reset pin makes the transition to high, the oscillation stabilization wait time is started by an internal 18-bit (when CKSEL pin =[...]

  • Page 106

    Operating Mode 5-4 5.3 Low Power Mode Low power consumption is achieved by stopping the oscillation of the oscillators and the clock generator (CG) and stopping the clocks supplied to the CPU and peripheral circuits. Low power mode contains the following three modes and transitions to the three modes are made through software. Stop mode (STOP) In t[...]

  • Page 107

    6. Clock Generator 6 13[...]

  • Page 108

    Clock Generator 6-2 6.1 Overview The CG has an internal PLL circuit; in addition to supplying clock pulses to this microcontroller at a frequency that is a multiple of the oscillating frequency of the oscillator, the CG also supplies clock pulses with the same frequency as the oscillating frequency of the oscillator, or that frequency divided by 2,[...]

  • Page 109

    Clock Generator 6-3 6.4 Description of Operation 6.4.1 Input Frequency Setting The CG input frequency range is set by the external input pin CKSEL. When CKSEL is set “H”, use an oscillator or resonator with an input frequency fosci such that 8 MHz ≤ fosci ≤ 18 MHz. When CKSEL is set “L”, use an oscillator or resonator with an input freq[...]

  • Page 110

    Clock Generator 6-4 The relationship between the input frequency (fosci) and the SYSCLK, MCLK, and IOCLK multiples and frequencies is shown in Table 6-4-2, and the relationship between the input frequency (fosci) and the SYSCLK, MCLK, and IOCLK multiples and frequencies when reset is released is shown in Table 6-4-3. Table 6-4-2 Relationship betwee[...]

  • Page 111

    7. Internal Memory 7[...]

  • Page 112

    Internal Memory 7-2 7.1 Overview The MN103001G has 128 Kbytes of instruction ROM and 8 Kbytes of internal data RAM. The MN1030F01K has 256 Kbytes of flash memory and 8 Kbytes of internal data RAM. The instruction ROM/flash memory and data RAM are connected to the CPU core via a 64-bit bus and a 32-bit bus, respectively. 7.2 Features The features of[...]

  • Page 113

    Internal Memory 7-3 7.3 Internal Memory Configuration The internal instruction ROM is located in the internal memory space at address x'40000000 to x'4001FFFF, while the internal flash memory is located at address x'40000000 to x'4003FFFF and the internal data RAM is located at address x'00000000 to x'00001FFF. Each is[...]

  • Page 114

    Internal Memory 7-4[...]

  • Page 115

    8. Bus Controller (BC) 8[...]

  • Page 116

    Bus Controller (BC) 8-2 8.1 Overview The bus controller (BC) controls interfacing between the CPU core, internal I/O (peripherals), and devices external to the chip. The bus controller also handles arbitration between the internal and external buses. In addition, in an interface with devices external to the chip, it is possible to select whether ad[...]

  • Page 117

    Bus Controller (BC) 8-3 8.3 Bus Configuration Fig. 8-3-1 shows the bus configuration. The chip’s internal buses are the ROM bus between the CPU core and internal instruction ROM/internal flash memory, the RAM bus between the CPU core and internal data RAM, the BC bus between the CPU core and the bus controller, and the I/O bus between the bus con[...]

  • Page 118

    Bus Controller (BC) 8-4 Fig. 8-4-1 Block Diagram for the Bus Controller BC address bus BC data bus I/O address bus I/O data bus BC internal data bus BC bus interface signals I/O bus interface signals MEMCTRn DRAMCTR REFCNT External interface signals EX bus (external bus) 23 to 0 15 to 0 data input aligner data output aligner address controller addr[...]

  • Page 119

    Bus Controller (BC) 8-5 8.5 Pin Functions The external pin functions relating to the bus controller are shown in Table 8-5-1. Table 8-5-1 External Pin Functions Relating to the Bus Controller Pin name Input/output Number of pins Function OSCI Input 1 Oscillator input pin (when using PLL: 8 MHz to 18 MHz; when not using PLL: 8 MHz to 20 MHz) OSCO Ou[...]

  • Page 120

    Bus Controller (BC) 8-6 Table 8-5-2 shows the operating status of the external pins concerning BC. Table 8-5-2 Operating Status of Pins Concerning BC Operating status SLEEP mode STOP mode HALT mode When bus is relased Pin SYSCLK Operate L L Operate A23 to 0 Operate Maintain Maintain Hi-Z ADM15 to 0 Operate Hi-Z Hi-Z Hi-Z D15 to 0 Operate Hi-Z Hi-Z [...]

  • Page 121

    Bus Controller (BC) 8-7 8.6 Description of Registers Table 8-6-1 lists the bus controller registers. The settings of these registers are used in timing control, DRAM interface control, etc. Table 8-6-1 List of Bus Control Registers Address Name Symbol Nu m b e r Initial value Access size of bits x'32000020 Memory control register 0B MEMCTR0B 1[...]

  • Page 122

    Bus Controller (BC) 8-8 ~ ~ ~ ~ ~ ~ ~ ~ 8.6.1 Memory Block 0 Control Register Memory control register 0A/B is used to set the memory block 0 read/write timing and synchronous/asynchronous mode through software. Memory control register 0A Register symbol: MEMCTR0A Address: x’32000030 Purpose: Sets the access timing, etc., for external memory space[...]

  • Page 123

    Bus Controller (BC) 8-9 ~ ~ ~ ~ ~ ~ Memory control register 0B Register symbol: MEMCTR0B Address: x’32000020 Purpose: Sets the bus mode, access timing, etc., for external memory space block 0. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 B i t B 0B 0B 0B 0B 0B 0B 0 B 0B 0B 0 –– – B0 –– name WEN4 WEN3 WEN2 WEN1 WEN0 ASN2 ASN1 ASN0 AS[...]

  • Page 124

    Bus Controller (BC) 8-10 8.6.2 Memory Block 1 Control Register Memory control register 1A/B is used to set the memory block 1 read/write timing, synchronous/asynchronous mode, DRAM mode, page mode, and bus width through software. Memory control register 1A Register symbol: MEMCTR1A Address: x’32000032 Purpose: Sets the access timing, etc., for ex[...]

  • Page 125

    Bus Controller (BC) 8-11 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ When using DRAM (Memory control register 1B B1DRAM = 1) Bit No. Bit name Description Setting conditions 1 to 0 BCS1 to 0 Row address setup timing 00: prohibited (use as ASR parameter) 01: 1MCLK 11: 3MCLK 3 to 2 EA1 to 0 Column address setup timing 00: prohibited (use as ASC parameter) 01: 1MCLK 11: 3MCLK[...]

  • Page 126

    Bus Controller (BC) 8-12 ~ ~ ~ ~ ~ ~ Memory control register 1B Register symbol: MEMCTR1B Address: x ’ 32000022 Purpose: Sets the bus mode, access timing, etc., for external memory space block 1. Bit No. 15 14 13 12 11 10 98765 4 3210 Bit B1 B1 B1 B1 B1 B1 B1 B1 B1 B1 – B1 B1 B1 – B1 name WEN4 WEN3 WEN2 WEN1 WEN0 ASN2 ASN1 ASN0 ASA1 ASA0 BW P[...]

  • Page 127

    Bus Controller (BC) 8-13 When using DRAM (Memory control register 1B B1DRAM = 1) Bit No. Bit name Description Setting conditions 0 DRAM Block 1 DRAM 1: Use as DRAM space. space setting 2 BM Block 1 bus mode 1: Asynchronous mode (MCLK synchronization) 3 PE Block 1 software page 0: Disabled mode enable 1: Enabled 4 BW Block 1 bus width 0: 8 bits 1: 1[...]

  • Page 128

    Bus Controller (BC) 8-14 8.6.3 Memory Block 2 Control Register Memory control register 2A/B is used to set the memory block 2 read/write timing, synchronous/asynchronous mode, fixed wait/handshaking mode, DRAM mode, page mode, and bus width through software. Memory control register 2A Register symbol: MEMCTR2A Address: x ’ 32000034 Purpose: Sets [...]

  • Page 129

    Bus Controller (BC) 8-15 When using handshaking mode (Memory control register 2B B2DRAM = 0, B2WM = 1) Bit No. Bit name Description Setting conditions 1 to 0 BCS1 to 0 DK detection wait cycle 00: prohibited (use as DW parameter) 01: 1MCLK 10: 2MCLK 11: 3MCLK 3 to 2 EA1 to 0 RE/WE assert timing 00: prohibited 01: 1MCLK 10: 2MCLK 11: 3MCLK 5 to 4 ADE[...]

  • Page 130

    Bus Controller (BC) 8-16 When using fixed wait mode and not using DRAM (Memory control register 2B B2DRAM = 0, B2WM = 0) Bit No. Bit name Description Setting conditions 0 DRAM Block 2 DRAM 0: Do not use as DRAM space. space setting 1 WM Block 2 wait mode 0: fixed wait mode 2 BM Block 2 bus mode 0: Synchronous mode (SYSCLK synchronization) 1: Asynch[...]

  • Page 131

    Bus Controller (BC) 8-17 ~ ~ ~ ~ ~ ~ ~ ~ When using DRAM (Memory control register 2B B2DRAM = 1 B2WM = 0) Bit No. Bit name Description Setting conditions 0 DRAM Block 2 DRAM 1: Use as DRAM space space setting 1 WM Block 2 wait mode 0: fixed wait mode 2 BM Block 2 bus mode 1: Asynchronous mode (MCLK synchronization) 3 PE Block 2 software page 0: Dis[...]

  • Page 132

    Bus Controller (BC) 8-18 After the reset is released, block 2 is set as follows: Address output end timing 3MCLK RE negate timing 29MCLK WE negate timing 29MCLK RE/WE assert timing 3MCLK Bus cycle start timing 0MCLK Bus cycle end timing 31MCLK AS assert timing 1MCLK AS negate timing 3MCLK The bus width is 16 bits, and synchronous fixed wait mode is[...]

  • Page 133

    Bus Controller (BC) 8-19 8.6.4 Memory Block 3 Control Register Memory control register 3A/B is used to set the memory block 3 read/write timing, synchronous/asynchronous mode, fixed wait/handshaking mode, and bus width through software. However, the handshaking mode can only be set when (MCLK frequency/SYSCLK frequency) = 4. Memory control register[...]

  • Page 134

    Bus Controller (BC) 8-20 When using handshaking mode (Memory control register 3B B3WM = 1) Bit No. Bit name Description Setting conditions 1 to 0 BCS1 to 0 DK detection wait cycle (used as parameter DW) 00: prohibited 01: 1MCLK 10: 2MCLK 11: 3MCLK 3 to 2 EA1 to 0 RE/WE assert timing 00: prohibited 01: 1MCLK 10: 2MCLK 11: 3MCLK 5 to 4 ADE1 to 0 Addr[...]

  • Page 135

    Bus Controller (BC) 8-21 When using handshaking mode (Memory control register 3B B3WM = 1) Bit No. Bit name Description Setting conditions 1 WM Block 3 wait mode 1: Handshaking mode 2 BM Block 3 bus mode 0: Synchronous mode (SYSCLK synchronization) 4 BW Block 3 bus width 0: 8 bits 1: 16 bits 7 to 6 ASA1 to 0 AS assert timing 00: 0MCLK 11: 3MCLK 10 [...]

  • Page 136

    Bus Controller (BC) 8-22 8.6.5 DRAM control register DRAM control register Register symbol: DRAMCTR Address: x'32000040 Purpose: Stores various DRAM mode settings when DRAM is connected. Bit No. 15 14 13 12 11 10 98765 4 3210 Bit –––– RERS RERS RERS RERS SIZE SIZE –– BWC REFE PAGE DRAM name 321010 E Reset 00000011000 0 0000 Access [...]

  • Page 137

    Bus Controller (BC) 8-23 ~ ~ 8.6.6 Refresh count register Register symbol: REFCNT Address: x'32000042 Purpose: Sets the DRAM refresh interval when DRAM is connected. Bit No. 15 14 13 12 11 10 98765 4 3210 Bit REFC REFC REFC REFC REFC REFC REFC REFC REFC REFC REFC REFC REFC REFC REFC REFC name 15 14 13 12 11 10 98765 4 3210 Reset 1 1 111111111 [...]

  • Page 138

    Bus Controller (BC) 8-24 8.6.7 Page Row Address Register Page Row Address Register Register symbol: PRAR Address: x'32000044 Purpose: Sets the row address for DRAM software page mode. Bit No. 15 14 13 12 11 10 98765 4 3210 Bit PRAR PRAR PRAR PRAR PRAR PRAR PRAR PRAR PRAR PRAR PRAR PRAR PRAR PRAR PRAR PRAR name 15 14 13 12 11 10 98765 4 3210 Re[...]

  • Page 139

    Bus Controller (BC) 8-25 Notes when switching the internal clock multiplier Be aware of the following points when setting the clock control register CKCTR and changing the internal clock multiplier. • If external memory is accessed immediately after setting the clock control register CKCTR, the multiplier for the internal clock MCLK may change in[...]

  • Page 140

    Bus Controller (BC) 8-26 8.7 Space Partitioning In extension memory mode (MMOD 1 to 0 = "LH"), the 1 GB memory space from x'80000000 to x'BFFFFFFF becomes external memory space; in processor mode (MMOD 1 to 0 = "HL"), the 2 GB memory space from x'40000000 to x'BFFFFFFF becomes external memory space. External [...]

  • Page 141

    Bus Controller (BC) 8-27 Fig. 8-7-2 Space Partitioning 1 GB Processor mode System reserved 2 GB 1 GB Internal memory space External memory space External memory space that is actually assigned as external memory 1 GB Extension memory mode System reserved 2 GB 1 GB Block0 (64 MB) There is no portion for address extension for block 3 Block1 (64 MB) B[...]

  • Page 142

    Bus Controller (BC) 8-28 8.8 Operation Clocks MCLK, IOCLK, and SYSCLK are used as BC operation clocks. Table 8-8-1 shows the ratio of each clock versus the oscillation input clock (OSCI). Table 8-8-1 Frequency Ratios of BC Operation Clocks Oscillation mode Clock control register setting SYSCLK MCLK IOCLK CKSEL PLL mutiplier mutiplier mutiplier MCK[[...]

  • Page 143

    Bus Controller (BC) 8-29 8.10 Bus Cycle Depending on the value of the external input pin CKSEL and the internal registers, the MCLK frequency can be either 1/2, 1, 2, or 4 times the input frequency, and the IOCLK frequency can be either 1/8, 1/4, 1/2, or 1 times the input frequency. Note that SYSCLK is output with either 1/2 or 1 times the input fr[...]

  • Page 144

    Bus Controller (BC) 8-30 8.11 Store Buffer The bus controller has one store buffer (with a 32-bit data width) built in, and is used to avoid a time penalty when conducting a store operation in internal I/O or external memory. The CPU store operation is completed storing the address, data, and access size in the store buffer, and is executed with no[...]

  • Page 145

    Bus Controller (BC) 8-31 8.12 Accessing the Internal I/O Space Accesses to the internal I/O space (I/O register) are performed through the I/O bus, with the bus controller controlling the interface for read/write requests from the CPU. Accesses between the bus controller and the internal I/O space are executed in synchronization with IOCLK. Fig. 8-[...]

  • Page 146

    Bus Controller (BC) 8-32 8.13 External Memory Space Access (Non-DRAM Spaces) During an access to external memory, the BC controls the interface for the read/write request from the CPU. Table 8-13-1 lists the transactions that are supported for the external bus. Table 8-13-1 External Bus Transaction Address Bus width Mode /data Synchronization Async[...]

  • Page 147

    Bus Controller (BC) 8-33 8. 13. 1 16-bit Bus with Fixed Wait States, in Synchronous Mode and in Address/Data Separate Mode Setting of the various parameters for external memory access is performed in memory control registers 0 to 3, corresponding to each block. In synchronous mode, the bus access is initiated in synchronization with SYSCLK. When fi[...]

  • Page 148

    Bus Controller (BC) 8-34 An Dn WEn RE CSn EA MCLK SYSCLK BCS BCE BCS BCE REN EA WEN Write Read :Undefined Fig. 8-13-2 Access Timing on a 16-bit Bus with Fixed Wait States, in Synchronous Mode and in Address/Data Separate Mode (MCLK = SYSCLK multiplied by 2) For details on the various timing settings, refer to the description of the memory control r[...]

  • Page 149

    Bus Controller (BC) 8-35 8.13.2 16-bit Bus with Handshaking, in Synchronous Mode and in Address/Data Separate Mode When using handshaking, bus access starts once synchronization with SYSCLK is achieved, and after the data acknowledge signal (DK) is asserted, 2 MCLK cycles are consumed by the BC internally and then the access is completed according [...]

  • Page 150

    Bus Controller (BC) 8-36 Fig. 8-13-5 Access Timing on a 16-bit Bus with Handshaking, in Synchronous Mode and in Address/Data Separate Mode (MCLK = SYSCLK multiplied by 2) For details on the various timing settings, refer to the description of the memory control register in section 8.6, “ Description of Registers. ” Fig. 8-13-6 Access Timing on [...]

  • Page 151

    Bus Controller (BC) 8-37 An Dn WEn RE CSn EA MCLK SYSCLK EA Read Write BCE BCE REN WEN : Undefined 8.13.3 16-bit Bus in Asynchronous Mode and in Address/Data Separate Mode Asynchronous mode is used for accessing external memory at high speed; the address signals, CSn signals, etc., are output asynchronously with the SYSCLK but in synchronization wi[...]

  • Page 152

    Bus Controller (BC) 8-38 An Dn WEn RE CSn EA MCLK SYSCLK EA Read Write BCE BCE REN WEN : Undefined Fig. 8-13-9 Access Timing on a 16-bit Bus in Asynchronous Mode and in Address/Data Separate Mode (MCLK = SYSCLK) For details on the various timing settings, refer to the description of the memory control register in section 8.6, “ Description of Reg[...]

  • Page 153

    Bus Controller (BC) 8-39 8.13.4 8-bit Bus with Fixed Wait States, in Synchronous Mode and in Address/Data Separate Mode 8-bit bus mode is set for block 0 by setting the mode through the MMOD1 and 0 pins and the EXMOD1 and 0 pins, and for blocks 1 to 3 by setting the BnBW bit to "0" in the corresponding memory control register. In 8-bit bu[...]

  • Page 154

    Bus Controller (BC) 8-40 An D7-0 WE0 RE CSn MCLK SYSCLK Read low- order side Read high- order side Write low- order side Write high- order side A[0]=0 BCE BCS A[0]=1 BCE BCS A[0]=0 BCE BCS A[0]=1 BCE BCS EA REN EA REN EA WEN WEN EA : Undefined Fig. 8-13-11 Access Timing on a 8-bit Bus with Fixed Wait States, in Synchronous Mode and in Address/Data [...]

  • Page 155

    Bus Controller (BC) 8-41 8.13.5 8-bit Bus with Handshaking, in Synchronous Mode and in Address/Data Separate Mode 8-bit bus mode is set for blocks 2 and 3 by setting the BnBW bit to “ 0 ” in the corresponding memory control register. In 8-bit bus mode, half-word access (16 bits) is performed by means of two external accesses, with A[0] = "[...]

  • Page 156

    Bus Controller (BC) 8-42 (a) Read Timing (b) Write Timing Fig. 8-13-13 Access Timing on a 8-bit Bus with Handshaking, in Synchronous Mode and in Address/Data Separate Mode (MCLK = SYSCLK multiplied by 4) For details on the various timing settings, refer to the description of the memory control register in section 8.6, “ Description of Registers. [...]

  • Page 157

    Bus Controller (BC) 8-43 Fig. 8-13-14 Access Timing on a 8-bit Bus with Handshaking, in Synchronous Mode and in Address/Data Separate Mode (MCLK = SYSCLK multiplied by 2) For details on the various timing settings, refer to the description of the memory control register in section 8.6, “ Description of Registers. ” (a) Read Timing (b) Write Tim[...]

  • Page 158

    Bus Controller (BC) 8-44 (a) Read Timing (b) Write Timing Fig. 8-13-15 Access Timing on a 8-bit Bus with Handshaking, in Synchronous Mode and in Address/Data Separate Mode (MCLK = SYSCLK) For details on the various timing settings, refer to the description of the memory control register in section 8.6, “ Description of Registers. ” An WE0 RE CS[...]

  • Page 159

    Bus Controller (BC) 8-45 8.13.6 8-bit Bus in Asynchronous Mode and in Address/Data Separate Mode 8-bit bus mode is set for block 0 by setting the mode through the MMOD1 and 0 pins and the EXMOD1 and 0 pins, and for blocks 1 to 3 by setting the BnBW bit to “ 0 ” in the corresponding memory control register. In 8-bit bus mode, half-word access (1[...]

  • Page 160

    Bus Controller (BC) 8-46 Fig. 8-13-17 Access Timing on a 16-bit Bus with Fixed Wait States, in Synchronous Mode and in Address/Data Multiplex Mode (MCLK = SYSCLK multiplied by 4) For details on the various timing settings, refer to the description of the memory control register in section 8.6, “ Description of Registers. ” 8.13.7 16-bit Bus wit[...]

  • Page 161

    Bus Controller (BC) 8-47 Fig. 8-13-18 Access Timing on a 16-bit Bus with Fixed Wait States, in Synchronous Mode and in Address/Data Multiplex Mode (MCLK = SYSCLK multiplied by 2) For details on the various timing settings, refer to the description of the memory control register in section 8.6, “ Description of Registers. ” Fig. 8-13-19 Access T[...]

  • Page 162

    Bus Controller (BC) 8-48 8.13.8 16-bit Bus with Handshaking, in Synchronous Mode and in Address/Data Multiplex Mode By setting the mode through the MMOD1 and 0 pins and the EXMOD1 and 0 pins, blocks 2 and 3 use multiplex pins for the memory address and memory data signals (pins ADM15 to 0). When using handshaking, bus access starts once synchroniza[...]

  • Page 163

    Bus Controller (BC) 8-49 Fig. 8-13-21 Access Timing on a 16-bit Bus with Handshaking, in Synchronous Mode and in Address/Data Multiplex Mode (MCLK = SYSCLK multiplied by 2) For details on the various timing settings, refer to the description of the memory control register in section 8.6, “ Description of Registers. ” MCLK SYSCLK AS CSn ASA ADE [...]

  • Page 164

    Bus Controller (BC) 8-50 Fig. 8-13-22 Access Timing on a 16-bit Bus with Handshaking, in Synchronous Mode and in Address/Data Multiplex Mode (MCLK = SYSCLK) For details on the various timing settings, refer to the description of the memory control register in section 8.6, “ Description of Registers. ” MCLK SYSCLK AS CS2 BCE ASA RWSEL A23* to 16[...]

  • Page 165

    Bus Controller (BC) 8-51 8.13.9 16-bit Bus in Asynchronous Mode and in Address/Data Multiplex Mode By setting the mode through the MMOD1 and 0 pins and the EXMOD1 and 0 pins, blocks 0 to 3 use multiplex pins for the memory address and memory data signals (pins ADM15 to 0). Asynchronous mode is used for accessing external memory at high speed; the a[...]

  • Page 166

    Bus Controller (BC) 8-52 8.13.10 8-bit Bus with Fixed Wait States, in Synchronous Mode and in Address/Data Multiplex Mode By setting the mode through the MMOD1 and 0 pins and the EXMOD1 and 0 pins, blocks 0 to 3 use multiplex pins for the memory address and memory data signals (pins ADM15 to 0). 8-bit bus mode is set for block 0 by setting the mode[...]

  • Page 167

    Bus Controller (BC) 8-53 (a) Read Timing Fig. 8-13-24 Access Timing on a 8-bit Bus with Fixed Wait States, in Synchronous Mode and in Address/Data Multiplex Mode (MCLK = SYSCLK multiplied by 4) For details on the various timing settings, refer to the description of the memory control register in section 8.6, “ Description of Registers. ” (b) Wr[...]

  • Page 168

    Bus Controller (BC) 8-54 Fig. 8-13-25 Access Timing on a 8-bit Bus with Fixed Wait States, in Synchronous Mode and in Address/Data Multiplex Mode (MCLK = SYSCLK multiplied by 2) For details on the various timing settings, refer to the description of the memory control register in section 8.6, “ Description of Registers. ” When BCE for the low-o[...]

  • Page 169

    Bus Controller (BC) 8-55 (b) Write Timing Fig. 8-13-26 Access Timing on a 8-bit Bus with Fixed Wait States, in Synchronous Mode and in Address/Data Multiplex Mode (MCLK = SYSCLK) For details on the various timing settings, refer to the description of the memory control register in section 8.6, “ Description of Registers. ” (a) Read Timing A23* [...]

  • Page 170

    Bus Controller (BC) 8-56 8.13.11 8-bit Bus with Handshaking, in Synchronous Mode and in Address/Data Multiplex Mode By setting the mode through the MMOD1 and 0 pins and the EXMOD1 and 0 pins, blocks 2 and 3 use multiplex pins for the memory address and memory data signals (pins ADM15 to 0). 8-bit bus mode is set for blocks 2 and 3 by setting the Bn[...]

  • Page 171

    Bus Controller (BC) 8-57 Fig. 8-13-27 Access Timing on a 8-bit Bus with Handshaking, in Synchronous Mode and in Address/ Data Multiplex Mode (MCLK = SYSCLK multiplied by 4) For details on the various timing settings, refer to the description of the memory control register in section 8.6, “ Description of Registers. ” (b) Write Timing (a) Read T[...]

  • Page 172

    Bus Controller (BC) 8-58 (a) Read Timing Fig. 8-13-28 Access Timing on a 8-bit Bus with Handshaking in Synchronous Mode and in Address/ Data Multiplex Mode (MCLK = SYSCLK multiplied by 2) For details on the various timing settings, refer to the description of the memory control register in section 8.6, “ Description of Registers. ” (b) Write Ti[...]

  • Page 173

    Bus Controller (BC) 8-59 (a) Read Timing (b) Write Timing Fig. 8-13-29 Access Timing on a 8-bit Bus with Handshaking in Synchronous Mode and in Address/ Data Multiplex Mode (MCLK = SYSCLK) For details on the various timing settings, refer to the description of the memory control register in section 8.6, “ Description of Registers. ” MCLK SYSCLK[...]

  • Page 174

    Bus Controller (BC) 8-60 8.13.12 8-bit Bus in Asynchronous Mode and in Address/Data Multiplex Mode By setting the mode through the MMOD1 and 0 pins and the EXMOD1 and 0 pins, blocks 0 to 3 use multiplex pins for the memory address and memory data signals (pins ADM15 to 0). 8-bit bus mode is set for block 0 by setting the mode through the MMOD1 and [...]

  • Page 175

    Bus Controller (BC) 8-61 (b) Write Timing (a) Read Timing Fig. 8-13-30 Access Timing on a 8-bit Bus in Asynchronous Mode and in Address/Data Multiplex Mode (MCLK = SYSCLK multiplied by 4) For details on the various timing settings, refer to the description of the memory control register in section 8.6, “ Description of Registers. ” A23* to 16 R[...]

  • Page 176

    Bus Controller (BC) 8-62 8.14 External Memory Space Access (DRAM Space) 8.14.1 DRAM Space Blocks 1 and 2 can be used as DRAM space by setting the BnDRAM bits in memory control registers 1B/2B and setting the DRAME bit in DRAM control register. The DRAM bus cycle is always not synchronized the external clock (but is synchronized with MCLK), and perf[...]

  • Page 177

    Bus Controller (BC) 8-63 ■ Minimum value for the RAS Precharge interval When consecutive DRAM accesses are performed, the RAS precharge interval is shortest when performing an access of type (1) or (2) below while the PAGE bit is set to “0” in the DRAM control register: (1) Word/half-word access while the bus width is set to 8 bits (2) Word a[...]

  • Page 178

    Bus Controller (BC) 8-64 ■ 2 WE control/2 CAS control DRAM that permits byte/word control can be supported by selecting either one of the following two methods: • 2 WE control: The two pins WE1 and WE0 are used for byte/word control. • 2 CAS control: The two pins DCAS1 and DCAS0 are used for byte/word control. Fig. 8-14-3 illustrates an examp[...]

  • Page 179

    Bus Controller (BC) 8-65 8.14.2 DRAM page mode If the PAGE bit in the DRAM control register is set to “1”, page mode access is enabled, making high-speed access in page mode possible for following accesses to DRAM. (1) Word/half-word access when the bus width is set to 8 bits (2) Word access when the bus width is set to 16 bits Fig. 8-14-5 show[...]

  • Page 180

    Bus Controller (BC) 8-66 8.14.3 Software Page Mode Software page mode is a mode that forcibly initiates page mode by setting the control register. Operation within software page mode is as described below. Refer to Fig. 8-14-6. • When the mode is initiated, the contents of PRAR are output as the row address. • While the mode is in effect, RASn [...]

  • Page 181

    Bus Controller (BC) 8-67 MCLK Row CAO+1 An CAS RE Dn ASR RASn Column CAS ASC Column CAS Column CAS ASC ASC MCLK Row CAO+1 An CAS WEn Dn ASR RASn Column Column CAS ASC ASC CAS ASC CAS Column (a) Read Timing (b) Write Timing Fig. 8-14-6 Software Page Mode Read/Write Timing For details on the various timing settings, refer to the description of the me[...]

  • Page 182

    Bus Controller (BC) 8-68 [Restrictions on Use] (1) While software page mode is in effect, external access outside of the block in question is prohibited. Cancel software page mode before accessing an external memory space other than the block for which software page mode is set. (2) While software page mode is in effect, the bus will not be release[...]

  • Page 183

    Bus Controller (BC) 8-69 Fig. 8-14-8 DRAM Refresh Timing For details on the ASR and RP settings, refer to the explanations in section 8.6.2, “Memory Block 1 Control Register,” and section 8.6.3, “Memory Block 2 Control Register.” For details on the RERS setting, refer to the explanation in section 8.6.5, “DRAM Control Register.” Note: W[...]

  • Page 184

    Bus Controller (BC) 8-70 8.15 Bus Arbitration In this microcontroller, bus arbitration is implemented through the bus authority request signal (BR) and the bus authority release signal (BG). If an external device asserts the BR signal, then once the current bus access that is being executed is completed, the BG signal is asserted and the bus author[...]

  • Page 185

    Bus Controller (BC) 8-71 Fig. 8-15-1 Bus Arbitration Timing 1 (Bus Authority Release/Bus Authority Acquisition, nfr = 4) Fig. 8-15-2 Bus Arbitration Timing 2 (Bus Authority Release/Bus Authority Acquisition, n fr = 2) MCLK SYSCLK “Hi-Z” An CSn “Hi-Z” RE “Hi-Z” WEn “Hi-Z” CAS “Hi-Z” Dn “Hi-Z” BR BG CPU External device Bus acc[...]

  • Page 186

    Bus Controller (BC) 8-72 Fig. 8-15-3 Bus Arbitration Timing 3 (Bus Authority Release/Bus Authority Acquisition, n fr = 1) Fig. 8-15-4 Bus Arbitration Timing 4 (Refresh Request Generated While Bus Authority Has Been Released) MCLK SYSCLK “Hi-Z” An CSn “Hi-Z” RE “Hi-Z” WEn “Hi-Z” CAS “Hi-Z” Dn “Hi-Z” BR BG CPU Standby RASn “[...]

  • Page 187

    Bus Controller (BC) 8-73 8.16 Cautions These cautions concern the BC. These cautions must be heeded, since failure to do so may result in misoperation. 1. Do not change the contents of the relevant memory control register and the DRAM control register while accessing external memory space, except when software page mode is not in effect. 2. Do not [...]

  • Page 188

    Bus Controller (BC) 8-74 2. _____ Designate the bus authority request pin (BR) as a general-purpose input port, and the bus authority release _____ pin (BG) as a general-purpose output port, for instance, so that bus requests cannot be accepted during execution of a BSET or BCLR instruction.[...]

  • Page 189

    9. Interrupt Controller 9[...]

  • Page 190

    Interrupt Controller 9-2 9.1 Overview The interrupt controller processes non-maskable interrupts and level interrupts (internal interrupts and external interrupts). For external pins, the microcontroller has eight external interrupt pins and one non-maskable interrupt pin. 9.2 Features • Up to four interrupt requests can be accepted by each group[...]

  • Page 191

    Interrupt Controller 9-3 9.4 Block Diagram Fig. 9-4-1 Block Diagram 1 Interrupt control register address NMIRQ pin Watchdog timer overflow System error Reserved for system Timer 0 underflow Timer 1 underflow Timer 2 underflow Timer 3 underflow Timer 4 underflow Timer 5 underflow Timer 6 underflow Timer 7 underflow Timer 8 underflow Timer 9 underflo[...]

  • Page 192

    Interrupt Controller 9-4 Interrupt control register address GROUP 9 3 2 1 0 — — GROUP 10 3 2 1 0 — — GROUP 7 3 2 1 0 x'3400011C — — GROUP 8 3 2 1 0 x'34000120 — — GROUP 11 3 2 1 0 — — — GROUP 12 3 2 1 0 — — — GROUP 13 3 2 1 0 — — — x'34000124 x'34000128 x'3400012C x'34000130 x'340[...]

  • Page 193

    Interrupt Controller 9-5 Interrupt control register address GROUP 14 3 2 1 0 — — — GROUP 15 3 2 1 0 — — — GROUP 16 3 2 1 0 — — — GROUP 17 3 2 1 0 — — — GROUP 18 3 2 1 0 — — — GROUP 19 3 2 1 0 — — — x'34000138 x'3400013C x'34000140 x'34000144 x'34000148 x'3400014C External interrupt 3[...]

  • Page 194

    Interrupt Controller 9-6 9.5 Description of Registers This interrupt controller includes an interrupt control registers, an interrupt accepted group register, and an external interrupt condition specification register. Table 9-5-1 lists the interrupt controller registers. Table 9-5-1 Register List Address Name Symbol Number of bits Initial value Ac[...]

  • Page 195

    Interrupt Controller 9-7 Non-maskable interrupt control register Register symbol: G0ICR (NMICR) Address: x'34000100 Purpose: This register determines whether a non-maskable interrupt has been generated. Bit No. 15 14 13 12 11 10 98765 4 3210 Bit ------------- SYSE WDIF NMIF name Reset 0 0 000000000 0 0000 Access RRRRRRRRRRRRR R / W R / W R / W[...]

  • Page 196

    Interrupt Controller 9-8 Group n interrupt control register GnICR (n = 2 to 19) Registers G2ICR to G19ICR control level interrupts for groups 2 to 19, respectively. Each register confirms the group interrupt level as well as the enabling, request, and detection of interrupts within the respective group. The explanation on this page applies to regis[...]

  • Page 197

    Interrupt Controller 9-9 Bit No. Bit name Description 11 to 8 IE3 to 0 Group n interrupt enable register • This register is used to specify whether an interrupt is enabled or not. • When an IEn(n=3 to 0) bit is set to "1", the corresponding interrupt is enabled. • Setting an IEn bit while the corresponding IRn(n=3 to 0) bit is set g[...]

  • Page 198

    Interrupt Controller 9-10 Group 2 interrupt control register Register symbol: G2ICR Address: x'34000108 Purpose: This register is used to enable group 2 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G2 G2 G2 TM3 TM2 TM1 TM0 TM3 TM2 TM1 TM0 TM3 TM2 TM1 TM0 name LV2 LV1 LV0 IE[...]

  • Page 199

    Interrupt Controller 9-11 Group 3 interrupt control register Register symbol: G3ICR Address: x'3400010C Purpose: This register is used to enable group 3 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G3 G3 G3 TM7 TM6 TM5 TM4 TM7 TM6 TM5 TM4 TM7 TM6 TM5 TM4 name LV2 LV1 LV0 IE[...]

  • Page 200

    Interrupt Controller 9-12 Group 4 interrupt control register Register symbol: G4ICR Address: x'34000110 Purpose: This register is used to enable group 4 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G4 G4 G4 TMB TMA TM9 TM8 TMB TMA TM9 TM8 TMB TMA TM9 TM8 name LV2 LV1 LV0 IE[...]

  • Page 201

    Interrupt Controller 9-13 Group 5 interrupt control register Register symbol: G5ICR Address: x'34000114 Purpose: This register is used to enable group 5 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G5 G5 G5 - T10B T10A T10U - T10B T10A T10U - T10B T10A T10U name LV2 LV1 LV0[...]

  • Page 202

    Interrupt Controller 9-14 Group 6 interrupt control register Register symbol: G6ICR Address: x'34000118 Purpose: This register is used to enable group 6 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G6 G6 G6 - T13 T12 T11 - T13 T12 T11 - T13 T12 T11 name LV2 LV1 LV0 IE IE IE[...]

  • Page 203

    Interrupt Controller 9-15 Group 7 interrupt control register Register symbol: G7ICR Address: x'3400011C Purpose: This register is used to enable group 7 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G7 G7 G7 - - SC0T SC0R - - SC0T SC0R - - SC0T SC0R name LV2 LV1 LV0 IE IE IR[...]

  • Page 204

    Interrupt Controller 9-16 Group 8 interrupt control register Register symbol: G8ICR Address: x'34000120 Purpose: This register is used to enable group 8 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G8 G8 G8 - - SC1T SC1R - - SC1T SC1R - - SC1T SC1R name LV2 LV1 LV0 IE IE IR[...]

  • Page 205

    Interrupt Controller 9-17 Group 9 interrupt control register Register symbol: G9ICR Address: x'34000124 Purpose: This register is used to enable group 9 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G9 G9 G9 - - SC2T SC2R - - SC2T SC2R - - SC2T SC2R name LV2 LV1 LV0 IE IE IR[...]

  • Page 206

    Interrupt Controller 9-18 Group 10 interrupt control register Register symbol: G10ICR Address: x'34000128 Purpose: This register is used to enable group 10 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G10 G10 G10 - - SC3T SC3R - - SC3T SC3R - - SC3T SC3R name LV2 LV1 LV0 IE[...]

  • Page 207

    Interrupt Controller 9-19 Group 11 interrupt control register Register symbol: G11ICR Address: x'3400012C Purpose: This register is used to enable group 11 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G11 G11 G11 - - - IQ0 - - - IQ0 - - - IQ0 name LV2 LV1 LV0 IE IR ID Reset[...]

  • Page 208

    Interrupt Controller 9-20 Group 12 interrupt control register Register symbol: G12ICR Address: x'34000130 Purpose: This register is used to enable group 12 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G12 G12 G12 - - - IQ1 - - - IQ1 - - - IQ1 name LV2 LV1 LV0 IE IR ID Reset[...]

  • Page 209

    Interrupt Controller 9-21 Group 13 interrupt control register Register symbol: G13ICR Address: x'34000134 Purpose: This register is used to enable group 13 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G13 G13 G13 - - - IQ2 - - - IQ2 - - - IQ2 name LV2 LV1 LV0 IE IR ID Reset[...]

  • Page 210

    Interrupt Controller 9-22 Group 14 interrupt control register Register symbol: G14ICR Address: x'34000138 Purpose: This register is used to enable group 14 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G14 G14 G14 - - - IQ3 - - - IQ3 - - - IQ3 name LV2 LV1 LV0 IE IR ID Reset[...]

  • Page 211

    Interrupt Controller 9-23 Group 15 interrupt control register Register symbol: G15ICR Address: x'3400013C Purpose: This register is used to enable group 15 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G15 G15 G15 - - - IQ4 - - - IQ4 - - - IQ4 name LV2 LV1 LV0 IE IR ID Reset[...]

  • Page 212

    Interrupt Controller 9-24 Group 16 interrupt control register Register symbol: G16ICR Address: x'34000140 Purpose: This register is used to enable group 16 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G16 G16 G16 - - - IQ5 - - - IQ5 - - - IQ5 name LV2 LV1 LV0 IE IR ID Reset[...]

  • Page 213

    Interrupt Controller 9-25 Group 17 interrupt control register Register symbol: G17ICR Address: x'34000144 Purpose: This register is used to enable group 17 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G17 G17 G17 - - - IQ6 - - - IQ6 - - - IQ6 name LV2 LV1 LV0 IE IR ID Reset[...]

  • Page 214

    Interrupt Controller 9-26 Group 18 interrupt control register Register symbol: G18ICR Address: x'34000148 Purpose: This register is used to enable group 18 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G18 G18 G18 - - - IQ7 - - - IQ7 - - - IQ7 name LV2 LV1 LV0 IE IR ID Reset[...]

  • Page 215

    Interrupt Controller 9-27 Group 19 interrupt control register Register symbol: G19ICR Address: x'3400014C Purpose: This register is used to enable group 19 interrupts, and to confirm interrupt requests and detection. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit - G19 G19 G19 - - - AD - - - AD - - - AD name LV2 LV1 LV0 IE IR ID Reset 0 [...]

  • Page 216

    Interrupt Controller 9-28 Interrupt accepted group register Register symbol: IAGR Address: x'34000200 Purpose: This register is used to read the group number that generated the interrupt request. B i t N o . 1 51 41 31 21 11 0 9 8 7 6 5 4 3 2 1 0 Bit - - - - - - - - - GN4 GN3 GN2 GN1 GN0 - - name Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Access R [...]

  • Page 217

    Interrupt Controller 9-29 External interrupt condition specification register Register symbol: EXTMD Address: x'34000280 Purpose: This register specifies the external interrupt generation conditions. Set the desired level or edge for each pin. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit IR7 IR7 IR6 IR6 IR5 IR5 IR4 IR4 IR3 IR3 IR2 IR2 [...]

  • Page 218

    Interrupt Controller 9-30 9.6 Description of Operation The following interrupt processing is performed. • Non-maskable interrupts NMIRQ pin interrupt Watchdog timer overflow interrupt System error interrupt • Level interrupts • Internal interrupts Peripheral interrupts from timer, serial, A/D • External interrupts External pin interrupts x [...]

  • Page 219

    Interrupt Controller 9-31 [Cautions] 1. Maintain external pin interrupt signals for at least 10, 5, or 2.5 SYSCLK cycles when n fr = (MCLK frequency/ SYSCLK frequency) = 1, 2, or 4, respectively. The interrupt cannot be detected if the signal is not maintained for at least that long. However, when recovering from HALT mode in response to an externa[...]

  • Page 220

    Interrupt Controller 9-32[...]

  • Page 221

    10. 8-bit Timers 9 10[...]

  • Page 222

    8-bit Timers 10-2 10.1 Overview This device has 12 reload timers built in. All are down counters that can be used as interval timers and event counters. Eight of the timers are also capable of PWM output. 10.2 Features The features of the 8-bit timers are described below. • Clock source: An internal clock or external clock can be selected as the [...]

  • Page 223

    8-bit Timers 10-3 10.3 Block Diagram Fig. 10-3-1 shows a block diagram for timers 0 to 3. Fig. 10-3-2 shows a block diagram for timers 4 to B. Figures 10-3-3 to 10-3-6 show connection diagrams for the 8-bit timers. Fig. 10-3-1 8-bit Timer Block Diagram (Timers 0 to 3) TMnBR TMnBC CK0 CK1 LDE CNE TMnMD TMnIN0 TMnIN1 TMnIN2 TMnIN3 Underflow Reload Lo[...]

  • Page 224

    8-bit Timers 10-4 Fig. 10-3-2 8-bit Timer Block Diagram (Timers 4 to B) Output waveform control Timer n (n = 4, 5, 6, 7, 8, 9, A, B) Match Output control TMnOUT Compare register Compare register buffer TMnBR TMnBC CK0 CK1 LDE CNE TMnMD TMnIN0 TMnIN1 TMnIN2 TMnIN3 TMnCI TMnCLK TMnIRQ TMnCO CK2 TMnIN5 TMnIN6 TMnIN7 TMnIN4 OM0 OM1 — TMnCMP Compare r[...]

  • Page 225

    8-bit Timers 10-5 Fig. 10-3-3 8-bit Timer Connection Diagram (Overall) TM0IRQ Timer interrupt 0 TMnIN1 TMnIN0 TMnIN2 Block Timer 0 to 3 TM0OUT TM0IRQ TMnIN5 TMnIN4 TMnIN6 Timer 0 Timer 1 Timer 2 Timer 3 TM1OUT TM1IRQ TM2OUT TM2IRQ TM3OUT TM3IRQ TM1IRQ Timer interrupt 1 TM2IRQ Timer interrupt 2 TM3IRQ Timer interrupt 3 TMOSL Block Timer 4 to 7 TM4OU[...]

  • Page 226

    8-bit Timers 10-6 Fig. 10-3-4 8-bit Timer Connection Diagram (Timer 0 to 3 block) TM0IN1 TM0IN0 TM0IN3 TM0IN2 TM0CI Timer 0 TM0OUT TM0IRQ TM0CO TM0CLK TM0IN5 TM0IN4 TM0IN7 TM0IN6 TM0IRQ Timer interrupt 0 TM1IN1 TM1IN0 TM1IN3 TM1IN2 TM1CI Timer 1 TM1OUT TM1IRQ TM1CO TM1CLK TM1IN5 TM1IN4 TM1IN7 TM1IN6 TM2IN1 TM2IN0 TM2IN3 TM2IN2 TM2CI Timer 2 TM2OUT [...]

  • Page 227

    8-bit Timers 10-7 TM4IRQ Timer interrupt 4 IOCLK/32 TM4IN1 TM4IN0 TM4IN3 TM4IN2 TM4CI Timer 4 TM4OUT TM4IRQ TM4CO TM4CLK TM4IN5 TM4IN4 TM4IN7 TM4IN6 TM5IN1 TM5IN0 TM5IN3 TM5IN2 TM5CI Timer 5 TM5OUT TM5IRQ TM5CO TM5CLK TM5IN5 TM5IN4 TM5IN7 TM5IN6 TM6IN1 TM6IN0 TM6IN3 TM6IN2 TM6CI Timer 6 TM6OUT TM6IRQ TM6CO TM6CLK TM6IN5 TM6IN4 TM6IN7 TM6IN6 TM7IN1 [...]

  • Page 228

    8-bit Timers 10-8 Fig. 10-3-6 8-bit Timer Connection Diagram (Timer 8 to B block) TM8IRQ Timer interrupt 8 IOCLK/32 TM8IN1 TM8IN0 TM8IN3 TM8IN2 TM8CI Timer 8 TM8OUT TM8IRQ TM8CO TM8CLK TM8IN5 TM8IN4 TM8IN7 TM8IN6 TM9IN1 TM9IN0 TM9IN3 TM9IN2 TM9CI Timer 9 TM9OUT TM9IRQ TM9CO TM9CLK TM9IN5 TM9IN4 TM9IN7 TM9IN6 TMAIN1 TMAIN0 TMAIN3 TMAIN2 TMACI Timer [...]

  • Page 229

    8-bit Timers 10-9 Note: Because timers 0 and 8, 1 and 9, 2 and A, and 3 and B share multipurpose output pins, only one of either "timer output" or "PWM output" can be selected. 10.4 Functions Table 10-4-1 lists the functions of each 8-bit timer. Table 10-4-1 List of 8-bit Timer Functions — B A 9 8 7 6 5 4 3 2 ✓ 01 ✓ ✓ ?[...]

  • Page 230

    8-bit Timers 10-10 10.5 Description of Registers Table 10-5-1 lists the 8-bit timer registers. Table 10-5-1 List of 8-bit Timer Registers (1/2) Address Name Symbol Number of bits Initial value Access size x'34001000 Timer 0 mode register TM0MD 8 x'00 8, 16, 32 x'34001001 Timer 1 mode register TM1MD 8 x'00 8 x'34001002 Timer[...]

  • Page 231

    8-bit Timers 10-11 Address Name Symbol Number of bits Initial value Access size x'34001034 Timer 4 compare register TM4CMP 8 x'00 8, 16, 32 x'34001035 Timer 5 compare register TM5CMP 8 x'00 8 x'34001036 Timer 6 compare register TM6CMP 8 x'00 8, 16 x'34001037 Timer 7 compare register TM7CMP 8 x'00 8 x'340[...]

  • Page 232

    8-bit Timers 10-12 Timer n mode register (n = 0, 1, 2, 3) Register symbol: TMnMD Address: x'34001000 (n=0), x'34001001 (n=1), x'34001002 (n=2), x'34001003 (n=3) Purpose: This register controls the operation of timer n. B i t N o . 7654321 0 Bit TMn TMn -- - TMn TMn TMn name CNE LDE CK2 CK1 CK0 Reset 0 0 0 0 0 0 0 0 Access R/W R/[...]

  • Page 233

    8-bit Timers 10-13 Timer n mode register (n = 4, 5, 6, 7, 8, 9, A, B) Register symbol: TMnMD Address: x'34001004 (n=4), x'34001005 (n=5), x'34001006 (n=6), x'34001007 (n=7), x'34001008 (n=8), x'34001009 (n=9), x'3400100A (n=A), x'3400100B (n=B) Purpose: This register controls the operation of timer n. B i t N[...]

  • Page 234

    8-bit Timers 10-14 [Note] When setting TMnCNE to "1", do so while TMnLDE is set to "0". When setting TMnLDE to "1", do so while TMnCNE is set to "0". Operation is not guaranteed if TMnCNE and TMnLDE are both set to "1" at the same time. Table 10-5-2 PWM Output Waves TMnOM0 setting Upon initializatio[...]

  • Page 235

    8-bit Timers 10-15 When using 1/8 IOCLK or 1/32 IOCLK, the prescaler control register (TMPSCNT) must be set. When TMnIO pin input was selected, the rising edge of the pin input signal is counted. Table 10-5-3 8-bit Timer Clock Sources TMnCK[2:0] Setting Timer 0 000 001 010 011 IOCLK Timer 1 Timer 2 Timer 3 IOCLK IOCLK Cascaded with timer 1 IOCLK Ca[...]

  • Page 236

    8-bit Timers 10-16 Timer n base register (n = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B) Register symbol: TMnBR Address: x'34001010 (n = 0), x'34001011 (n = 1), x'34001012 (n = 2), x'34001013 (n = 3), x'34001014 (n = 4), x'34001015 (n = 5), x'34001016 (n = 6), x'34001017 (n = 7), x'34001018 (n = 8), x'3400[...]

  • Page 237

    8-bit Timers 10-17 Timer n compare register (n = 4, 5, 6, 7, 8, 9, A, B) Register symbol: TMnCMP Address: x'34001034 (n = 4), x'34001035 (n = 5), x'34001036 (n = 6), x'34001037 (n = 7), x'34001038 (n = 8), x'34001039 (n = 9), x'3400103A (n = A), x'3400103B (n = B) Purpose: This is the timer n compare register[...]

  • Page 238

    8-bit Timers 10-18 Timer output selection register Register symbol: TMOSL Address: x'34001070 Purpose: This register selects the 8-bit timer output signal. B i t N o . 7654321 0 Bit ---- TM TM TM TM name OSL3 OSL2 OSL1 OSL0 Reset 0 0 0 0 0 0 0 0 Access R R R R R/W R/W R/W R/W Bit No. Bit name Description 0 TMOSL0 Timer output selection flag 0 [...]

  • Page 239

    8-bit Timers 10-19 Prescaler control register Register symbol: TMPSCNT Address: x'34001071 Purpose: This register controls the prescaler operation. B i t N o . 7654321 0 Bit TMPS ---- --- name CNE Reset 0 0 0 0 0 0 0 0 Access R/W R R R R R R R Bit No. Bit name Description 6 to 0 – "0" is returned when these bits are read. 7 TMPSCNE[...]

  • Page 240

    8-bit Timers 10-20 10.6 Description of Operation This section describes the operation of the 8-bit timers. 10.6.1 Interval Timers and Timer Output When using an 8-bit timer as an interval timer, make the appropriate settings according to the procedure described below. The timer in question then operates as an interval timer that generates interrupt[...]

  • Page 241

    8-bit Timers 10-21 (6) Enable the timer counting operation. Once TMnCNE is set to "1" in the TMnMD register, the counting operation starts. Once the counting operation is enabled, an underflow interrupt request is generated at fixed intervals. In addition, the pin output is inverted each time that this interrupt is generated, and the valu[...]

  • Page 242

    8-bit Timers 10-22 Fig 10-6-1 Interval Timer Operation Fig 10-6-2 Interval Timer Operation (When Clock Source = IOCLK) TMnBC value TMnBR setting value TMnCNE Interrupt request Timer output x'00 x'01 TMnBR value T M n B R v al u e - 1 x'00 TMnBR value IOCLK Timer output (TMnOUT) TMnBR value-1 (value in TMnBR + 1) x IOCLK Interrupt req[...]

  • Page 243

    8-bit Timers 10-23 Fig. 10-6-3 Interval Timer Operation (Using Prescaler) Timer output (TMnOUT) x'00 x'01 TMnBR value TMnBR value-1 IOCLK TMnBC value Interrupt request signal (TMnIRQ) Counter clock TMnBR value-2[...]

  • Page 244

    8-bit Timers 10-24 10.6.2 Event Counting When using an 8-bit timer for event counting, make the settings according to the procedure described below. When using the timers as a 16-, 24- or 32-bit timer by means of a cascaded connection, refer to section 10.6.3, "Cascaded Connection." ■ Procedure for initiating operation (1) Set the timer[...]

  • Page 245

    8-bit Timers 10-25 [Note] Pin input is sampled according to IOCLK. Input a signal with a pulse width of at least 6, 3, or 1.5 SYSCLK cycles when (MCLK frequency/SYSCLK frequency) = 1, 2, or 4, respectively. Event counting is not possible when IOCLK is stopped (in HALT or STOP mode). Fig. 10-6-4 Event Counting Operation Interrupt request signal (TMn[...]

  • Page 246

    8-bit Timers 10-26 10.6.3 Cascaded Connection The 8-bit timers can be cascaded together in the combinations shown in Fig. 10-6-5. Fig. 10-6-5 Cascaded Connection When using cascaded 8-bit timers as a 16-bit timer: Timer 1 Timer 0 (Higher) (Lower) Timer 2 Timer 1 (Higher) (Lower) Timer 3 Timer 2 (Higher) (Lower) Timer 1 Timer 0 (Highest) (Lowest) Ti[...]

  • Page 247

    8-bit Timers 10-27 Make the settings described below when cascading 8-bit timers. (1) Set the timer division ratio. Set the timer division ratio in TMnBR. (Example 1) When using timers 0 and 1 as 16-bit timers and setting the interrupt cycle to x'1234: In order to set the interrupt cycle to x'1234, x'1234 - 1 = x'1233 must be se[...]

  • Page 248

    8-bit Timers 10-28 (4) Enable counting operation Enable the counting operation by either one of the following two methods: 1) Enable the counting operation for each of the cascaded timers one at a time, in order, starting from the highest timer. 2) Enable the counting operation for all of the cascaded timers simultaneously. (5) Stop the counting op[...]

  • Page 249

    8-bit Timers 10-29 Differences between using a timer as a prescaler and when cascaded The following explanation of these differences uses the cases where the clock source for timer 1 is set to "timer 0 underflow" and to "cascaded with timer 0" as examples. When "timer 0 underflow" is set, operation is as shown in Fig. [...]

  • Page 250

    8-bit Timers 10-30 When "cascaded with timer 0" is set, operation is as shown in Fig. 10-6-7. (IOCLK is selected as the clock source for timer 0.) If TM1BC does not equal x'00, then when TM0BC underflows, the value in TM0BC is x'FF and the value in TM1BC is decremented by one. If TM1BC does equal x'00, then when TM0BC under[...]

  • Page 251

    8-bit Timers 10-31 10.6.4 PWM Output Make the settings as described below when using an 8-bit timer to output a PWM waveform. (Timers 4 to B) The timers cannot be cascaded when outputting a PWM waveform. ■ Procedure for initiating operation (1) Set the PWM output cycle. Set the cycle in TMnBR. The PWM output cycle is: (value set in TMnBR + 1) x c[...]

  • Page 252

    8-bit Timers 10-32 Once the counting operation is enabled, the PWM waveform is output and an underflow interrupt request is generated. (Refer to Fig. 10-6-8 and 10-6-9.) If the value in the TMnBR register is changed while the counting operation is in progress, that value is loaded as the initial value when the next underflow is generated, and the c[...]

  • Page 253

    8-bit Timers 10-33 TMnBC value Timer output (TMnOUT) TMnBR value x'00 IOCLK Interrupt request signal (TMnIRQ) (TMnBR value +1) x IOCLK TMnBR value x'00 TMnCMP value x IOCLK TMnCMP value Fig. 10-6-8 PWM Output (When Clock Source = IOCLK, and "L" Level Is Output Upon Initialization) Fig. 10-6-9 PWM Output (When Using Prescaler, an[...]

  • Page 254

    8-bit Timers 10-34[...]

  • Page 255

    11. 16-bit Timers 11[...]

  • Page 256

    16-bit Timers 11-2 11.1 Overview This microcontroller has four 16-bit timers built in. Three are reload timers (down-counters) that can be used as interval timers or event counters. The other is an up-counter that has two compare/capture registers built in. 11.2 Features The features of the 16-bit timers are described below. Timer 10 • Up-counter[...]

  • Page 257

    16-bit Timers 11-3 11.3 Block Diagram Fig. 11-3-1 shows the block diagram for timer 10, and Fig. 11-3-2 shows the block diagram for timers 11 to 13. Fig. 11-3-1 16-bit Timer Block Diagram (Timer 10) Timer 10 TM10CA TM10BC Compare/capture A register Binary counter TM10CB Compare/capture B register Pin input control TM10IRQ Overflow interrupt TM10AIR[...]

  • Page 258

    16-bit Timers 11-4 Timer n (n = 11, 12, 13) TMnBR TMnBC CK0 CK1 LDE CNE TMnMD Underflow Reload Load TMnIRQ TMnOUT Underflow interrupt Timer output Counting operation enable Reset Mode register Base register Binary counter — — — T R Q CK2 TMnIN0 TMnIN1 TMnIN2 TMnIN5 TMnIN6 TMnIN7 TMnIN4 Fig. 11-3-2 16-bit Timer Block Diagram (Timers 11, 12, an[...]

  • Page 259

    16-bit Timers 11-5 Fig. 11-3-3 16-bit Timer Connection Diagram Timer 10 overflow interrupt TM10IOA I/O port block TM13IO TM13IN1 TM13IN0 TM13IN4 TM13IN2 Timer 13 TM13IN5 TM13IN7 TM13IN6 TM12IO TM12IN1 TM12IN0 TM12IN4 TM12IN2 Timer 12 TM12IN5 TM12IN7 TM12IN6 TM11IO TM11IN1 TM11IN0 TM11IN4 TM11IN2 Timer 11 TM11IN5 TM11IN7 TM11IN6 TM10IN1 TM10IN0 TM10[...]

  • Page 260

    16-bit Timers 11-6 Fig. 11-3-4 shows the block diagram for the timer 10 compare/capture registers. Fig. 11-3-4 Timer 10 Compare/Capture Register Block Diagram Fig. 11-3-5 shows the block diagram for the PWM output section when timer 10 is set to PWM mode with additional bits. Fig. 11-3-5 PWM Output Section Block Diagram TM10BC TM10CA (TM10CB) Addit[...]

  • Page 261

    16-bit Timers 11-7 11.4 Functions Table 11-4-1 lists the functions of each 16-bit timer. Table 11-4-1 List of 16-bit Timer Functions Down-counting Timer Interval timer Event counting Toggled output PWM output Interrupts Input capture One-shot output Up-/down-counting Timer 10 Timer 11 Timer 12 Timer 13 ✓ Underflow Underflow Underflow Overflow Com[...]

  • Page 262

    16-bit Timers 11-8 11.5 Description of Registers Table 11-5-1 lists the 16-bit timer registers. Table 11-5-1 List of 16-bit Timer Registers Address Name Symbol Number of bits Initial value Access size x'34001080 Timer 10 mode register TM10MD 16 x'0000 8, 16 x'34001082 Timer 11 mode register TM11MD 8 x'00 8 x'34001084 Timer [...]

  • Page 263

    16-bit Timers 11-9 Timer 10 mode register Register symbol: TM10MD Address: x'34001080 Purpose: This register controls the operation of timer 10. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit TM10 TM10 TM10 TM10 TM10 ––– TM10 TM10 – TM10 – TM10 TM10 TM10 name CNE LDE PME PM1 PM0 TGE ONE CAE CK2 CK1 CK0 Reset 0 0 0 0 0 0 0 0 0 0[...]

  • Page 264

    16-bit Timers 11-10 Bit No. Bit name Description 7 TM10TGE External trigger start enable flag Enables/disables timer start by an external trigger. 0: Disables timer start by an external trigger. (The trigger input is ignored.) 1: Enables timer start by an external trigger. When the specified edge is input to the TM10IOB pin, the TM10CNE flag is set[...]

  • Page 265

    16-bit Timers 11-11 Timer n mode register (n = 11, 12, 13) Register symbol: TMnMD Address: x'34001082 (n=11), x'34001084 (n=12), x'34001086 (n=13) Purpose: This register controls the operation of timer n. B i t N o . 7654321 0 Bit TMn TMn ––– TMn TMn TMn name CNE LDE CK2 CK1 CK0 Reset 0 0 0 0 0 0 0 0 Access R/W R/W R R R R/W R/[...]

  • Page 266

    16-bit Timers 11-12 Timer n base register (n = 11, 12, 13) Register symbol: TMnBR Address: x'34001092 (n=11), x'34001094 (n=12), x'34001096 (n=13) Purpose: This register sets the initial value and the underflow cycle for the timer n binary counter. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit TMn TMn TMn TMn TMn TMn TMn TMn T[...]

  • Page 267

    16-bit Timers 11-13 Timer 10 compare/capture A mode register Register symbol: TM10MDA Address: x'340010B0 Purpose: This register controls the operation of the timer 10 compare/capture A register. This register also sets the waveform that is output to the TM10IOA pin. B i t N o . 7654321 0 Bit TM10 TM10 TM10 TM10 – TM10 TM10 TM10 name AM1 AM0[...]

  • Page 268

    16-bit Timers 11-14 Timer 10 compare/capture B mode register Register symbol: TM10MDB Address: x'340010B1 Purpose: This register controls the operation of the timer 10 compare/capture B register. This register also sets the waveform that is output to TM10IOB pin. B i t N o . 7654321 0 Bit TM10 TM10 TM10 TM10 – TM10 TM10 TM10 name BM1 BM0 BEG[...]

  • Page 269

    16-bit Timers 11-15 Timer 10 compare/capture A register Register symbol: TM10CA Address: x'340010C0 Purpose: This is the timer 10 compare/capture A register. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 name CA15 CA14 CA13 CA12 CA11 CA10 CA9 CA8 CA7 CA6 CA5[...]

  • Page 270

    16-bit Timers 11-16 Timer 10 compare/capture B register Register symbol: TM10CB Address: x'340010D0 Purpose: This is the timer 10 compare/capture B register. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 TM10 name CB15 CB14 CB13 CB12 CB11 CB10 CB9 CB8 CB7 CB6 CB5[...]

  • Page 271

    16-bit Timers 11-17 Prescaler control register Register symbol: TMPSCNT Address: x'34001071 Purpose: This register controls prescaler operations. B i t N o . 7654321 0 Bit TMPS ––––––– name CNE Reset 0 0 0 0 0 0 0 0 Access R/W R R R R R R R Bit No. Bit name Description 6 to 0 — "0" is returned when these bits are read[...]

  • Page 272

    16-bit Timers 11-18 11.6 Description of Operation of Timer 10 This section describes the operation of timer 10. Timer 10 includes an up-counter and two compare/capture registers. The compare/capture registers are independent of each other, and can each be used as either a compare register or a capture register. 11.6.1 Compare Register Settings In o[...]

  • Page 273

    16-bit Timers 11-19 Fig. 11-6-1 Compare Register Operation (When Clock Source = IOCLK) 11.6.2 Capture Register Settings In order to use either the timer 10 compare/capture A register or B register as a capture register, the following settings must be made according to the procedure described below before timer 10 is initialized. The explanation bel[...]

  • Page 274

    16-bit Timers 11-20 If dual-edge was selected, the capture operation is performed when either a rising or falling edge is input. It is not possible to determine which edge was input. (The pin input level cannot be read.) The capture operation can be disabled even while counting is in progress by setting TM10ACE to "0". When TM10CAE is set[...]

  • Page 275

    16-bit Timers 11-21 11.6.3 Pin Output Settings Timer 10 can be used to output a variety of waveforms to the TM10IOA and TM10IOB pins. (1) Setting the output level upon initialization If the TM10LDE flag in the TM10MD register is set to "1", thus initializing timer 10, the output level on the TM10IOA pin is the value that is set for the TM[...]

  • Page 276

    16-bit Timers 11-22 Examples of TM10IOA pin output waveforms are shown below. Output for the TM10IOB pin is similar. Fig. 11-6-3 shows the output waveform for the TM10IOA pin when "Set when TM10BC matches TM10CA, and reset when TM10BC matches TM10CB" is set. If the set and reset conditions occur simultaneously, the reset takes precedence.[...]

  • Page 277

    16-bit Timers 11-23 Fig. 11-6-5 shows the output waveform for the TM10IOA pin when "Set when TM10BC matches TM10CA" is set. Fig. 11-6-5 Pin Output Waveform (3) Fig. 11-6-6 shows the output waveform for the TM10IOA pin when "Reset when TM10BC matches TM10CA" is set. Fig. 11-6-6 Pin Output Waveform (4) Fig. 11-6-7 shows the output[...]

  • Page 278

    16-bit Timers 11-24 11.6.4 Starting by an External Trigger Timer 10 can be started up by input on the TM10IOB pin. Fig. 11-6-8 illustrates the startup operation. The compare/capture A and B registers can be used as compare registers or as capture registers. ■ Procedure for initiating operation (1) Select the input edge on which timer 10 is to sta[...]

  • Page 279

    16-bit Timers 11-25 ■ Procedure for ending operation (1) Disable timer startup by an external trigger. Set TM10TGE in the TM10MD register to "0". (2) Stop the counting operation. Set TM10CNE in the TM10MD register to "0". If TM10TGE and TM10CNE are both set to "0" simultaneously, there is a possibility that TM10CNE w[...]

  • Page 280

    16-bit Timers 11-26 11.6.5 One-shot Operation It is possible to stop timer 10 when TM10BC and TM10CA match. Figs. 11-6-9 and 11-6-10 illustrate the operation that stops timer 10. The compare/capture B register can be used as a compare register or as a capture register. ■ Procedure for initiating operation (1) Set the compare/capture A register mo[...]

  • Page 281

    16-bit Timers 11-27 ■ Procedure for ending operation • When the timer was started by a program (TM10TGE = 0) (1) Stop the counting operation. Set TM10CNE in the TM10MD register to "0". • When the timer was started by an external trigger (TM10TGE = 1) (1) Disable timer startup by an external trigger. Set TM10TGE in the TM10MD registe[...]

  • Page 282

    16-bit Timers 11-28 11.6.6 Interval Timer When using timer 10 as an interval timer, make the settings according to the procedure described below. This interval timer generates a compare/capture A interrupt request on the cycle that is set. (Refer to Figs. 11-6-11 to 11-6-14.) The compare/capture B register can be used as a compare register or as a [...]

  • Page 283

    16-bit Timers 11-29 If the value in the TM10CA register is changed while the counting operation is in progress, the value in the buffer is loaded into the compare register the next time that TM10BC is cleared, and the interrupt cycle is then changed. If the interrupt cycle will be changed while the counting operation is in progress, set TM10CA as a[...]

  • Page 284

    16-bit Timers 11-30 x'0000 x'0001 TM10CA value TM10CA value-1 IOCLK TM10BC value x'0000 x'0001 (TM10CA value + 1) x IOCLK Set value 1 Set value 1 Set value 2 Set value 2 If “double-buffer” is set, the set value is loaded from the buffer at the same time that TM10BC is cleared. Compare/capture A interrupt request Compare/capt[...]

  • Page 285

    16-bit Timers 11-31 11.6.7 Event Counting When using timer 10 as an event counter, make the settings according to the procedure described below. This event counter generates a compare/capture A interrupt when it has counted the specified number of edges. (Refer to Fig. 11-6-15.) The compare/capture B register can be used as a compare register or as[...]

  • Page 286

    16-bit Timers 11-32 Once the counting operation is enabled, TM10BC is incremented each time that the specified edge is input to the TM10IOB pin. Once (value in compare/capture A register + 1) edges are counted, TM10BC is cleared and a compare/capture A register interrupt request is generated. If the value in the TM10CA register is changed while the[...]

  • Page 287

    16-bit Timers 11-33 11.7 Description of Operation of Timers 11, 12, and 13 This section describes the operation of timers 11, 12, and 13. Timers 11, 12, and 13 have built-in registers for setting the initial values, and down-counters. These timers can be used as interval timers and as event counters. 11.7.1 Interval Timer and Timer Output When usin[...]

  • Page 288

    16-bit Timers 11-34 Once the counting operation is enabled, an underflow interrupt request is generated on a regular cycle. In addition, with each interrupt the pin output is inverted and the value in TMnBR is loaded into TMnBC. If the value in the TMnBR register is changed while the counting operation is in progress, this changed value is loaded a[...]

  • Page 289

    16-bit Timers 11-35 Fig. 11-7-2 Interval Timer Operation (When Clock Source = IOCLK) Fig. 11-7-3 Interval Timer Operation (When Using the Prescaler) x'0000 x'0001 TMnBR value TMnBR value -1 IOCLK TMnBC value Timer output (TMnOUT) Count clock TMnBR value -2 Interrupt request signal (TMnIRQ) x'0000 x'0001 TMnBR value TMnBR value -[...]

  • Page 290

    16-bit Timers 11-36 11.7.2 Event Counting When using timer 11, 12, or 13 as an event counter, make the settings according to the procedure described below. ■ Procedure for initiating operation (1) Set the timer division ratio. Set the division ratio in TMnBR. An interrupt request is then generated when the rising edge is counted (value set in TMn[...]

  • Page 291

    16-bit Timers 11-37 [Note] The pin input is sampled according to IOCLK. Input a signal with a pulse width of at least 6, 3, or 1.5 SYSCLK cycles when (MCLK frequency/SYSCLK frequency) = 1, 2, or 4, respectively. Also note that event counting is not possible when IOCLK is stopped (in HALT or STOP mode). Fig. 11-7-4 Event Count Operation x'0001 [...]

  • Page 292

    16-bit Timers 11-38[...]

  • Page 293

    12. Watchdog Timer 11 12[...]

  • Page 294

    Watchdog Timer 12-2 12.1 Overview This microcontroller has a 25-bit binary counter built in that can be used as a 16- to 25-bit watchdog timer. A watchdog timer overflow generates a nonmaskable interrupt, enabling the watchdog timer overflow to be identified. The watchdog timer is also used as an oscillation stabilization wait timer. 12.2 Features [...]

  • Page 295

    Watchdog Timer 12-3 OSCI RST wdovf S Q R Level output/Pulse output selection Oscillation stabilization wait release, interrupt request Reset 1/2 8 1/2 10 1/2 12 1/2 14 1/2 16 STOP mode WDBC WDCTR CKSEL L H CKSEL input “ H ” : PLL is using “ L ” : PLL is not using Clock source selection SYSCLK Internal reset generation Internal reset signal [...]

  • Page 296

    Watchdog Timer 12-4 12.4 Description of Registers Table 12-4-1 lists the watchdog timer registers. Table 12-4-1 List of Watchdog Timer Registers Address Name Symbol Number of bits Initial value Access size x'34004000 Watchdog binary counter WDBC 8 x'00 8 x'34004008 Watchdog timer control register WDCTR 8 x'01 8 x'34004004 R[...]

  • Page 297

    Watchdog Timer 12-5 Watchdog timer control register Register symbol: WDCTR Address: x'34004008 Purpose: This register sets the watchdog timer operation control conditions. Bit No. 7 6 543210 Bit WD WD WD WD - WD WD WD name CNE RST OVT OVF CK2 CK1 CK0 Reset 0 0 000001 Access R/W R/W R/W R R R/W R/W R/W Bit No. Bit name Description 0 WDCK0 Clock[...]

  • Page 298

    Watchdog Timer 12-6 3 — When this bit is read, a "0" is returned. 4 WDOVF The value of the watchdog timer overflow output. 5 WDOVT Watchdog timer overflow output selection 0: Pulse output 1: Level output 6 WDRST Binary counter reset, watchdog timer overflow output (WDOVF flag) reset 0: No reset 1: Reset When a "1" is written t[...]

  • Page 299

    Watchdog Timer 12-7 12.5 Description of Operation Oscillation stabilization wait operation The watchdog timer operates as an oscillation stabilization wait timer after the reset state is released or when the microcontroller recovers from STOP mode (Fig. 12-5-1). The watchdog timer operates in this capacity even if the WDCNE flag is "0". W[...]

  • Page 300

    Watchdog Timer 12-8 Fig. 12-5-2 Operation Diagram 2: When Recovering from STOP Mode Interrupt Stop mode release request (external pin interrupt) Overflow 4.369 ms to 1118.481 ms <Recommended value is 14 ms or longer.> (when CKSEL = “ H ” and the oscillating input frequency is 15 MHz) Oscillation stabilization wait time SYSCLK Internal clo[...]

  • Page 301

    Watchdog Timer 12-9 Watchdog operation If the WDCNE flag is set to "1" and the watchdog operation is enabled, a non-maskable interrupt is generated if a watchdog timer overflow occurs. When an overflow occurs, the watchdog timer overflow output is output to the WDOVF flag. Pulse output or level output can be selected through the WDOVT fla[...]

  • Page 302

    Watchdog Timer 12-10[...]

  • Page 303

    13. Serial Interface 13[...]

  • Page 304

    Serial Interface 13-2 13.1 Overview This microcontroller has three types of internal serial interfaces. One is a general-purpose serial interface for which clock synchronous mode, UART mode, or I2C mode can be specified; this interface supports one channel. The second interface is a clock synchronous serial interface that supports two channels. The[...]

  • Page 305

    Serial Interface 13-3 13.2 General-purpose serial interface 13.2.1 Features Serial interface 0 is a general-purpose serial interface for which clock sync mode, UART mode, or I2C mode can be specified. The features of each mode are described below. <Clock synchronous mode> • Parity None, 0 fixed, 1 fixed, even, odd • Character length 7 bit[...]

  • Page 306

    Serial Interface 13-4 <UART mode> • Parity None, 0 fixed, 1 fixed, even, odd • Character length 7 bits, 8 bits • Transmission and reception bit sequence LSB or MSB selectable • Clock source 1/8 or 1/32 of IOCLK 1/8 of timer 3 or timer 9 underflow 1/8 of external clock • Maximum bit rate 19.2 kbit/s (when IOCLK is 15 MHz) • Error d[...]

  • Page 307

    Serial Interface 13-5 13.2.2 Block Diagram of General-Purpose Serial Interface Fig 13-2-1 shows the block diagram for the general-purpose serial interface section. Fig. 13-2-1 Block Diagram Transmission buffer Shift register Reception buffer read Transmission buffer write Start bit detection Parity bit check Stop bit check Start bit Parity bit addi[...]

  • Page 308

    Serial Interface 13-6 13.2.3 Description of Registers for the General-Purpose Serial Interface The general-purpose serial interface includes the registers listed in Table 13-2-1. These registers are used for settings such as clock source selection, parity bit selection, and protocol selection. Table 13-2-1 List of General-Purpose Serial Interface R[...]

  • Page 309

    Serial Interface 13-7 6 SC0PB2 Parity bit selection (MSB) 000: None 001, 010, 011: Setting prohibited 100: 0 fixed 101: 1 fixed 110: Even (even number of ones) 111: Odd (odd number of ones) 7 SC0CLN Character length selection 0: 7 bits 1: 8 bits 8 SC0TOE SBT0 pin output control 0: When the internal clock is selected, the SBT0 pin is an output only [...]

  • Page 310

    Serial Interface 13-8 Serial 0 interrupt mode register Register symbol: SC0ICR Address: x'34000804 Purpose: This register selects the sources for transmission interrupts and reception interrupts for serial interface 0. B i t N o . 7654321 0 Bit SC0 -- SC0 - SC0 - SC0 name DMD TI RES RI Reset 0 0 0 0 0 0 0 0 Access R/W R R/W R/W R R/W R R/W Bit[...]

  • Page 311

    Serial Interface 13-9 Serial 0 reception buffer Register symbol: SC0RXB Address: x'34000809 Purpose: This register reads in the reception data of serial interface 0. B i t N o . 7654321 0 Bit SC0 SC0 SC0 SC0 SC0 SC0 SC0 SC0 name RXB7 RXB6 RXB5 RXB4 RXB3 RXB2 RXB1 RXB0 Reset 0 0 0 0 0 0 0 0 Access R R R R R R R R Reception data is gotten by rea[...]

  • Page 312

    Serial Interface 13-10 13.2.4 Description of Operation <Clock synchronous mode> ■ Clock synchronous mode connection Two different connection methods are possible, one for unidirectional transfer, and the other for bi-directional transfer. When SBT pin is an output only during transmission (SC0TOE = "0"), it is necessary to pull up[...]

  • Page 313

    Serial Interface 13-11 ■ Clock synchronous mode timing <Transmission> • One-byte transfer with 8-bit data length and parity on Fig. 13-2-3 Timing Chart (1) • Two-byte transfer with 8-bit data length and parity off Fig. 13-2-4 Timing Chart (2) When transmission is enabled, transmission starts when data is written to SC0TXB. Continuous tr[...]

  • Page 314

    Serial Interface 13-12 <Reception> • One-byte transfer with 8-bit data length and parity on Fig. 13-2-5 Timing Chart (3) • Two-byte transfer with 8-bit data length and parity off Fig. 13-2-6 Timing Chart (4) After reception end (when the SC0RBF flag is "1"), the received data is fetched by reading the SC0RXB. In the case of a 7-[...]

  • Page 315

    Serial Interface 13-13 ■ When a reception error is generated • Transfer in clock synchronous mode with 8-bit data length, parity on. Fig. 13-2-7 Timing Chart (5) When "reception end" is set as the reception interrupt source, an interrupt request is generated when reception ends, regardless of whether or not an error occurred. When &qu[...]

  • Page 316

    Serial Interface 13-14 SBO SBI SBT SBO SBI SBT SBO SBI SBO SBI SBT SBT Reception Transmission Transmission/ reception Transmission/ reception External clock External clock Bi-directional transfer Undirectional transfer <UART mode> ■ UART mode connection Two different connection methods are possible, one for unidirectional transfer, and the [...]

  • Page 317

    Serial Interface 13-15 Table 13-2-2 Bit rates (1) (When IOCLK = 15 MHz) Bit rate (bit/s) When cascaded When using prescalers Timer division ratio Bit rate error Timer division ratio Bit rate error 19 200 98 0.35 % Not using — 9 600 195 0.16 % Not using — 4 800 391 0.10 % 195 x 2 0.16 % 2 400 781 0.03 % 195 x 4 0.16 % 1 200 1 563 0.03 % 195 x 8 [...]

  • Page 318

    Serial Interface 13-16 ■ UART mode timing <Transmission> • Transfer with 8-bit data length, parity on, and 1 stop bit Fig. 13-2-9 Timing Chart (6) • Two-byte transfer with 7-bit data length, parity on, and 1 stop bit Fig. 13-2-10 Timing Chart (7) When transmission is enabled, transmission starts when data is written to SC0TXB. Continuou[...]

  • Page 319

    Serial Interface 13-17 <Reception> • Transfer with 8-bit data length, parity on, and 1 stop bit Fig. 13-2-11 Timing Chart (8) • Two-byte transfer with 7-bit data length, parity on, and 1 stop bit Fig. 13-2-12 Timing Chart (9) After reception end (when the SC0RBF flag is "1"), the received data is fetched by reading the SC0RXB. I[...]

  • Page 320

    Serial Interface 13-18 ■ When a reception error is generated • Transfer in UART mode with 8-bit data length, parity on, and 1 stop bit Fig. 13-2-13 Timing Chart (10) When "reception end" is set as the reception interrupt source, an interrupt request is generated when reception ends, regardless of whether or not an error occurred. When[...]

  • Page 321

    Serial Interface 13-19 <I2C mode> ■ I2C mode connection It is possible to connect a device that is capable of slave transmission and slave reception. SDA and SCL require pull-up resistors. Connect pull-up resistors externally. The SBO pin is an open-drain input/output, and the SBT pin is an open drain output. Fig.13-2-14 Connections SBO SBI[...]

  • Page 322

    Serial Interface 13-20 ■ I2C mode transmission/reception The transmission/reception procedure in I2C mode is described below. (Refer to Fig. 13-2-15.) • Make the initial settings as described below. (1) I/O port setting Set the SBT and SBO pins as general-purpose input ports. For details on the settings, refer to the chapter on I/O ports. (2) T[...]

  • Page 323

    Serial Interface 13-21 • Perform data transmission/reception (B) according to the procedure described below: (1) Ack setting "Ack" is represented by the parity bits. Set the parity bit selection flags (SC0PB2 to 0) to "1 fixed" or "0 fixed" in accordance with the communications protocol for the device that is connect[...]

  • Page 324

    Serial Interface 13-22 If the above procedures do not satisfy the AC timing of the device that is connected, send the stop sequence according to the procedure described below. (1)' SBT pin setting Set the SBT pin as a general-purpose input port. When the pin switches to a general-purpose input port, SCL goes high. (2)' SBO pin setting Set[...]

  • Page 325

    Serial Interface 13-23 • Resend the start sequence (D) according to the procedure described below. (Refer to Fig. 13-2-16.) (1) SBO pin setting Set the SBO pin as a general-purpose input port. When the pin switches to a general-purpose input port, SDA goes high. (2) SBT pin setting Set the SBT pin as a general-purpose input port. When the pin swi[...]

  • Page 326

    Serial Interface 13-24 13.3 Clock Synchronous Serial Interface 13.3.1 Features Serial interfaces 1 and 2 are clock synchronous serial interfaces. Their features are described below. • Parity None, 0 fixed, 1 fixed, even, odd • Character length 7 bits, 8 bits • Transmission and reception bit sequence LSB or MSB selectable • Clock source 1/2,[...]

  • Page 327

    Serial Interface 13-25 13.3.2 Block Diagram of Clock Synchronous Serial Interface Fig 13-3-1 shows the block diagram for the clock synchronous serial interface sections. Fig. 13-3-1 Block Diagram Transmission buffer Shift register SBIn SBTn Reception buffer read Transmission buffer write Parity bit check Parity bit addition Transfer clock control I[...]

  • Page 328

    Serial Interface 13-26 13.3.3 Description of Registers for the Clock Synchronous Serial Interface The clock synchronous serial interfaces include the registers listed in Table 13-3-1. These registers are used for settings such as clock source selection, parity bit selection, and protocol selection. Table 13-3-1 List of Clock Synchronous Serial Inte[...]

  • Page 329

    Serial Interface 13-27 Serial n control register (n = 1, 2) Register symbol: SCnCTR Address: x'34000810 (n =1), x'34000820 (n =2) Purpose: This register sets the serial interface n operation control conditions. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit SCn SCn – – – SCn SCn SCn SCn SCn SCn SCn – SCn SCn SCn name TXE RXE[...]

  • Page 330

    Serial Interface 13-28 Bit No. Bit name Description 8 SCnTOE SBTn pin output control 0: When the internal clock is selected, the SBTn pin is an output only while transmission is in progress (the SBTn pin is an input when in standby mode or when an external clock is selected) 1: When the internal clock is selected, the SBTn pin is always an output ([...]

  • Page 331

    Serial Interface 13-29 Serial n interrupt mode register (n = 1, 2) Register symbol: SCnICR Address: x'34000814 (n = 1), x'34000824 (n = 2) Purpose: T his re g ister selects the sources for transmission interrupts and reception interrupts for serial interface n. B i t N o . 7654321 0 Bit SCn –– SCn – SCn – SCn name DMD TI RES RI Re[...]

  • Page 332

    Serial Interface 13-30 Serial n transmission buffer (n = 1, 2) Register symbol SCnTXB Address: x'34000818 (n=1), x'34000828 (n=2) Purpose: This register writes the transmission data to serial interface n. B i t N o . 7654321 0 Bit SCn SCn SCn SCn SCn SCn SCn SCn name TXB7 TXB6 TXB5 TXB4 TXB3 TXB2 TXB1 TXB0 Reset 0 0 0 0 0 0 0 0 Access R/W[...]

  • Page 333

    Serial Interface 13-31 Serial n status register (n=1,2) Register symbol: SCnSTR Address: x'3400081C (n=1), x'3400082C (n=2) Purpose: This register indicates the status of serial interface n. B i t N o . 7654321 0 Bit SCn SCn SCn SCn –– SCn SCn name TXF RXF TBF RBF PEF OEF Reset 0 0 0 0 0 0 0 0 Access R R R R R R R R Bit No. Bit name D[...]

  • Page 334

    Serial Interface 13-32 SBO SBI SBT Transmission SBO SBI SBT Reception SBO SBI SBT Transmission/ reception SBO SBI SBT Transmission/ reception Unidirectional transfer Bi-directional transfer (SCnMD0 = “0”) n = 1 or 2 SBO SBI SBO SBI Bi-directional transfer (SCnMD0 = “1”) n = 1 or 2 SBT SBT Transmission/ reception Transmission/ reception 13.3[...]

  • Page 335

    Serial Interface 13-33 ■ Clock synchronous serial interface timing <Transmission> • One-byte transfer with 8-bit data length and parity off Fig. 13-3-3 Timing Chart (13) • Two-byte transfer with 7-bit data length and parity on Fig. 13-3-4 Timing Chart (14) When transmission is enabled, transmission starts when data is written to SCnTXB.[...]

  • Page 336

    Serial Interface 13-34 <Reception> • One-byte transfer with 7-bit data length and parity on Fig. 13-3-5 Timing Chart (15) • Two-byte transfer with 8-bit data length and parity on Fig. 13-3-6 Timing Chart (16) After reception end (when the SCnRBF flag = “1”), the received data is fetched by reading the SCnRXB. In the case of a 7-bit tr[...]

  • Page 337

    Serial Interface 13-35 ■ When a reception error is generated • Transfer with 7-bit data length, parity on Fig. 13-3-7 Timing Chart (17) When "reception end" is set as the reception interrupt source, an interrupt request is generated when reception ends, regardless of whether or not an error occurred. When "reception end with erro[...]

  • Page 338

    Serial Interface 13-36 13.4 Universal Asynchronous Receiver-Transceiver Serial Interface 13.4.1 Features Serial interface 3 is a UART serial interface. Its features are described below. • Parity None, 0 fixed, 1 fixed, even, odd • Character length 7 bits, 8 bits • Transmission and reception bit sequence LSB or MSB selectable • Clock source [...]

  • Page 339

    Serial Interface 13-37 13.4.2 Block Diagram of UART Serial Interface Fig 13-4-1 shows the block diagram for the UART serial interface sections. Fig. 13-4-1 Block Diagram Transmission buffer Shift register SBO3 SBI3 SBT3 Transmission buffer write Start bit detection Parity bit check Stop bit check Start bit Parity bit addition Stop bit addition Cloc[...]

  • Page 340

    Serial Interface 13-38 13.4.3 Description of Registers for the UART Serial Interface The UART serial interface includes the registers listed in Table 13-4-1. These registers are used for settings such as clock source selection, parity bit selection, and protocol selection. Table 13-4-1 List of UART Serial Interface Registers Address Name Symbol Num[...]

  • Page 341

    Serial Interface 13-39 Serial 3 control register Register symbol: SC3CTR Address: x'34000830 Purpose: This register sets the serial interface 3 operation control conditions. B i t N o . 1 5 1 4 1 3 1 2 1 1 1 0 98765 4 3210 Bit SC3 SC3 SC3 SC3 –– SC3 SC3 SC3 SC3 SC3 SC3 SC3 – SC3 SC3 name TXE RXE BKE TWS OD TWE CLN PB2 PB1 PB0 STB CK1 CK0[...]

  • Page 342

    Serial Interface 13-40 Bit No. Bit name Description 8 SC3TWE Transmission interrupt enable 0: Interrupt disable 1: Interrupt enable 9 SC3OD Transmission and reception bit sequence selection 0: From LSB 1: From MSB 11 to 10 — "0" is returned when this bit is read 12 SC3TWS Transmission interrupt code selection 0: Interrupt when external [...]

  • Page 343

    Serial Interface 13-41 Serial 3 interrupt mode register Register symbol: SC3ICR Address: x'34000834 Purpose: This register selects the sources for transmission interrupts and reception interrupts for serial interface 3. B i t N o . 7654321 0 Bit ––– SC3 – SC3 – SC3 name TI RES RI Reset 0 0 0 0 0 0 0 0 Access R R R/W R/W R R/W R R/W B[...]

  • Page 344

    Serial Interface 13-42 Serial 3 transmission buffer Register symbol: SC3TXB Address: x'34000838 Purpose: This register writes the transmission data of serial interface 3. B i t N o . 7654321 0 Bit SC3 SC3 SC3 SC3 SC3 SC3 SC3 SC3 name TXB7 TXB6 TXB5 TXB4 TXB3 TXB2 TXB1 TXB0 Reset 0 0 0 0 0 0 0 0 Access R/W R/W R/W R/W R/W R/W R/W R/W Data is tr[...]

  • Page 345

    Serial Interface 13-43 Serial 3 status register Register symbol: SC3STR Address: x'3400083C Purpose: This register indicates the status of serial interface 3. Bit No. 7 6 543210 Bit SC3 SC3 SC3 SC3 SC3 SC3 SC3 SC3 name TXF RXF TBF RBF CTS FEF PEF OEF Reset 0 0 000000 Access RRRRRRRR Bit No. Bit name Description 0 SC3OEF Overrun error indicatio[...]

  • Page 346

    Serial Interface 13-44 Serial 3 timer register Register symbol: SC3TIM Address: x'3400083D Purpose: This register sets the timer that is used for internal division for serial interface 3. Bit No. 76543210 Bit – SC3 SC3 SC3 SC3 SC3 SC3 SC3 name TIM6 TIM5 TIM4 TIM3 TIM2 TIM1 TIM0 Reset 00000000 Access R R/W R/W R/W R/W R/W R/W R/W Set the valu[...]

  • Page 347

    Serial Interface 13-45 13.4.4 Description of Operation ■ UART Serial Interface connection Two different connection methods are possible, one for unidirectional transfer, and the other for bi-directional transfer. The SBO pin is always an output, and the SBI pin is always an input. Fig. 13-4-2 Connections ■ UART serial interface bit rate The UAR[...]

  • Page 348

    Serial Interface 13-46 Division ratio 1 = INT (IOCLK frequency / bit rate/127) + 1 Division ratio 2 = INT (IOCLK frequency / bit rate/division ratio 1 + 0.5) Subtract 1 from the value for division ratio 2 that was derived through the above equations, and write the result in SC3TIM. If the value of division ratio 1 is 2 or higher, timer 2 or timer 8[...]

  • Page 349

    Serial Interface 13-47 Table 13-4-3 Bit Rates (2) (When IOCLK = 12 MHz) Bit rate (bit/s) Division ratio 1 Division ratio 2 Bit rate error 230 400 1 52 0.16 % 115 200 1 104 0.16 % 56 000 2 107 0.13 % 38 400 3 104 0.16 % 19 200 5 125 0.00 % 9 600 10 125 0.00 % 4 800 20 125 0.00 % 2 400 40 125 0.00 % 1 200 79 127 0.33 % 600 158 127 0.33 % 300 315 127 [...]

  • Page 350

    Serial Interface 13-48 [Notes on Usage] 1 Set SC3CTR before setting the other registers, and do not change the setting while transmitting or receiving, or while there is data in the transmission buffer. Operation is not guaranteed if the setting of the SC3CTR register is changed. 2 Before writing to the transmission buffer SC3TXB, confirm that the [...]

  • Page 351

    Serial Interface 13-49 ■ UART Serial Interface timing <Transmission> • Transfer with 7-bit data length, parity off, and 2 stop bit Fig. 13-4-3 Timing Chart (18) • Two-byte transfer with 8-bit data length, parity off, and 1 stop bit Fig. 13-4-4 Timing Chart (19) When transmission is enabled, transmission starts when data is written to SC[...]

  • Page 352

    Serial Interface 13-50 <Reception> • Transfer with 7-bit data length, parity on, and 2 stop bit Fig. 13-4-5 Timing Chart (20) • Two-byte transfer with 8-bit data length, parity off, and 1 stop bit Fig. 13-4-6 Timing Chart (21) After reception end (when the SC3RBF flag is "1"), the received data is fetched by reading the SC3RXB. [...]

  • Page 353

    Serial Interface 13-51 ■ When a reception error is generated • Transfer with 7-bit data length, parity on, and 2 stop bit Fig. 13-4-7 Timing Chart (22) When "reception end" is set as the reception interrupt source, an interrupt request is generated when reception ends, regardless of whether or not an error occurred. When "recepti[...]

  • Page 354

    Serial Interface 13-52[...]

  • Page 355

    14. A/D Converter 14[...]

  • Page 356

    A/D Converter 14-2 AN0 AN1 AN2 AN3 S/H AD3BUF AD2BUF AD1BUF AD0BUF VREFH ADTRG 10-bit sequential comparison A/D converter Selector 14.1 Overview The A/D converter is a 10-bit charge redistribution-type A/D converter that can process analog signals on a maximum of four channels. The A/D conversion reference clock can be selected from 1/2, 1/4, 1/8, [...]

  • Page 357

    A/D Converter 14-3 14.2 Features • S/H Built in • Conversion accuracy 10 bits ± 5 LSB (Linearity error) The value of VREFH divided into 1024 steps is stored in AD0BUF to AD3BUF. • Conversion reference clock Selectable from 1/2, 1/4, 1/8, or 1/16 of IOCLK Set this parameter so that one cycle is at least 200 ns. (Example: When IOCLK is 15 MHz,[...]

  • Page 358

    A/D Converter 14-4 14.3 Block Diagram Fig. 14-3-1 The Block Diagram of A/D Converter VREFH 1 2 4 8 16 32 64 128 256 512 ADCTR ADnBUF INC IOCLK 1 AN0 AN1 AN2 AN3 ADTRG Selector Data buffer 10 bit x 4 ch Comparator A/D interrupt request Interrupt generator Divider Shift registers for states A/D conversion trigger Conversion reference clock Conversion[...]

  • Page 359

    A/D Converter 14-5 14.4 Description of Registers Table 14-4-1 lists the registers for this A/D converter. Table 14-4-1 A/D Register List Address Name Symbol Number of bits Initial value Access size x'34000400 A/D conversion control register ADCTR 16 x'0000 8, 16 x'34000410 A/D0 conversion data buffer AD0BUF 16 x'0000 8, 16 x&apo[...]

  • Page 360

    A/D Converter 14-6 7 ADEN Conversion start/execution flag (conversion can be started by writing a "1" to this flag) 0: Conversion stopped 1: Conversion start/in progress 8 ADSC0 Selection of conversion channel when converting any one channel/ indicator of current conversion channel when converting multiple channels (LSB) 9 ADSC1 Selection[...]

  • Page 361

    A/D Converter 14-7 14.5 Description of Operation ■ Operating mode selection (1) Any one channel/one-time conversion If "any one channel/one-time conversion" is selected as the operating mode (ADMD1 to 0), one AN input is converted one time only. Set the conversion channel in the conversion channel selection bits (ADSC1 to 0). (ADMC1 to [...]

  • Page 362

    A/D Converter 14-8 (2) Multiple channels/one-time conversion for each channel If "multiple channels/one-time conversion for each channel" is selected as the operating mode (ADMD1 to 0), a number of AN inputs, starting from AN0, are converted one time only. Set channel 0 in the conversion channel selection bits used for converting any one [...]

  • Page 363

    A/D Converter 14-9 (3) Any one channel/continuous conversion If "any one channel/continuous conversion" is selected as the operating mode (ADMD1 to 0), one AN input is converted continuously. Set the conversion channel in the conversion channel selection bits (ADSC1 to 0). (ADMC1 to 0 are ignored.) An A/D interrupt request is generated ea[...]

  • Page 364

    A/D Converter 14-10 (4) Multiple channels/continuous conversion If "multiple channels/continuous conversion" is selected as the operating mode (ADMD1 to 0), a number of AN inputs, starting from AN0, are converted continuously. Set channel 0 in the conversion channel selection bits used for converting any one channel (ADSC1 to 0), and set [...]

  • Page 365

    A/D Converter 14-11 S/H bp9 bp8 bp7 bp6 bp5 bp4 bp3 bp2 bp1 bp0 S/H bp9 bp8 bp7 bp6 bp5 bp4 bp3 bp2 bp1 bp0 S/H 16 (= 12 +4) cycles ADEN flag Conversion reference clock Status One-time conversion Continuous conversion Sampling cycle • Interrupt request • Write to data buffer Transfer Transfer ■ Conversion reference clock selection, sampling c[...]

  • Page 366

    A/D Converter 14-12 [Notes] If a falling edge is input to the ADTRG pin before the conversion start trigger selection (ADST1 to 0) is switched to "external trigger" ("01"), the ADEN flag is set at the same time that the switch is made, and A/D conversion starts. Fig. 14-5-7 shows an example of a single conversion. In this case, [...]

  • Page 367

    15. I/O Ports 15[...]

  • Page 368

    I/O Ports 15-2 15.1 Overview The MN103001G and MN1030F01K have a total of 13 internal I/O ports: 0 to 9, A, B and C. These ports can all be accessed by programs as internal I/O memory space. Port 0 is a 3-bit general-purpose output port; ports 1, 2, A, and B are 8-bit general-purpose input/output ports; port 3 is a 1-bit general-purpose input/outpu[...]

  • Page 369

    I/O Ports 15-3 Port 7 (P7) This port is also used for address bus signal A23; DRAM RAS signals RAS2 and RAS1; and chip select signals CS3 to CS0. Port 8 (P8) This port is also used for analog signal inputs AN3 to AN0 and external interrupt inputs IRQ7 to I RQ4. Port 9 (P9) This port is also used for extension mode setting signals EXMOD1 and EXMOD0;[...]

  • Page 370

    I/O Ports 15-4 The I/O ports are provided with the registers listed in Table 15-1-1. Table 15-1-1 List of Registers (1/2) Address Name Symbol Number of bits Initial value Access size x'36008000 Port 0 output register P0OUT 8 x'00 8, 16 x'36008001 Port 1 output register P1OUT 8 x'00 8 x'36008004 Port 2 output register P2OUT [...]

  • Page 371

    I/O Ports 15-5 Table 15-1-1 List of Registers (2/2) Address Name Symbol Number of bits Initial value Access size x'36008081 Port 1 pin register P1IN 8 x'XX 8 x'36008084 Port 2 pin register P2IN 8 x'XX 8, 16 x'36008085 Port 3 pin register P3IN 8 x'0X 8 x'36008088 Port 4 pin register P4IN 8 x'XX 8, 16 x'36[...]

  • Page 372

    I/O Ports 15-6 15.2 Port 0 15.2.1 Block Diagram Fig. 15-2-1 and Fig 15-2-2 show block diagrams for port 0. Fig. 15-2-1 Port 0 Block Diagram (P02) Internal data bus P02 P0OUT P02O P... Represents one bit of each register. M P X CAS A22 M P X P02MD P0MD P02S P0SS A23 to A16 Output enable signals Output control Control signal from BC[...]

  • Page 373

    I/O Ports 15-7 Fig. 15-2-2 Port 0 Block Diagram (P01, P00) 15.2.2 Register Descriptions Port 0 is a general-purpose output port that is also used for address bus A [22:20], DRAM CAS signal CAS. Each register for port 0 is described below. Port 0 output register Register symbol: P0OUT Address: x'36008000 Purpose: This register sets the data to [...]

  • Page 374

    I/O Ports 15-8 Port 0 output mode register Register symbol: P0MD Address: x'36008020 Purpose: This register selects the content output on the port 0 pins with P0SS. B i t N o . 7654321 0 Bit name - - - - - P02MD P01MD P00MD Reset 0 0 0 0 0 0 0 0 Access R R R R R R/W R/W R/W Port 0 dedicated output control register Register symbol: P0SS Address[...]

  • Page 375

    I/O Ports 15-9 15.2.3 Pin Configurations Table 15-2-1 shows the pin configurations for port 0. Table 15-2-1 Port 0 Configuration Port Pin P0n P0nMD = "1" P0nMD = "0" No. P02S="1" P02S="0" Port 0 100 P00 General-purpose output port A20 Address output 99 P01 General-purpose output port A21 Address output 97 P02[...]

  • Page 376

    I/O Ports 15-10 15.3 Port 1 15.3.1 Block Diagram Figs. 15-3-1 and 15-3-2 show block diagrams for port 1. Fig. 15-3-1 Port 1 Block Diagram (P17 to P12) Internal data bus M P X P1n (n=7,6,5,4,3,2) P1OUT D7(n=7) to D2(n=2) P1M P1MD P1DIR P1nD P1nO P... Represents one bit of each register. M P X P1PU P1nI P1IN D7 to D0 Output enable signal[...]

  • Page 377

    I/O Ports 15-11 Fig. 15-3-2 Port 1 Block Diagram (P11, and P10) Internal data bus M P X P1OUT P1nO D1(n=1), D0(n=0) P1M P1MD P1DIR P1nD P... Represents one bit of each register. M P X P1PU P1nI P1IN D7 to D0 Output enable signal P1n (n=1,0) RWSEL(n=1), AS(n=0) M P X M P X Address/data multiplex mode Control Signal from BC[...]

  • Page 378

    I/O Ports 15-12 15.3.2 Register Descriptions Port 1 is a general-purpose input/output port that is also used for data bus signals D[7:0], address strobe signal AS, and read/write select RWSEL. Each register for port 1 is described below. Port 1 output register Register symbol: P1OUT Address: x'36008001 Purpose: This register sets the data to b[...]

  • Page 379

    I/O Ports 15-13 Port 1 input/output control register Register symbol: P1DIR Address: x'36008061 Purpose: This register sets the port 1 pins for input or output. (0:input; 1: output) Bit No. 76543210 Bit name P17D P16D P15D P14D P13D P12D P11D P10D Reset 00000000 Access R/W R/W R/W R/W R/W R/W R/W R/W Port 1 output mode register Register symbol[...]

  • Page 380

    I/O Ports 15-14 15.3.3 Pin Configurations Table 15-3-1 shows the pin configurations for port 1. Table 15-3-1 Port 1 Configuration Port Pin P1n P1M = "1" P1M = "0" No. P1nD = "1" P1nD = "0" Port 1 96 P10 General-purpose output port General-purpose input port D0 * 1 Data input/output <<AS>> <<[...]

  • Page 381

    I/O Ports 15-15 15.4 Port 2 15.4.1 Block Diagram Figs. 15-4-1 shows a block diagrams for port 2. Fig. 15-4-1 Port 2 Block Diagram (P27 to P20) Internal data bus M P X P2n (n=7,6,5,4,3,2,1,0) P2OUT D15(n=7) to D8(n=0) P2M P2MD P2DIR P2nD P2nO P... Represents one bit of each register. M P X P2PU P2nI P2IN D15 to D8 output enable signal[...]

  • Page 382

    I/O Ports 15-16 15.4.2 Register Descriptions Port 2 is a general-purpose input/output port that is also used for data bus signals D[15:8]. Each register for port 2 is described below. Port 2 output register Register symbol: P2OUT Address: x'36008004 Purpose: This register sets the data to be output on port 2. Bit No. 76543210 Bit name P27O P26[...]

  • Page 383

    I/O Ports 15-17 Port 2 input/output control register Register symbol: P2DIR Address: x'36008064 Purpose: This register sets the port 2 pins for input or output. (0: input; 1: output) Bit No. 7 6 543210 Bit name P27D P26D P25D P24D P23D P22D P21D P20D Reset 0 0 000000 Access R/W R/W R/W R/W R/W R/W R/W R/W Port 2 output mode register Register s[...]

  • Page 384

    I/O Ports 15-18 15.4.3 Pin Configurations Table 15-4-1 shows the pin configurations for port 2. Table 15-4-1 Port 2 Configuration Port Pin P2n P2M = "1" P2M = "0" No. P2nD = "1" P2nD = "0" Port 2 87 P20 General-purpose output port General-purpose input port D8 * 1 Data input/output 84 P21 General-purpose outp[...]

  • Page 385

    I/O Ports 15-19 15.5 Port 3 15.5.1 Block Diagram Fig. 15-5-1 shows a block diagram for port 3. Fig. 15-5-1 Port 3 Block Diagram (P30) Internal data bus M P X P30 P3OUT P3M P3MD P3DIR P30D P30O P... Represents one bit of each register. M P X P30I P3IN BG[...]

  • Page 386

    I/O Ports 15-20 15.5.2 Register Descriptions Port 3 is a general-purpose input/output port that is also used for the bus grant signal BG. Each register for port 3 is described below. Port 3 output register Register symbol: P3OUT Address: x'36008005 Purpose: This register sets the data to be output on port 3. Bit No. 76543210 Bit name ------- P[...]

  • Page 387

    I/O Ports 15-21 Port 3 output mode register Register symbol: P3MD Address: x'36008025 Purpose: This register selects the content output on the port 3 pin. Bit No. 7 6 543210 Bit name ------- P 3 M Reset 0 0 000001 Access RRRRRRR R / W P3M 0: Bus grant signal output (BG) 1: General-purpose input/output port (P30) Note: When BG is selected in th[...]

  • Page 388

    I/O Ports 15-22 15.6 Port 4 15.6.1 Block Diagram Figs. 15-6-1 to 15-6-4 show block diagrams for port 4. Fig. 15-6-1 Port 4 Block Diagram (P45 and P43) P4n (n=5,3) Internal data bus P4OUT P4nI P4IN P4nM P4MD P4DIR P4nD P4nO P... Represents one bit of each register. P4nS P4SS M P X M P X DWE(n=5), DCAS0(n=3) SBO1(n=5), SBT1(n=3) SBO1(n=5), SBT1(n=3) [...]

  • Page 389

    I/O Ports 15-23 Fig. 15-6-2 Port 4 Block Diagram (P44) Internal data bus P44 P4OUT P44I P4IN P44M P4MD P4DIR P44D P44O P... Represents one bit of each register. P44S P4SS M P X M P X DCAS1 SBI1 M P X Control signal from BC[...]

  • Page 390

    I/O Ports 15-24 Fig. 15-6-3 Port 4 Block Diagram (P42, P40) Fig. 15-6-4 Port 4 Block Diagram (P41) Internal data bus P4n (n=2,0) P4OUT P4DIR P4nD P4nO P... Represents one bit of each register. M P X M P X P4nI P4IN P4nM P4MD SBO0(n=2), SBT0(n=0) SBO0 output enable(n=2), SBT0 output enable (n=0) SBO0(n=2), SBT0(n=0) Internal data bus P... Represents[...]

  • Page 391

    I/O Ports 15-25 15.6.2 Register Descriptions Port 4 is a general-purpose input/output port that is also used for serial interface input/output signals SBI1, SBO1, SBT1, SBI0, SBO0, and SBT0; the DRAM CAS signals (for 2CAS) DCAS1 and DCAS0; and the DRAM write signal (for 2CAS) DWE. Each register for port 4 is described below. Port 4 output register [...]

  • Page 392

    I/O Ports 15-26 Port 4 input/output control register Register symbol: P4DIR Address: x'36008068 Purpose: This register sets the port 4 pins for input or output. (0: input; 1: output) Bit No. 76543210 Bit name - - P45D P44D P43D P42D P41D P40D Reset 00000000 Access R R R/W R/W R/W R/W R/W R/W Port 4 output mode register Register symbol: P4MD Ad[...]

  • Page 393

    I/O Ports 15-27 Port 4 dedicated output control register Register symbol: P4SS Address: x'36008048 Purpose: Along with P4MD, this register selects the content output on the port 4 pins. Bit No. 7 6 543210 Bit name - - P45S P44S P43S - - - Reset 0 0 000000 Access R R R/W R/W R/W R R R P45M; P45S 00: Serial 1 data input/output (SBO1) * The input[...]

  • Page 394

    I/O Ports 15-28 15.6.3 Pin Configurations Table 15-6-1 shows the pin configurations for port 4. Table 15-6-1 Port 4 Configuration Port Pin P4n P4nM = "1" P4nM = "0" No. P4nD = "1" P4nD = "0" P4nS = "1" P4nS = "0" Port 4 75 P40 General-purpose General-purpose SBT0 *1 Serial 0 transfer clock[...]

  • Page 395

    I/O Ports 15-29 15.7 Port 5 15.7.1 Block Diagram Figs. 15-7-1 to 15-7-5 show block diagrams for port 5. Fig. 15-7-1 Port 5 Block Diagram (P55) Internal data bus P5OUT P55O TM13IO M P X P55 M P X P... Represents one bit of each register. P55I P5IN TM13IO/TM5IO TM5IO P5DIR P55D P55M P5MD P55S P5SS M P X SBO3[...]

  • Page 396

    I/O Ports 15-30 Fig. 15-7-2 Port 5 Block Diagram (P54) Internal data bus P5OUT P54O TM12IO M P X P54 M P X P... Represents one bit of each register. P54I P5IN TM12IO/TM4IO/SBI3 TM4IO P5DIR P54D M P X P54M P5MD P54S P5SS[...]

  • Page 397

    I/O Ports 15-31 Fig. 15-7-3 Port 5 Block Diagram (P53) Internal data bus P5OUT P53O TM11IO M P X P53 M P X P... Represents one bit of each register. P53I P5IN TM11IO/TM3IO/SBT3 TM3IO P5DIR P53D M P X P53M P5MD P53S P5SS[...]

  • Page 398

    I/O Ports 15-32 Fig. 15-7-4 Port 5 Block Diagram (P52, P50) P5n (n=2,0) Internal data bus P5OUT P5DIR P5nD P5nO P... Represents one bit of each register. M P X M P X TM2IO(n=2), SBO2(n=2), SBO2 output enable (n=2), SBT2 output enable (n=0) M P X P5nI P5IN TM2IO/SBO2(n=2), TM0IO/SBT2(n=0) TM0IO(n=0) SBT2(n=0) P5nM P5MD P5nS P5SS[...]

  • Page 399

    I/O Ports 15-33 Fig. 15-7-5 Port 5 Block Diagram (P51) Internal data bus TM1IO P5OUT P51O M P X TM1IO/SBI2 P51 P... Represents one bit of each register. P51I P5IN P5DIR P51D M P X P51M P5MD P51S P5SS[...]

  • Page 400

    I/O Ports 15-34 15.7.2 Register Descriptions Port 5 is a general-purpose input/output port that is also used for the serial interface input/output signals SBI3, SBO3, SBT3, SBI2, SBO2, SBT2; and the timer input/output signals TM13IO, TM12IO, TM11IO, TM5IO, TM4IO, TM3IO, TM2IO, TM1IO, and TM0IO. Each register for port 5 is described below. Port 5 ou[...]

  • Page 401

    I/O Ports 15-35 P ort 5 input/output control register Register symbol: P5DIR Address: x'36008069 Purpose: This register sets the port 5 pins for input or output. (0: input; 1: output) B i t N o . 7654321 0 Bit name - - P55D P54D P53D P52D P51D P50D Reset 0 0 0 0 0 0 0 0 Access R R R/W R/W R/W R/W R/W R/W Port 5 output mode register Register sy[...]

  • Page 402

    I/O Ports 15-36 Port 5 dedicated output control register Register symbol: P5SS Address: x'36008049 Purpose: Along with P5MD, this register selects the content output on the port 5 pins. Bit No. 76543210 Bit name - - P55S P54S P53S P52S P51S P50S Reset 00111111 Access R R R/W R/W R/W R/W R/W R/W P55M; P55S 00: Serial 3 data output (SBO3) 01: Ti[...]

  • Page 403

    I/O Ports 15-37 15.7.3 Pin Configurations Table 15-7-1 shows the pin configurations for port 5. Table 15-7-1 Port 5 Configuration Port Pin P5n P5nM = "1" P5nM = "0" No. P5nS = "1" P5nS = "0" P5nS = "1" P5nS = "0" P5nD = "1" P5nD = "0" P5nD ="1" P5nD ="0&q[...]

  • Page 404

    I/O Ports 15-38 15.8 Port 6 15.8.1 Block Diagram Figs. 15-8-1 shows the block diagrams for port 6. Fig. 15-8-1 Port 6 Block Diagram (P63 to P60) Internal data bus P6OUT P6nO M P X P6n (n=3,2,1,0) P6DIR P6nD P... Represents one bit of each register. P6nI P6IN P6nM P6MD TM10IOB(n=3), TM10IOA(n=2), TM7IO(n=1), TM6IO(n=0) ADTRG/IRQ3/TM10IOB(n=3), IRQ2/[...]

  • Page 405

    I/O Ports 15-39 15.8.2 Register Descriptions Port 6 is a general-purpose input/output port that is also used for external interrupt inputs IRQ3 to IRQ0; the timer input/output signals TM6IO, TM7IO, TM10IOA, TM10IOB; and the A/D conversion trigger input ADTRG. Each register for port 6 is described below. Port 6 output register Register symbol: P6OUT[...]

  • Page 406

    I/O Ports 15-40 Port 6 output mode register Register symbol: P6MD Address: x'3600802C Purpose: This register selects the content output on the port 6 pins. Bit No. 76543210 Bit name ---- P63M P62M P61M P60M Reset 00001111 Access RRRR R / W R / W R / W R / W When P6nM is "0", the timer input/output signal is selected. The input/output[...]

  • Page 407

    I/O Ports 15-41 15.9 Port 7 15.9.1 Block Diagram Fig. 15-9-1 and Fig. 15-9-2 show block diagrams for port 7. Fig. 15-9-1 Port 7 Block Diagram (P73) Fig. 15-9-2 Port 7 Block Diagram (P72 to P70) Internal data bus P7OUT P7nO M P X P7n (n=2,1,0) P7MD P... Represents one bit of each register. P7nM CS2/RAS2(n=2), Control signal from BC CS1/RAS1(n=1), CS[...]

  • Page 408

    I/O Ports 15-42 15.9.2 Register Descriptions Port 7 is a general-purpose output port that is also used for address bus signal A23, DRAM RAS signals RAS2 and RAS1, chip select signals CS3 to CS0. Each register for port 7 is described below. Port 7 output register Register symbol: P7OUT Address: x'3600800D Purpose: This register sets the data to[...]

  • Page 409

    I/O Ports 15-43 Port 7 dedicated output control register Register symbol: P7SS Address: x'3600804D Purpose: This register selects the content output on the port 7 pins. Valid when the P7nM is “0”. Bit No. 7 6 543210 Bit name ---- P73S - - - Reset 0 0 000000 Access RRRR R / W RRR P73M; P73S 00: Chip select signal 3 output (CS3) 01: Address [...]

  • Page 410

    I/O Ports 15-44 15.9.3 Pin Configurations Table 15-9-1 shows the pin configurations for port 7. Table 15-9-1 Port 7 Configuration Port Pin P7n P7nM = "1" P7nM = "0" No. P73S = "1" P73S = "0" Port 7 55 P70 General-purpose output port CS0 Chip select signal 0 output 53 P71 General-purpose output port CS1 Chip s[...]

  • Page 411

    I/O Ports 15-45 15.10 Port 8 15.10.1 Block Diagram Figs. 15-10-1 shows the block diagrams for port 8. Fig. 15-10-1 Port 8 Block Diagram (P83 to P80) Internal data bus P8n (n=3,2,1,0) P... Represents one bit of each register. AN3(n=3) to AN0(n=0) P8nA P8AD P8nI P8IN IRQ7(n=3) to IRQ4(n=0)[...]

  • Page 412

    I/O Ports 15-46 15.10.2 Register Descriptions Port 8 is a general-purpose input port that is also used for analog signal inputs AN3 to AN0 and external interrupt inputs IRQ7 to IRQ4. Each register for port 8 is described below. Port 8 analog/digital input control register Register symbol: P8AD Address: x'36008030 Purpose: This register selects[...]

  • Page 413

    I/O Ports 15-47 15.10.3 Pin Configurations Table 15-10-1 shows the pin configurations for port 8. Table 15-10-1 Port 8 Configuration Port Pin No. P8n P8nA = "0" P8nA = "1" Port 8 48 P80 General-purpose input port AN0 Analog signal input 47 P81 General-purpose input port AN1 Analog signal input 46 P82 General-purpose input port A[...]

  • Page 414

    I/O Ports 15-48 15.11 Port 9 15.11.1 Block Diagram Fig. 15-11-1 to Fig. 15-11-4 show block diagrams for port 9. Fig. 15-11-1 Port 9 Block Diagram (P97) Fig. 15-11-2 Port 9 Block Diagram (P96) Internal data bus P9OUT P97O M P X P97 P... Represents one bit of each register. P97M P9MD SYSCLK Internal data bus P... Represents one bit of each register. [...]

  • Page 415

    I/O Ports 15-49 Fig. 15-11-3 Port 9 Block Diagram (P95, P91, P90) Fig. 15-11-4 Port 9 Block Diagram (P94, P93, P92) Internal data bus P... Represents one bit of each register. P9OUT P9nO P9n (n=5,1,0) P9DIR P9nD P9nI P9IN P9nM P9MD DK (n=5), EXMOD1 (n=1), EXMOD0 (n=0) Internal data bus P9OUT P9nO M P X P9n (n=4,3,2) P9MD P... Represents one bit of [...]

  • Page 416

    I/O Ports 15-50 15.11.2 Register Descriptions Port 9 is also used for extension mode setting signals EXMOD1 and EXMOD0; memory write signals WE1 and WE0; memory read signal RE; bus authority request signal BR; data acknowledge signal DK; and system clock SYSCLK. P96, P95, P91, and P90 are general-purpose input/output ports, and P97 and P94 to P92 a[...]

  • Page 417

    I/O Ports 15-51 Port 9 output mode register Register symbol: P9MD Address: x'36008031 Purpose: This register selects the content output on the port 9 pins. Bit No. 76543210 Bit name P97M P96M P95M P94M P93M P92M P91M P90M Reset 01100000 Access R/W R/W R/W R/W R/W R/W R/W R/W P97M 0: System clock output (SYSCLK) 1: General-purpose output port ([...]

  • Page 418

    I/O Ports 15-52 15.11.3 Pin Configurations Table 15-11-1 shows the pin configurations for port 9. Table 15-11-1 Port 9 Configuration Port Pin P9n P9nM = "1" P9nM = "0" No. P9nD = "1" P9nD = "0" Port 9 43 P90 General-purpose output port General-purpose input port EXMOD0 Extension mode setting input 0 42 P91 Ge[...]

  • Page 419

    I/O Ports 15-53 15.12 Port A 15.12.1 Block Diagram Fig. 15-12-1 shows a block diagram for port A. Fig. 15-12-1 Port A Block Diagram (PA7 to PA0) Internal data bus M P X PAn (n=7,6,5,4,3,2,1,0) PAOUT A7(n=7) to A0(n=0) PAM PAMD PADIR PAnD PAnO P... Represents one bit of each register. M P X PAPU PAnI PAIN A7 to A0 Output enable signal ADM7(n=7) to A[...]

  • Page 420

    I/O Ports 15-54 15.12.2 Register Descriptions Port A is a general-purpose input/output port that is also used for address bus signals A[7:0], and address/ data signals ADM[7:0]. Each register for port A is described below. Port A output register Register symbol: PAOUT Address: x'36008014 Purpose: This register sets the data to be output on por[...]

  • Page 421

    I/O Ports 15-55 Port A input/output control register Register symbol: PADIR Address: x'36008074 Purpose: This register sets the port A pins for input or output. Valid when the PAM is "1". (0: input; 1: output) Bit No. 76543210 Bit name PA7D PA6D PA5D PA4D PA3D PA2D PA1D PA0D Reset 00000000 Access R/W R/W R/W R/W R/W R/W R/W R/W Port [...]

  • Page 422

    I/O Ports 15-56 15.12.3 Pin Configurations Table 15-12-1 shows the pin configurations for port A. Table 15-12-1 Port A Configuration Port Pin PAn PAM = "1" PAM = "0" No. PAnD = "1" PAnD = "0" Port A 24 PA0 General-purpose General-purpose A0 Address output output port input port <<ADM0>> * 1 <&l[...]

  • Page 423

    I/O Ports 15-57 15.13 Port B 15.13.1 Block Diagram Fig. 15-13-1 shows a block diagram for port B. Fig. 15-13-1 Port B Block Diagram (PB7 to PB0) Internal data bus M P X PBn (n=7,6,5,4,3,2,1,0) PBOUT A15 (n=7) to A8 (n=0) PBM PBMD PBDIR PBnD PBnO P... Represents one bit of each register. M P X PBPU PBnI PBIN A15 to A8 output enable signal ADM15 (n=7[...]

  • Page 424

    I/O Ports 15-58 15.13.2 Register Descriptions Port B is a general-purpose input/output port that is also used for address bus signals A[15:8], and address/ data signals ADM[15:8]. Each register for port B is described below. Port B output register Register symbol: PBOUT Address: x'36008015 Purpose: This register sets the data to be output on p[...]

  • Page 425

    I/O Ports 15-59 Port B input/output control register Register symbol: PBDIR Address: x'36008075 Purpose: This register sets the port B pins for input or output. Valid when PBM is "1". (0: input; 1: output) Bit No. 7 6 543210 Bit name PB7D PB6D PB5D PB4D PB3D PB2D PB1D PB0D Reset 0 0 000000 Access R/W R/W R/W R/W R/W R/W R/W R/W Port [...]

  • Page 426

    I/O Ports 15-60 15.13.3 Pin Configurations Table 15-13-1 shows the pin configurations for port B. Table 15-13-1 Port B Configuration Port Pin PBn PBM = "1" PBM = "0" No. PBnD = "1" PBnD = "0" Port B 14 PB0 General-purpose General-purpose A8 Address output output port input port <ADM8>> * 1 <<Ad[...]

  • Page 427

    I/O Ports 15-61 15.14 Port C 15.14.1 Block Diagram Fig. 15-14-1 shows a block diagram for port C. Fig. 15-14-1 Port C Block Diagram (PC3 to PC0) Internal data bus M P X PCn (n=3,2,1,0) PCOUT PCnM PCMD PCnO M P X A23 to A16 Output enable signal A19 (n=3) to A16(n=0) P... Represents one bit of each register.[...]

  • Page 428

    I/O Ports 15-62 15.14.2 Register Descriptions Port C is a general-purpose output port that is also used for address bus signals A[19:16]. Each register for port C is described below. Port C output register Register symbol: PCOUT Address: x'36008018 Purpose: This register sets the data to be output on port C. Bit No. 76543210 Bit name ---- PC3O[...]

  • Page 429

    I/O Ports 15-63 15.14.3 Pin Configurations Table 15-14-1 shows the pin configurations for port C. Table 15-14-1 Port C Configuration Port Pin No. PCn PCnM = "1" PCnM = "0" Port C 5 PC0 General-purpose output port A16 Address output 4 PC1 General-purpose output port A17 Address output 2 PC2 General-purpose output port A18 Address[...]

  • Page 430

    I/O Ports 15-64 15.15 Treatment of Unused Pins Unused pins should be treated as shown in Table 15-15-1 below. Table 15-15-1 Treatment of Unused Pins Pin name Treatment Set as port and leave open. Either set as input port and connect to VDD or VSS via individual resistors (or else use the built-in pull-up resistance by setting the register appropria[...]

  • Page 431

    16. Internal Flash Memory 16[...]

  • Page 432

    Internal Flash Memory 16-2 16.1 Overview The MN1030F01K has 256 KB of internal flash memory for use as instruction memory in place of instruction ROM. Using flash memory makes it easy to make changes to a stored program, which makes it possible to reduce program development time and permits the creation of a highly flexible system. 16.2 Features Th[...]

  • Page 433

    Internal Flash Memory 16-3 16.4 Flash Memory Overwrite Mode and Settings There are two flash memory overwrite modes: flash memory mode and on-board write mode. Table 16-4-1 lists the mode settings through the external pins. Flash memory mode is used to overwrite the internal flash memory with a ROM writer. In this mode, the flash memory inputs and [...]

  • Page 434

    Internal Flash Memory 16-4 16.5 Flash Memory Mode 16.5.1 Description of External Pins Fig. 16-5-1 and Table 16-5-1 show the pin assignments for the MN1030F01K in flash memory mode. Fig. 16-5-1 MN1030F01K Pin Assignments in Flash Memory Mode TOP VIEW 100 Pin QFP 76 77 78 79 80 81 82 84 85 86 87 88 89 90 91 92 93 94 95 83 96 97 98 99 100 NROMRST PD15[...]

  • Page 435

    Internal Flash Memory 16-5 Table 16-5-1 MN1030F01K Pin Assignments I: Input; O: Output; I/O: Input/output; H: High level input; L: Low level input Pin No. Pin Name I/O Pin No. Pin Name I/O Pin No. Pin Name I/O Pin No. Pin Name I/O 1 TEST1 L 26 PVSS 51 — O 76 NROMRST I 2 TEST0 L 27 PVDD 52 — O 77 PD15 I/O 3 VDD 28 MMOD1 H 53 — O 78 PD14 I/O 4 [...]

  • Page 436

    Internal Flash Memory 16-6 Table 16-5-2 lists the functions of the external pins in flash memory mode. Table 16-5-2 Pin Functions When first applying power, it is necessary to input a signal that is low for at least 1 ms to the reset pin NROMRST. Pin Name Input/Output Description PA[17:1] Input Address PD[15:0] Input/Output Data NCE Chip enable MOD[...]

  • Page 437

    Internal Flash Memory 16-7 16.5.2 Erasure Blocks The flash memory is partitioned into 32 8 KB erasure blocks. Fig. 16-5-2 shows the configuration of the flash memory erasure blocks and their correspondence with each of the bits in the erasure block registers that are used to specify which blocks to erase. After setting the erasure block registers i[...]

  • Page 438

    Internal Flash Memory 16-8 16.6 On-board Write Mode In on-board write mode, flash memory is overwritten by manipulating the control registers through software. Table 16-6-1 lists the control registers to be used in on-board write mode. Table 16-6-1 Flash Memory Register List *1: FLMODR[3:0] uses the values of MMOD1 and 0 and EXMOD1 and 0, and FLMOD[...]

  • Page 439

    17 17. Ordering Mask ROM[...]

  • Page 440

    Ordering Mask ROM 17-2 17.1 Overview This chapter describes the procedure for ordering mask ROM. This chapter also describes the difference in programming when using a product that has on-chip flash memory versus a mask product, and explains how to order ROM, etc. 17.2 Procedure for Ordering ROM When program development with a product that has on-c[...]

  • Page 441

    Ordering Mask ROM 17-3 Fig. 17-2-2 ROM Ordering Method 2 x'40000000 x'40000000 x'40002000 User program User program Loader program 8 KB x'40002000 x'40000008 JMP x'40002000 JMP x'40002008 8 KB (When the user program starts in x'40002000 and the non-maskable interrupt processing routine starts in x'400020[...]

  • Page 442

    Ordering Mask ROM 17-4[...]

  • Page 443

    Appendix[...]

  • Page 444

    Appendix Appendix-2 Appendix A. Register Map List 0 IVAR0 MEMCTR0B MEMCTR1B MEMCTR2B MEMCTR3B x'3200004X x'3200400X x'3400010X x'3400011X x'3400012X x'3400014X G3ICR G2ICR NMICR x'3400020X G7ICR G6ICR G4ICR G5ICR x'3400028X G11ICR G10ICR G8ICR G9ICR x'3400040X G15ICR G14ICR G12ICR G13ICR x'3400041X [...]

  • Page 445

    Appendix Appendix-3 TMOSL TM10 MDA TM0 MD TM0 BR TM0 BC SC1CTR SC0CTR x'3400080X x'3400082X x'3400083X x'3400081X SC3CTR SC2CTR SC0 ICR SC1 ICR SC2 ICR SC3 ICR SC0 TXB SC1 TXB SC2 TXB SC3 TXB SC0 RXB SC1 RXB SC2 RXB SC3 RXB SC1 STR SC2 STR SC3 STR SC3 TIM SC0STR 0 x'3400102X x'3400103X x'3400108X x'3400109X x[...]

  • Page 446

    Appendix Appendix-4 F E D C B A 9 8 7 6 5 4 3 2 1 0 x'3600800X Address I/O port P1OUT P9OUT P0MD P1MD P8AD P0SS P1DIR P8IN P9IN P9DIR x'3600801X x'3600802X x'3600803X x'3600804X x'3600805X x'3600806X x'3600807X x'3600808X x'3600809X P0OUT P3OUT PAOUT P2OUT P2MD P3MD PAMD PBMD P5SS P2DIR P3DIR P2IN P[...]

  • Page 447

    Appendix Appendix-5 Appendix B. Instruction Set List of Instructions ( Code Length, Execution Cycle*) Execution cycle is defined under the following conditions: (1) No pipeline hazard (2) 2-cycle of instruction fetch, 1-cycle of data load/store Instruction Source Destination Format Remarks MOV MOV D m Dn S 0 1 1 MOV D m A n D0 2 1 MOV A m Dn D0 2 1[...]

  • Page 448

    Appendix Appendix-6 Instruction Source Destination Format Remarks MOVBU MOVBU ( A m ) Dn D0 2 1 MOVBU (d8,Am) D n D 1 3 1 MOVBU (d16,Am) Dn D2 4 1 MOVBU (d32,Am) Dn D4 6 2 MOVBU (d8,SP) Dn D1 3 1 MOVBU (d16,SP) D n D2 4 1 MOVBU (d32,SP) D n D4 6 2 MOVBU (D i ,A m) Dn D0 2 1 MOVBU (abs16) Dn S 2 3 1 MOVBU (abs32) Dn D4 6 2 MOVBU D m ( A n ) D0 2 1 M[...]

  • Page 449

    Appendix Appendix-7 Instruction Source Destination Format Remarks MOV M 4 Registers specified by regs = 4 8 Registers specified by regs = 7 9 Registers specified by regs = 8 10 Registers specified by regs = 9 11 Registers specified by regs = 10 12 Registers specified by regs = 11 CLR CLR Dn S 0 1 1 ADD ADD D m Dn S 0 1 1 ADD D m A n D0 2 1 AD D A m[...]

  • Page 450

    Appendix Appendix-8 * Varies according to the state of the instruction buffer. Code length Execution Cycle Instruction Source D estination Format Remarks AND AND D m D n D 0 2 1 A N D im m 8 Dn D1 3 1 A N D imm16 D n D 2 4 1 A N D imm32 D n D 4 6 2 A N D imm16 P S W D 2 4 1 OR OR Dm D n D 0 2 1 O R i mm 8 Dn D1 3 1 O R imm16 D n D 2 4 1 O R imm32 D[...]

  • Page 451

    Appendix Appendix-9 Instruction Source Destination Format Remarks SETLB SETLB S 0 1 1 J M P J M P (An) D 0 2 3 J MP (d16,PC) S 2 3 2 J MP (d32,PC) S 4 5 4 CALL CALL (d16,PC) regs,imm8 S 4 5 2 Registers specified by regs = 0 3 Registers specified by regs = 1 4 Registers specified by regs = 2 5 Registers specified by regs = 3 6 Registers specified by[...]

  • Page 452

    Appendix Appendix-10 List of Extension Instructions ( Code Length, Execution Cycle) Instruction Source Destination Format Code length Execution cycle Remarks PUTX PUTX Dm D 0 2 2 PUTCX Dm D n D 0 2 2 GETX GETX D n D 0 2 2 GETCHX D n D 0 2 2 GETCLX D n D 0 2 2 CLRMAC CLRMAC D0 2 2 MULQ MULQ Dm D n D 0 2 4 Dm is a value which can be expressed with 2 [...]

  • Page 453

    Appendix Appendix-11 Appendix C. Memory Connection Example Fig. C-1 shows a connection example for the memory configuration described below. Block 0: 16-bit bus, 4-Mbit ROM (262 144 words x 16 bits) Block 1: 16-bit bus, 4-Mbit DRAM (262 144 words x 16 bits, 2 CAS control) Block 2: 8-bit bus, 1-Mbit SRAM (131 072 words x 8 bits) Fig. C-1 Memory Conn[...]

  • Page 454

    Appendix Appendix-12 Appendix D. Pins and Their Operating Statuses upon Reset In the address/data separate mode Pin No. Pin name Operating status 1 A19 L 26 PVSS — 51 CS3 H 76 P30 Hi-Z 2 A18 L 27 PVDD — 52 CS2 H 77 D15 Pull-Up 3 VDD — 28 MMOD1 Input 53 CS1 H 78 D14 Pull-Up 4 A17 L 29 MMOD0 Input 54 VDD — 79 VDD — 5 A16 L 30 RST Input 55 C[...]

  • Page 455

    Appendix Appendix-13 Note 1) Hi-Z: High impedance H: High level output L: Low level output Pull-up: Pull-up Input: Input an appropriate value. Note 2) The pin marked with an asterisk is VDD2 in the MN103001G, and VPP in the MN1030F01K. In the address/data multiplex mode Pin No. Pin name Operating status 1 A19 L 26 PVSS — 51 CS3 H 76 P30 Hi-Z 2 A1[...]

  • Page 456

    Appendix Appendix-14 Appendix E. Package Outline The package outline and dimensions of this microcontroller are shown below. Package code : LQFP100-P-1414 Unit: mm Fig. E-1 Package Outline 16.00 ± 0.20 16.00 ± 0.20 14.00 ± 0.10 14.00 ± 0.10[...]

  • Page 457

    Errors Page Corrections Page - i - P.1-3 P.1-8 P.2-9 P.2-13 P.2-14 P.2-15 P.2-15 P.2-17 P.2-18 P.2-18 P.2-18 P.2-19 P.2-19 P.2-20 P.3-5 P.3-7 P.1-3 P.1-8 P.2-9 P.2-13 P.2-14 P.2-15 P.2-15 P.2-17 P.2-18 P.2-18 P.2-18 P.2-19 P.2-19 P.2-20 P.3-5 P.3-7 - External interrupts: 9 sources (8 individual IRQs, and 1 external NMI) _________ ( The column of &q[...]

  • Page 458

    Errors Page Corrections Page - ii - P.3-8 P.3-9 P.3-10 P.3-21 P.3-22 P.3-23 P.3-23 P.3-24 P.3-25 P.3-25 P.3-26 P.3-26 P.3-27 P.3-29 ( Following sentences are added to [Programming Cautions] of GETCHX. ) When "udf12 Dm, Dn" is operated, Dm is ignored. The operations of "udf12 imm8, Dn", "udf12 imm16, Dn" and "udf12[...]

  • Page 459

    Errors Page Corrections Page - iii - (Omit) Note that operation is not assured when attempting to access unmounted space. Note that operation is not assured when attempting to access unmounted space. (The 2nd line of " ■ Operation of various peripheral functions in the low power consumption modes". ) In SLEEP mode, all peripheral functi[...]

  • Page 460

    Errors Page Corrections Page - iv - P.6-3 P.6-3 P.6-4 P.8-5 P.8-11, P.8-15 P.8-15, P.8-20 P.8-35 P.8-35 P.8-36 P.8-41 P.6-3 P.6-3 P.6-4 P.8-5 P.8-11, P.8-15 P.8-15, P.8-20 P.8-35 P.8-35 P.8-36 P.8-41 When the reset state is released, SYSCLK, MCLK, and IOCLK are supplied starting after a certain oscillation stabilization wait time. Note: For details[...]

  • Page 461

    Errors Page Corrections Page - v - P.8-42 P.8-43 to P.8-44 P.8-48 P.8-49 P.8-49 P.8-50 P.8-56 P.8-57 P.8-58 P.8-59 - P.8-42 P.8-43 to P.8-44 P.8-48 P.8-49 P.8-49 P.8-50 P.8-56 P.8-57 P.8-58 P.8-59 P.8-73 to P.8-74 ____ (In figure 8-13-13 (a) and (b), the DK signal asserted by the low- order side access was changed so as to be negated before the hig[...]

  • Page 462

    Errors Page Corrections Page - vi - P.9-3 P.9-7 P.9-7 P.9-7 P.9-7 P.9-7 P.9-8 P.9-30 P.9-30 P.11-6 P.12-2 P.12-2 P.12-2 (In fig. 9-4-1.) (Register's purpose ) This register determines whether an NMI interrupt has been generated. Bit name Description NMIF External NMI request flag (From 1st line of main sentence) Each flag is set if the corresp[...]

  • Page 463

    Errors Page Corrections Page - vii - (In the table of Example.) (The 2nd line from the bottom.) An oscillation stabilization wait time of at least 14 ms is recommended. (In fig.12-5-2.) 4.369 ms to 1118.481 ms <Recommended value is 14 ms or longer.> (Addition of the following note in the description of Bit No.3.) Note: When P83A of the port 8[...]

  • Page 464

    (All of the series name in this manual is changed as shown below: • "MN10300 Series" is changed the name into "MN1030 Series". • "MN10200 Series" is changed the name into "MN102 Series". ) (Del eted.) If you have any inquiries or questions about this book or our semiconductors, please contact one of our s[...]

  • Page 465

    MN103001G/F01K LSI User's Manual February, 2002 5th Edition Issued by Matsushita Electric Industrial Co., Ltd. © Matsushita Electric Industrial Co., Ltd.[...]

  • Page 466

    Semiconductor Company, Matsushita Electric Industrial Co., Ltd. Nagaokakyo, Kyoto 617-8520, Japan Tel: (075) 951-8151 http://www.panasonic.co.jp/semicon/ SALES OFFICES ■ NORTH AMERICA ● U.S.A. Sales Office: Panasonic Industrial Company [PIC] • New Jersey Office: Two Panasonic Way Secaucus, New Jersey 07094 U.S.A. Tel: 1-201-348-5257 Fax: 1-20[...]