NEC PD789488 manual

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

Ir a la página of

Buen manual de instrucciones

Las leyes obligan al vendedor a entregarle al comprador, junto con el producto, el manual de instrucciones NEC PD789488. La falta del manual o facilitar información incorrecta al consumidor constituyen una base de reclamación por no estar de acuerdo el producto con el contrato. Según la ley, está permitido adjuntar un manual de otra forma que no sea en papel, lo cual últimamente es bastante común y los fabricantes nos facilitan un manual gráfico, su versión electrónica NEC PD789488 o vídeos de instrucciones para usuarios. La condición es que tenga una forma legible y entendible.

¿Qué es un manual de instrucciones?

El nombre proviene de la palabra latina “instructio”, es decir, ordenar. Por lo tanto, en un manual NEC PD789488 se puede encontrar la descripción de las etapas de actuación. El propósito de un manual es enseñar, facilitar el encendido o el uso de un dispositivo o la realización de acciones concretas. Un manual de instrucciones también es una fuente de información acerca de un objeto o un servicio, es una pista.

Desafortunadamente pocos usuarios destinan su tiempo a leer manuales NEC PD789488, sin embargo, un buen manual nos permite, no solo conocer una cantidad de funcionalidades adicionales del dispositivo comprado, sino también evitar la mayoría de fallos.

Entonces, ¿qué debe contener el manual de instrucciones perfecto?

Sobre todo, un manual de instrucciones NEC PD789488 debe contener:
- información acerca de las especificaciones técnicas del dispositivo NEC PD789488
- nombre de fabricante y año de fabricación del dispositivo NEC PD789488
- condiciones de uso, configuración y mantenimiento del dispositivo NEC PD789488
- marcas de seguridad y certificados que confirmen su concordancia con determinadas normativas

¿Por qué no leemos los manuales de instrucciones?

Normalmente es por la falta de tiempo y seguridad acerca de las funcionalidades determinadas de los dispositivos comprados. Desafortunadamente la conexión y el encendido de NEC PD789488 no es suficiente. El manual de instrucciones siempre contiene una serie de indicaciones acerca de determinadas funcionalidades, normas de seguridad, consejos de mantenimiento (incluso qué productos usar), fallos eventuales de NEC PD789488 y maneras de solucionar los problemas que puedan ocurrir durante su uso. Al final, en un manual se pueden encontrar los detalles de servicio técnico NEC en caso de que las soluciones propuestas no hayan funcionado. Actualmente gozan de éxito manuales de instrucciones en forma de animaciones interesantes o vídeo manuales que llegan al usuario mucho mejor que en forma de un folleto. Este tipo de manual ayuda a que el usuario vea el vídeo entero sin saltarse las especificaciones y las descripciones técnicas complicadas de NEC PD789488, como se suele hacer teniendo una versión en papel.

¿Por qué vale la pena leer los manuales de instrucciones?

Sobre todo es en ellos donde encontraremos las respuestas acerca de la construcción, las posibilidades del dispositivo NEC PD789488, el uso de determinados accesorios y una serie de informaciones que permiten aprovechar completamente sus funciones y comodidades.

Tras una compra exitosa de un equipo o un dispositivo, vale la pena dedicar un momento para familiarizarse con cada parte del manual NEC PD789488. Actualmente se preparan y traducen con dedicación, para que no solo sean comprensibles para los usuarios, sino que también cumplan su función básica de información y ayuda.

Índice de manuales de instrucciones

  • Página 1

    User’s Manual µ PD789488 µ PD789489 µ PD78F9488 µ PD78F9489 µ PD789489 Subseries 8-Bit Single-Chip Microcontrollers Printed in Japan Document No. U15331EJ4V1UD00 (4th edition) Date Published July 2005 NS CP(K) ©[...]

  • Página 2

    2 User’s Manual U15331EJ4V1UD [MEMO][...]

  • Página 3

    User’s Manual U15331EJ4V1UD 3 1 2 3 4 V OL T A GE APPLICA TION W A VEFORM A T INPUT PIN W av eform distor tion due to input noise or a reflected wa ve ma y cause malfunction. If the input of the CMOS de vice stays in the area between V IL (MAX) and V IH (MIN) due to noise , etc., the device ma y malfunction. T ake care to pre vent chattering nois[...]

  • Página 4

    4 User’s Manual U15331EJ4V1UD EEPROM and FIP are trademarks of NEC Electronics Corporation. Windows and Window s NT are either registered trademar ks or trademarks of Microsoft Corpora tion in the United States and/or other countrie s. PC/AT is a trademark of International Business Machines Corporation . HP9000 series 700 and HP-UX are tradem ark[...]

  • Página 5

    User’s Manual U15331EJ4V1UD 5 The information in this document is current as of July, 2005. The information is subject to change without notice. For actual design-in, refer to the latest publications of NEC Electronics data sheets or data books, etc., for the most up-to-date specifications of NEC Electronics products. Not all products and/or type[...]

  • Página 6

    6 User’s Manual U15331EJ4V1UD Regional Information • Device availability • Ordering information • Product release schedule • Availability of related technical literature • Development environment specifications (for example, specifications for third-party tools and components, host computers, power plugs, AC supply voltages, and so fort[...]

  • Página 7

    User’s Manual U15331EJ4V1UD 7 Major Revisions in This Edition Page Description Throughout Change of descriptions of µ PD789489, 78F9489 • Change of status from under development to development completed • Change of the subseries name to “ µ PD789489 subseries” pp.31 to 33 Update of 1.5 78K/0S Series Lineup to latest version p.123 Modifi[...]

  • Página 8

    8 User’s Manual U15331EJ4V1UD INTRODUCTION Target Readers This manual is intended for user engineers who w ish to understand the functions of the µ PD789489 Subseries and design and develop application systems and programs for these devices. Target products: • µ PD789489 Subseries: µ PD789488, 789489, 78F9488, 78F9489 Purpose This manual is [...]

  • Página 9

    User’s Manual U15331EJ4V1UD 9 Conve ntions Data significance: Higher digits on the left and lowe r digits on the right Active low representation: xxx (overscore over pin or signal name) Note : Footnote for item marked with Note in the tex t Caution : Information requiring particular attention Remark : Supplementary information Numerical represent[...]

  • Página 10

    10 User’s Manual U15331EJ4V1UD Documents Related to Flash Me mory Writing Document Name Document No. PG-FP3 Flash Memory Programmer User’s Manual U13502E PG-FP4 Flash Memory Programmer User’s Manual U15260E Other Related Documents Document Name Document No. SEMICONDUCTOR SELECTION GUIDE - Products and Packages - X13769X Semiconductor Device M[...]

  • Página 11

    User’s Manual U15331EJ4V1UD 11 CONTENTS CHAPTER 1 GENE RAL ........................................................................................................... ............... 26 1.1 F eatur es ................................................................................................................. ..................... 26 1.2 App [...]

  • Página 12

    12 User’s Manual U15331EJ4V1UD 3.1.4 Data me mory addr essing ................................................................................................. ............. 54 3.2 Processo r Regist ers ...................................................................................................... ............ 58 3.2.1 Contro l regist ers [...]

  • Página 13

    User’s Manual U15331EJ4V1UD 13 5.4.5 When subsyste m clock is not us ed ....................................................................................... ...... 104 5.4.6 Subsystem clock × 4 multiplicati on circui t .................................................................................... 104 5.5 Clock Gene rator Oper ation ....[...]

  • Página 14

    14 User’s Manual U15331EJ4V1UD 9.4.1 Operation as watchdog timer ............................................................................................ .......... 171 9.4.2 Operation as interval timer ............................................................................................ .............. 172 CHAPTER 10 10-BIT A/D CO NVER[...]

  • Página 15

    User’s Manual U15331EJ4V1UD 15 14.1 Multip lier Func tion ..................................................................................................... .............. 267 14.2 Multiplier Configur ation ................................................................................................ .......... 267 14.3 Multiplier Control Re[...]

  • Página 16

    16 User’s Manual U15331EJ4V1UD CHAPTER 20 MA SK OPTIONS .................................................................................................... ....... 331 CHAPTER 21 IN STRUCTION SET ................................................................................................. ..... 332 21.1 Op eration ...........................[...]

  • Página 17

    User’s Manual U15331EJ4V1UD 17 LIST OF FIGURES (1/6) Figure No. Title Page 2-1 I/O Circu it Ty pes .......................................................................................................... ................................ 46 3-1 Memory Map ( µ PD789488) ............................................................................[...]

  • Página 18

    18 User’s Manual U15331EJ4V1UD LIST OF FIGURES (2/6) Figure No. Title Page 5-5 Format of Subc lock Control Register...................................................................................... ......................99 5-6 Subclock Select ion Register Format .................................................................................[...]

  • Página 19

    User’s Manual U15331EJ4V1UD 19 LIST OF FIGURES (3/6) Figure No. Title Page 7-21 Timing of Square-Wave Out put with 16-Bi t Resolu tion ....................................................................... .......149 7-22 Timing of Carrier Generator Operation (When CR60 = N, CRH60 = M (M > N)) ........................................ 151 7-23[...]

  • Página 20

    20 User’s Manual U15331EJ4V1UD LIST OF FIGURES (4/6) Figure No. Title Page 11-4 Format of Asynchronous Seri al Interface M ode Regist er 20 ................................................................ ......191 11-5 Format of Asynchronous Serial Interface Status Regist er 20 .............................................................. .....[...]

  • Página 21

    User’s Manual U15331EJ4V1UD 21 LIST OF FIGURES (5/6) Figure No. Title Page 13-12 Four-Time-Slice LCD Displ ay Pattern and El ectrode C onnecti ons .......................................................... ..263 13-13 Example of Connecting Four-Time-Slic e LCD Panel ........................................................................ ........[...]

  • Página 22

    22 User’s Manual U15331EJ4V1UD LIST OF FIGURES (6/6) Figure No. Title Page 17-3 Releasing HALT Mode by R ESET I nput...................................................................................... ...............311 17-4 Releasing STOP Mode by Interr upt........................................................................................[...]

  • Página 23

    User’s Manual U15331EJ4V1UD 23 LIST OF TABLES (1/3) Table No. Title Page 2-1 Types of Pin I/O Cir cuits ................................................................................................ .............................. 45 3-1 Internal ROM C apacity ......................................................................................[...]

  • Página 24

    24 User’s Manual U15331EJ4V1UD LIST OF TABLES (2/3) Table No. Title Page 10-1 Configuration of 10-Bit A/D Conver ter ................................................................................... .....................173 11-1 Configuration of Serial In terfac e 20 ..............................................................................[...]

  • Página 25

    User’s Manual U15331EJ4V1UD 25 LIST OF TABLES (3/3) Table No. Title Page 21-1 Operand Identifiers and Descripti on Met hods ............................................................................. ............... 332 25-1 Surface Mounting Ty pe Soldering Conditi ons ............................................................................[...]

  • Página 26

    26 User’s Manual U15331EJ4V1UD CHAPTER 1 GENERAL 1.1 Features • ROM and RAM capacities Item Data Memory Part Number Program Memory (ROM) Internal RAM LCD Display RAM µ PD789488 Mask ROM µ PD78F9488 Flash memory 32 KB 1024 bytes 28 × 4 bits µ PD789489 Mask ROM 1536 bytes µ PD78F9489 Flash memory 48 KB • Minimum instruction execution time [...]

  • Página 27

    CHAPTER 1 GENERA L User’s Manual U15331EJ4V1UD 27 1.3 Ordering Information Part Number Package Internal ROM µ PD789488GC- ××× -8BT 80-pin plastic QFP (14 × 14) Mask ROM µ PD789488GK- ××× -9EU 80-pin plastic TQFP (fine pitch) (12 × 12) Mask ROM µ PD78F9488GC-8BT 80-pin plastic QFP (14 × 14) Flash memory µ PD78F9488GK-9EU 80-pin plasti[...]

  • Página 28

    CHAPTER 1 GENERA L 28 User’s Manual U15331EJ4V1UD 1.4 Pin Configuration (Top View ) (1) µ PD789488, 78F9488 80-pin plastic QFP (14 × 14) µ PD789488GC- ××× -8BT µ PD78F9488GC-8BT µ PD789488GC- ××× -8BT-A µ PD78F9488GC-8BT-A 80-pin plastic TQFP (fine pitch) (12 × 12) µ PD789488GK- ××× -9EU µ PD78F9488GK-9EU µ PD789488GK- ××× -[...]

  • Página 29

    CHAPTER 1 GENERA L User’s Manual U15331EJ4V1UD 29 Cautions 1. Connect the IC (Internally Connected) pin directly to V SS . 2. Connect th e A V DD pin to V DD . 3. Connect th e A V SS pin to V SS . Remark The parenthesized values apply to the µ PD78F9488 (2) µ PD789489, 78F9489 80-pin plastic QFP (14 × 14) µ PD789489GC- ××× -8BT µ PD78F948[...]

  • Página 30

    CHAPTER 1 GENERA L 30 User’s Manual U15331EJ4V1UD Notes 1. Whether to use these pins as i nput port pins (P70 to P73) or s egment outputs (S16 to S19) can be selected in 1-bit units by means of a ma sk option or port function register (refer to 4.3 (3) Port function registers and CHAPTER 20 MA SK OPTIONS ). 2. Whether to use these pins as I/O por[...]

  • Página 31

    CHAPTER 1 GENERA L User’s Manual U15331EJ4V1UD 31 1.5 78K/0S Series Lineup The products in the 78K/0S Series are listed below. The names enclosed in boxes are subseries names. 80-pin SIO, 8-bit A/D converter, and resistance division type LCD (28 × 4) 52-pin 52-pin SIO and resistance division type LCD (24 × 4) 8-bit A/D and on-chip voltage boost[...]

  • Página 32

    CHAPTER 1 GENERA L 32 User’s Manual U15331EJ4V1UD The major functional differences bet ween the subseries are listed below . Series for General-purpose applications and LCD drive Timer V DD Function Subseries Name ROM Capacity 8-Bit 16-Bit Watc h WDT 8-Bit A/D 10-Bit A/D Serial Interface I/O MIN. Value Remarks µ PD789046 16 KB 1 ch µ PD789026 4[...]

  • Página 33

    CHAPTER 1 GENERA L User’s Manual U15331EJ4V1UD 33 Series for ASSP Timer V DD Function Subseries Name ROM Capacity 8-Bit 16-Bit Watc h WDT 8-Bit A/D 10-Bit A/D Serial Interface I/O MIN. Value Remarks USB µ PD789800 8 KB 2 ch − − 1 ch − − 2 ch (USB: 1 ch) 31 4.0 V − Inverter control µ PD789842 8 KB to 16 KB 3 ch Note 1 1 ch 1 ch 8 ch ?[...]

  • Página 34

    CHAPTER 1 GENERA L 34 User’s Manual U15331EJ4V1UD 1.6 Block Diagram 78K/0S CPU core ROM (flash memory) RAM V DD V SS IC0 (V PP ) CPT20/TO20/P33 8-bit timer/ event counter 60 P00 to P07 Port 0 P10 to P11 Port 1 P20 to P25 Port 2 P30 to P34 Port 3 P50 to P53 Port 5 P60 to P67 Port 6 P70 to P73 Note 1 Port 7 8-bit timer/ event counter 61 16-bit time[...]

  • Página 35

    CHAPTER 1 GENERA L User’s Manual U15331EJ4V1UD 35 1.7 Overview of Functions (1/2) Item µ PD789488 µ PD78F9488 µ PD789489 µ PD78F9489 ROM 32 KB 32 KB (flash memory) 48 KB 48 KB (flash memory) High-speed RAM 1024 bytes Low-speed RAM − 512 bytes Internal memory LCD display RAM 28 bytes Main system clock (oscillation frequency) Ceramic/crystal [...]

  • Página 36

    CHAPTER 1 GENERA L 36 User’s Manual U15331EJ4V1UD (2/2) Item µ PD789488 µ PD78F9488 µ PD789489 µ PD78F9489 Supply voltage V DD = 1.8 to 5.5 V Operating ambient temperature T A = − 40 to +85 ° C Package • 80-pin plastic QFP (14 × 14) • 80-pin plastic TQFP (fine pitch) (12 × 12) An outline of the timer is shown below . 16-Bit Timer 20 [...]

  • Página 37

    User’s Manual U15331EJ4V1UD 37 CHAPTER 2 PIN FUNCTIONS 2.1 List of Pin Functions (1) Port pins (1/2) Pin Name I/O Function After Reset Alternate Function P00 to P07 I/O Port 0. 8-bit I/O port. Input/output can be specified in 1-bit units. When used as an input port, an on-chip pull-up resistor can be specified in 1-bit units by pull- up resistor [...]

  • Página 38

    CHAPTER 2 PIN FUNCTIONS User’s Manual U15331EJ4V1UD 38 (1) Port pins (2/2) Pin Name I/O Function After Reset Alternate Function P70 to P73 Note 1 Input Port 7. 4-bit input port. (Only when input port is selected by mask option or port function register) Input − P80 to P87 Note 2 I/O Port 8. 8-bit I/O port. (Only when I/O port is selected by mas[...]

  • Página 39

    CHAPTER 2 PIN FUNCTIONS User’s Manual U15331EJ4V1UD 39 (2) Non-port pins (2 /2) Pin Name I/O Function After Reset Alternate Function S0 to S15 LCD controller/driver segment signal outputs Low-level output – S16 to S19 Note 1 Only when segment output is selected by mask option – S20 to S27 Note 2 Output Only when segment output is selected by [...]

  • Página 40

    CHAPTER 2 PIN FUNCTIONS User’s Manual U15331EJ4V1UD 40 2.2 Description of Pin Functions 2.2.1 P00 to P07 (Port 0) These pins constitute an 8-bit I/O port. In additi on, these pins enable key return signal detection. Port 0 can be specified in the follo wing operation modes in 1-bit units. (1) Port mode These pins constitute an 8-bit I/O port and [...]

  • Página 41

    CHAPTER 2 PIN FUNCTIONS User’s Manual U15331EJ4V1UD 41 2.2.4 P30 to P34 (Port 3) These pins constitute a 5-bit I/O port. In addition, they also function as timer I/O, external interrupt input, and remote control receive data input Note . Port 3 can be specified in the follo wing operation modes in 1-bit units. (1) Port mode In this mode, P30 to P[...]

  • Página 42

    CHAPTER 2 PIN FUNCTIONS User’s Manual U15331EJ4V1UD 42 2.2.6 P60 to P67 (Port 6) This is an 8-bit input-only port. In addition to a general-pur pose input port function, it has A/D converter input and key return signal detection Note functions. (1) Port mode In this mode, P60 to P67 function as an 8-bit input-only port. (2) Control mode In this m[...]

  • Página 43

    CHAPTER 2 PIN FUNCTIONS User’s Manual U15331EJ4V1UD 43 2.2.13 RESET This pin inputs an active-low system reset signal. 2.2.14 X1, X2 These pins are used to connect a crystal res onator for main system clock oscillation. To supply an external clock, input the clock to X1 and input the inverted signal to X2. 2.2.15 XT1, XT2 These pins are used to c[...]

  • Página 44

    CHAPTER 2 PIN FUNCTIONS User’s Manual U15331EJ4V1UD 44 2.2.21 IC0 (mask ROM version only) The IC0 (Internally Connected) pin is used to set the µ PD789489 Subseries in the test mode before shipment. In the normal operation mode, direct ly connect this pin to the V SS pin w ith as short a wiring length as possible. If there is a potential differ [...]

  • Página 45

    CHAPTER 2 PIN FUNCTIONS User’s Manual U15331EJ4V1UD 45 2.3 Pin I/O Circuits and Recomme nded Connection of Unused Pins The I/O circuit type of each pin and recommended connecti on of unused pins are show n in T able 2-1. For the I/O circuit configuration of each type, see Figure 2-1. Table 2-1. Types of Pin I/O Circuits (1/2) Pin Name I/O Circuit[...]

  • Página 46

    CHAPTER 2 PIN FUNCTIONS User’s Manual U15331EJ4V1UD 46 Table 2-1. Types of Pin I/O Circuits (2/2) Pin Name I/O Circuit Type I/O Re commended Connection of Unused Pins XT1 Input Connect to V SS . XT2 – – Leave open. RESET 2 Input – IC0 Connect directly to V SS . V PP – – Independently connect a 10 k Ω pull-down resistor, or connect dir[...]

  • Página 47

    CHAPTER 2 PIN FUNCTIONS User’s Manual U15331EJ4V1UD 47 Figure 2-1. I/O Circuit Types (2/2) Type 13-W Type 13-V Data Output disable Input enable IN/OUT N -ch V SS Mask option V DD Middle-voltage input buffer Data Output disable Input enable IN/OUT N -ch V SS Middle-voltage input buffer Type 17 Type 18 P-ch N-ch P-ch N-ch N-ch N-ch data OUT V LC0 V[...]

  • Página 48

    48 User’s Manual U15331EJ4V1UD CHAPTER 3 CPU ARCHITECTURE 3.1 Memory Space The µ PD789489 Subseries can access 64 KB of memory space. Figures 3-1 to 3-4 show the memory maps. Figure 3-1. Memory Map ( µ PD789488) 8 0 0 0 H 7 F F F H Special function registers 256 × 8 bits Internal high-speed RAM 1024 × 8 bits LCD display RAM 28 × 4 bits F F F[...]

  • Página 49

    CHAPTER 3 CPU A RCHITECTURE User’s Manual U15331EJ4V1UD 49 Figure 3-2. Memory Map ( µ PD78F9488) 8 0 0 0 H 7 F F F H Special function registers 256 × 8 bits Internal high-speed RAM 1024 × 8 bits LCD display RAM 28 × 4 bits F F F F H F F 0 0 H F E F F H F B 0 0 H F A F F H 0 0 0 0 H Program memory space Data memory space 7 F F F H 0 0 0 0 H Pr[...]

  • Página 50

    CHAPTER 3 CPU A RCHITECTURE 50 User’s Manual U15331EJ4V1UD Figure 3-3. Memory Map ( µ PD789489) B F F F H 0 0 0 0 H 0 0 8 0 H 0 0 7 F H 0 0 4 0 H 0 0 3 F H 0 0 3 0 H 0 0 2 F H Program area Program area CALLT table area Vector table area Special function registers 256 × 8 bits Internal high-speed RAM 1024 × 8 bits Internal low-speed 512 × 8 bi[...]

  • Página 51

    CHAPTER 3 CPU A RCHITECTURE User’s Manual U15331EJ4V1UD 51 Figure 3-4. Memory Map ( µ PD78F9489) B F F F H 0 0 0 0 H 0 0 8 0 H 0 0 7 F H 0 0 4 0 H 0 0 3 F H 0 0 3 0 H 0 0 2 F H F F F F H F F 0 0 H F E F F H F B 0 0 H F A F F H 0 0 0 0 H F A 1 C H F A 1 B H F A 0 0 H F 9 F F H F 7 0 0 H F 6 F F H C 0 0 0 H B F F F H F 5 0 0 H F 4 F F H Program ar[...]

  • Página 52

    CHAPTER 3 CPU A RCHITECTURE 52 User’s Manual U15331EJ4V1UD 3.1.1 Internal program memory space The internal program memory space stores programs and table data. This space is usually addressed by the program counter (PC). The µ PD789489 Subseries provide internal ROM (or flash me mory) w ith the following capacity for each product. Table 3-1. In[...]

  • Página 53

    CHAPTER 3 CPU A RCHITECTURE User’s Manual U15331EJ4V1UD 53 3.1.2 Internal data memory space (1) Internal high-speed RAM and internal low-sp eed RA M The µ PD789489 Subseries products incorporate the internal high-speed RAM and internal low-speed RAM of the following capacity for each product. The internal high-speed RAM can also be used as a sta[...]

  • Página 54

    CHAPTER 3 CPU A RCHITECTURE 54 User’s Manual U15331EJ4V1UD 3.1.4 Data memory addressing The µ PD789489 Subseries is provided with a variety of addr essing modes to make memory manipulation as efficient as possible. At the addresses corresponding to data memory area (FB00H to FFFFH) especially , specific addressing modes that correspond to the pa[...]

  • Página 55

    CHAPTER 3 CPU A RCHITECTURE User’s Manual U15331EJ4V1UD 55 Figure 3-6. Data Memory Addressing ( µ PD78F9488) Special function registers 256 × 8 bits Internal high-speed RAM 1024 × 8 bits LCD display RAM 28 × 4 bits F F F F H 8 0 0 0 H 7 F F F H 0 0 0 0 H Direct addressing Register indirect addressing Based addressing F F 0 0 H F E F F H F F 2[...]

  • Página 56

    CHAPTER 3 CPU A RCHITECTURE 56 User’s Manual U15331EJ4V1UD Figure 3-7. Data Memory Addressing ( µ PD789489) Direct addressing Register indirect addressing Based addressing SFR addressing Short direct addressing F F F F H 0 0 0 0 H F F 0 0 H F E F F H F F 2 0 H F F 1 F H F E 2 0 H F E 1 F H F B 0 0 H F A F F H F A 1 C H F A 1 B H F 5 0 0 H F 4 F [...]

  • Página 57

    CHAPTER 3 CPU A RCHITECTURE User’s Manual U15331EJ4V1UD 57 Figure 3-8. Data Memory Addressing ( µ PD78F9489) Direct addressing Register indirect addressing Based addressing SFR addressing Short direct addressing F F F F H C 0 0 0 H B F F F H 0 0 0 0 H F F 0 0 H F E F F H F F 2 0 H F F 1 F H F E 2 0 H F E 1 F H F B 0 0 H F A F F H F A 1 C H F A 1[...]

  • Página 58

    CHAPTER 3 CPU A RCHITECTURE 58 User’s Manual U15331EJ4V1UD 3.2 Processor Registers The µ PD789489 Subseries is provided with the fo llow ing on-chip processor registers. 3.2.1 Control registers The control registers contain special functions to control the program sequence status and stack memory. The program counter, program status word, and st[...]

  • Página 59

    CHAPTER 3 CPU A RCHITECTURE User’s Manual U15331EJ4V1UD 59 (a) Interrupt enable flag (IE) This flag controls interrupt request a cknowledgement operati ons of the CPU. When 0, IE is set to the interrupt disabled status (DI), and interrupt reques ts other than non-maskable interrupts are all disabled. When 1, IE is set to the inte rrupt enabled st[...]

  • Página 60

    CHAPTER 3 CPU A RCHITECTURE 60 User’s Manual U15331EJ4V1UD (3) Stack pointer (SP) This is a 16-bit register that holds the start address of the memory sta ck area. Only the internal high-speed RAM area can be set as the stack area. Figure 3-11. Stack Pointer Config uration 0 15 SP14 SP15 SP SP13 SP12 SP11 SP10 SP9 SP8 SP7 SP6 SP5 SP4 SP3 SP2 SP1 [...]

  • Página 61

    CHAPTER 3 CPU A RCHITECTURE User’s Manual U15331EJ4V1UD 61 3.2.2 General-purpose registers The general-purpose registers consis t of eight 8-bit registers (X, A, C, B, E, D, L, and H). Each register can be used as an 8-bit r egister, or two 8-bit registers in pairs can be used as a 16-bit register (AX, BC, DE, and HL). General-purpose registers c[...]

  • Página 62

    CHAPTER 3 CPU A RCHITECTURE 62 User’s Manual U15331EJ4V1UD 3.2.3 Special function registers (SFRs) Unlike a general-purpose register, each special function register has a special function. The special function registers are allocat ed in the 256-byte area of FF00H to FFFFH. Special function registers can be m anipulated, like general-purpos e reg[...]

  • Página 63

    CHAPTER 3 CPU A RCHITECTURE User’s Manual U15331EJ4V1UD 63 Table 3-4. Specia l Function Registers (1/3) Bit Unit for Manipulation Address Special Function Register (SFR) Name Symbol R/W 1 Bit 8 Bits 16 Bits After Reset FF00H Port 0 P0 √ √ − FF01H Port 1 P1 √ √ − FF02H Port 2 P2 √ √ − FF03H Port 3 P3 √ √ − FF05H Port 5 P5 R[...]

  • Página 64

    CHAPTER 3 CPU A RCHITECTURE 64 User’s Manual U15331EJ4V1UD Table 3-4. Specia l Function Registers (2/3) Bit Unit for Manipulation Address Special Function Register (SFR) Name Symbol R/W 1 Bit 8 Bits 16 Bits After Reset FF40H 8-bit H width compare register 61 CRH61 W − √ − Undefined FF41H 8-bit timer mode control register 61 TMC61 √ √ ?[...]

  • Página 65

    CHAPTER 3 CPU A RCHITECTURE User’s Manual U15331EJ4V1UD 65 Table 3-4. Specia l Function Registers (3/3) Bit Unit for Manipulation Address Special Function Register (SFR) Name Symbol R/W 1 Bit 8 Bits 16 Bits After Reset FF80H A/D converter mode register 0 ADML0 √ √ − FF84H Analog input channel spec ification register 0 ADS0 √ √ − 00H F[...]

  • Página 66

    CHAPTER 3 CPU A RCHITECTURE 66 User’s Manual U15331EJ4V1UD 3.3 Instruction Address Addressing An instruction address is determined by the program counter (P C) contents. The PC contents are normally incremented (+1 for each byte) automatically according to the number of bytes of an in struction to be fetched each time another instruction is ex ec[...]

  • Página 67

    CHAPTER 3 CPU A RCHITECTURE User’s Manual U15331EJ4V1UD 67 3.3.2 Immediate addressing [Function] Immediate data in the in struction word is transferred to t he program counter (PC) and branched. This function is carried out when the CALL !addr 16 or BR ! addr16 instruction is executed. CALL !addr16 and BR ! addr16 instructions can be br anched to[...]

  • Página 68

    CHAPTER 3 CPU A RCHITECTURE 68 User’s Manual U15331EJ4V1UD 3.3.3 Table indirect addressin g [Function] Table contents (branch destination addr ess) of the particular location to be addressed by the low er 5-bit immediate data of an instru ction code from bit 1 to bit 5 are trans ferred to the program counter (PC) and branched. This function is ca[...]

  • Página 69

    CHAPTER 3 CPU A RCHITECTURE User’s Manual U15331EJ4V1UD 69 3.4 Operand Address Addressing The following various methods are available to spec ify the register and memory (addressing) w hich undergo manipulation during inst ruction execution. 3.4.1 Direct addressing [Function] The memory indicated with immediate data in an instruction w ord is dir[...]

  • Página 70

    CHAPTER 3 CPU A RCHITECTURE 70 User’s Manual U15331EJ4V1UD 3.4.2 Short direct addressing [Function] The memory to be manipulated in the fixed space is dire ctly addressed w ith 8-bit data in an instruction word. The fixed space is the 256-byte space FE20H to FF1FH where the addressing is applied. Internal high-speed RAM and special function regis[...]

  • Página 71

    CHAPTER 3 CPU A RCHITECTURE User’s Manual U15331EJ4V1UD 71 3.4.3 Special function register (SFR) add ressing [Function] The memory-mapped special function registers (SFRs) are addressed with 8-bit immediate data in an instruction word. This addressing is applied to the 256-byte space FF00H to FFFFH. However, the SFRs mapped at FF00H to FF1FH can [...]

  • Página 72

    CHAPTER 3 CPU A RCHITECTURE 72 User’s Manual U15331EJ4V1UD 3.4.4 Register addressing [Function] In the register addressing mode, general-purpose registers are access ed as operands. The general-purpose register to be accessed is specified by a register specification code or f unctional name in the instruction code. Register addressing is carried [...]

  • Página 73

    CHAPTER 3 CPU A RCHITECTURE User’s Manual U15331EJ4V1UD 73 3.4.5 Register indirect addressing [Function] In the register indirect addressing m ode, memory is manipulated according to the contents of a register pair specified as an operand. The r egister pair to be accessed is specified by the register pair s pecification code in an instruction co[...]

  • Página 74

    CHAPTER 3 CPU A RCHITECTURE 74 User’s Manual U15331EJ4V1UD 3.4.6 Based addressing [Function] 8-bit immediate data is added to the cont ents of the base register, that is, t he HL register pair, and the sum is used to address the memory. Addition is performed by expanding the offset data as a positive number to 16 bits. A carry from the 16th bit i[...]

  • Página 75

    User’s Manual U15331EJ4V1UD 75 CHAPTER 4 PORT FUNCTIONS 4.1 Port Functions The µ PD789489 Subseries provides the ports shown in Figure 4-1, enabling vari ous methods of control. The functions of each port ar e shown in Table 4-1. Numerous other functions are provi ded that can be used in addition to the digital I/O port functions. For more infor[...]

  • Página 76

    CHAPTER 4 PORT FUNCTIONS 76 User’s Manual U15331EJ4V1UD Table 4-1. Port Functions Port Name Pin Name Function Port 0 P00 to P07 I/O port. Input/out put can be specified in 1-bit units. When used as an input port, an on-chip pull-up resi stor can be specified in 1-bit units by pull-up resistor option register B0 (PUB0) or the key return mode regis[...]

  • Página 77

    CHAPTER 4 PORT FUNCTIONS User’s Manual U15331EJ4V1UD 77 4.2.1 Port 0 This is an 8-bit I/O port with an output latch. Port 0 can be specified in the input or output mode in 1-bit units by using port mode register 0 (PM0). When the P00 to P07 pins are used as input port pins, on-chip pull-up resistors can be connected in 1-bit units by using pull- [...]

  • Página 78

    CHAPTER 4 PORT FUNCTIONS 78 User’s Manual U15331EJ4V1UD 4.2.2 Port 1 This is a 2-bit I/O port with an output latch. Port 1 can be specified in the input or output mode in 1-bit units by using port mode register 1 (PM1). W hen using the P10 and P11 pins as input port pins, on-chip pull-up resistors can be connected in 1-bit units by using pull- up[...]

  • Página 79

    CHAPTER 4 PORT FUNCTIONS User’s Manual U15331EJ4V1UD 79 4.2.3 Port 2 This is a 6-bit I/O port with an output latch. Port 2 can be specified in the input or output mode in 1-bit units by using port mode register 2 (PM2). When using the P20 to P25 pins as input por t pins, on-chip pull-up resistors can be connected in 1-bit units by using pull-up r[...]

  • Página 80

    CHAPTER 4 PORT FUNCTIONS 80 User’s Manual U15331EJ4V1UD Figure 4-5. Block Diagram of P21 Internal bus V DD P21/SO20/TxD20 WR PUB2 RD WR PORT WR PM PUB21 Alternate function Output latch (P21) PM21 Selector P-ch PUB2: Pull-up resistor option register B2 PM: Port mode register RD: Port 2 read signal WR: Port 2 write signal[...]

  • Página 81

    CHAPTER 4 PORT FUNCTIONS User’s Manual U15331EJ4V1UD 81 Figure 4-6. Block Diagram of P22 and P25 P22/SI20/ RxD20, P25/SI10 WR PUB2 RD WR PORT WR PM PUB22, PUB25 Alternate function Output latch (P22, P25) PM22, PM25 V DD P-ch Internal bus Selector PUB2: Pull-up resistor option register B2 PM: Port mode register RD: Port 2 read signal WR: Port 2 wr[...]

  • Página 82

    CHAPTER 4 PORT FUNCTIONS 82 User’s Manual U15331EJ4V1UD Figure 4-7. Block Diagram of P23 Internal bus V DD P-ch P23/SCK10 WR PUB2 RD WR PORT WR PM PUB23 Alternate function Output latch (P23) PM23 Alternate function Selector PUB2: Pull-up resistor option register B2 PM: Port mode register RD: Port 2 read signal WR: Port 2 write signal[...]

  • Página 83

    CHAPTER 4 PORT FUNCTIONS User’s Manual U15331EJ4V1UD 83 Figure 4-8. Block Diagram of P24 Internal bus V DD P24/SO10 WR PUB2 RD WR PORT WR PM PUB24 Alternate function Output latch (P24) PM24 Selector P-ch PUB2: Pull-up resistor option register B2 PM: Port mode register RD: Port 2 read signal WR: Port 2 write signal[...]

  • Página 84

    CHAPTER 4 PORT FUNCTIONS 84 User’s Manual U15331EJ4V1UD 4.2.4 Port 3 This is a 5-bit I/O port with an output latch. Port 3 can be specified in the input or output mode in 1-bit units by using port mode register 3 (PM3). When using the P30 to P34 pins as input por t pins, on-chip pull-up resistors can be connected in 1-bit units by using pull-up r[...]

  • Página 85

    CHAPTER 4 PORT FUNCTIONS User’s Manual U15331EJ4V1UD 85 Figure 4-10. Block Diagram of P34 (a) When µ PD789488, 78F9488 is used P34 WR PUB3 RD WR PORT WR PM PUB34 PM34 V DD P-ch Internal bus Selector Output latch (P34) (b) When µ PD789489, 78F9489 is used P34/RIN WR PUB3 RD WR PORT WR PM PUB34 PM34 V DD P-ch Internal bus Selector Output latch (P[...]

  • Página 86

    CHAPTER 4 PORT FUNCTIONS 86 User’s Manual U15331EJ4V1UD 4.2.5 Port 5 This is a 4-bit N-ch open-drain I/O port with an output latch. Port 5 can be specified in the input or output mode in 1-bit units by using port mode register 5 (PM5). For a mask ROM version, use of an on- chip pull-up resistor can be specified by a mask option. RESET input sets [...]

  • Página 87

    CHAPTER 4 PORT FUNCTIONS User’s Manual U15331EJ4V1UD 87 4.2.6 Port 6 This is an 8-bit input-only port. This port is also used for the analog input of an A/D converter and key return signal input Note . Figure 4-12 shows a block diagram of port 6. Note µ PD789489 and 78F9489 only. Figure 4-12. Block Diagram of P60 to P67 (1/2) (a) When µ PD78948[...]

  • Página 88

    CHAPTER 4 PORT FUNCTIONS 88 User’s Manual U15331EJ4V1UD Figure 4-12. Block Diagram of P60 to P67 (2/2) (b) When µ PD789489, 78F9489 is used V REF RD Alternate function P60/ANI0/KR10 to P67/ANI7/KR17 + − KRM010, KRM014 to KRM017 WR KRM01 A/D converter Internal bus KRM01: Key return mode register 01 RD: Port 6 read signal[...]

  • Página 89

    CHAPTER 4 PORT FUNCTIONS User’s Manual U15331EJ4V1UD 89 4.2.7 Port 7 This is a 4-bit input-only port. Only the bits for w hic h the port function is selected can be used, by using a mask option in the µ PD789488 and 789489 or port function r egister 7 (PF7) in the µ PD78F9488 and 78F9489. Figure 4-13 shows a block diagram of port 7. Figure 4-13[...]

  • Página 90

    CHAPTER 4 PORT FUNCTIONS 90 User’s Manual U15331EJ4V1UD 4.2.8 Port 8 This is an 8-bit I/O port with an output latch. Only the bi ts for which the port function is selected can be used, by using a mask option in the µ PD789488 and 789489 or port function r egister 8 (PF8) in the µ PD78F9488 and 78F9489. Port 8 can be specified in the input or ou[...]

  • Página 91

    CHAPTER 4 PORT FUNCTIONS User’s Manual U15331EJ4V1UD 91 4.3 Registers Controlling Port Function The ports are controlled by the fo llowing three ty pes of registers. • Port mode registers (PM0 to PM3, PM5, PM8) • Pull-up resistor option registers (PUB0 to PUB3) • Port function registers (PF7, PF8) ( µ PD78F9488, 78F9489 only) (1) Port mode[...]

  • Página 92

    CHAPTER 4 PORT FUNCTIONS 92 User’s Manual U15331EJ4V1UD Table 4-3. Port Mode Regis ters and Output Latch Settings When Using A lternate Functions Alternate Function Pin Name Name I/O PM ×× P ×× P00 to P07 KR0 to KR7 or KR00 to KR07 Input 1 × INTP0 Input 1 × TO50 Output 0 0 P30 TMI60 Input 1 × INTP1 Input 1 × P31 TO60 Output 0 0 INTP2 Inpu[...]

  • Página 93

    CHAPTER 4 PORT FUNCTIONS User’s Manual U15331EJ4V1UD 93 (2) Pull-up res istor option registers (PUB0 to PUB3) These registers set whether to use on-chip pull-up resist ors for pins P00 to P07, P10, P11, P20 to P25, and P30 to P34. An on-chip pull-up resistor can be used only for those bits set to the input mode in a port for which the use of the [...]

  • Página 94

    CHAPTER 4 PORT FUNCTIONS 94 User’s Manual U15331EJ4V1UD 4.4 Port Function Operation The operation of a port differs depending on w hether the port is set in the input or output m ode, as described below. 4.4.1 Writing to I/O port (1) In output mode A value can be written to the output la tch of a port by using a transfer inst ruction. The cont en[...]

  • Página 95

    User’s Manual U15331EJ4V1UD 95 CHAPTER 5 CLOCK GENERATOR 5.1 Clock Generator Functions The clock generator generates the clock to be supplied to the CPU and peripheral hardware. The following tw o types of system clock oscillators are used. • Main system clock oscillator This circuit oscillates at 1.0 to 5.0 MHz. Oscillati on can be stopped by [...]

  • Página 96

    CHAPTER 5 CLOCK GENERA TOR 96 User’s Manual U15331EJ4V1UD Figure 5-1. Clock Generator Blo ck Diagram ( µ PD789488, 789489) f XT 8f XT f XTT X1 X2 XT1 XT2 f X f X 2 2 f XTT 2 1/2 Prescaler Standby controller Wait controller Mask option STOP MCC PCC1 CLS Internal bus CSS0 FRC SCC Internal bus Timer 50 Watch timer LCD controller/driver Clock to per[...]

  • Página 97

    CHAPTER 5 CLOCK GENERA TOR User’s Manual U15331EJ4V1UD 97 Figure 5-2. Clock Generator Blo ck Diagram ( µ PD78F9488, 78F9489) Subsystem clock oscillator f XT X1 X2 XT1 XT2 Main system clock oscillator f X f X 2 2 f XTT 2 1/2 Prescaler Clock to peripheral hardware Timer 50 Watch timer LCD controller/driver CPU clock (f CPU ) Standby controller Wai[...]

  • Página 98

    CHAPTER 5 CLOCK GENERA TOR 98 User’s Manual U15331EJ4V1UD 5.3 Registers Controlling Clock Generator The clock generator is controlled by the following four registers. • Processor clock control register (PCC) • Subclock oscillation mode register (SCKM) • Subclock control register (CSS) • Subclock selection register (SSCK) ( µ PD78F9488, 7[...]

  • Página 99

    CHAPTER 5 CLOCK GENERA TOR User’s Manual U15331EJ4V1UD 99 (2) Subclock oscillation mode register (SCKM) SCKM selects a feedback resistor for the subsystem clock, and controls the oscillation of the clock. SCKM is set with a 1-bit or 8-bi t memory manipulation instruction. RESET input sets SCKM to 00H. Figure 5-4. Format of Subclo ck Oscillation M[...]

  • Página 100

    CHAPTER 5 CLOCK GENERA TOR 100 User’s Manual U15331EJ4V1UD (4) Subclock selection register (SSCK) ( µ PD78F9488, 78F9489 only) This register is used to control the oper ation of the × 4 subsystem clock multiplication circuit. SSCK is set via a 1-bit or 8-bit memory manipulation instruction. RESET input sets this register to 00H. Caution This re[...]

  • Página 101

    CHAPTER 5 CLOCK GENERA TOR User’s Manual U15331EJ4V1UD 101 5.4 System Clock Oscillators 5.4.1 Main system clock oscillator The main system clock oscillator is oscillated by the crystal or ceramic resonator (5.0 MHz TYP.) connected across the X1 and X2 pins. An external clock can also be input to the circuit. In this case, input the cl ock signal [...]

  • Página 102

    CHAPTER 5 CLOCK GENERA TOR 102 User’s Manual U15331EJ4V1UD 5.4.2 Subsystem clock oscillator The subsystem clock oscillator is oscillated by the crystal resonator (32.768 kHz T YP.) connected across the XT1 and XT2 pins. An external clock can also be input to the circuit. In this case, input the cl ock signal to the XT1 pin, and input the inverted[...]

  • Página 103

    CHAPTER 5 CLOCK GENERA TOR User’s Manual U15331EJ4V1UD 103 5.4.3 Example of incorrect resonato r connection Figure 5-9 shows examples of incorrect resonator connection. Figure 5-9. Examples of In correct Resonator Connection (1/2) (a) Too long w iring (b) Crossed signal line V SS X1 X2 V SS X1 X2 PORTn (n = 0 to 3, 5) (c) Wiring near high fluctua[...]

  • Página 104

    CHAPTER 5 CLOCK GENERA TOR 104 User’s Manual U15331EJ4V1UD Figure 5-9. Examples of In correct Resonator Connection (2/2) (e) Signal is fetched V SS X1 X2 Remark When using the subsystem clock, read X1 and X2 as XT1 and XT2, respectively, and connect a resistor to XT2 in series. 5.4.4 Divider circuit The divider circuit divides the output of the m[...]

  • Página 105

    CHAPTER 5 CLOCK GENERA TOR User’s Manual U15331EJ4V1UD 105 5.5 Clock Generator Operation The clock generator generates the follo wing clocks and controls the operation modes of the CPU, such as the standby mode. • Main system clock f X • Subsystem clock f XT • CPU clock f CPU • Clock to peripheral hardw are The operation and function of t[...]

  • Página 106

    CHAPTER 5 CLOCK GENERA TOR 106 User’s Manual U15331EJ4V1UD 5.6 Changing Setting of System Clock and CPU Clock 5.6.1 Time required for sw itching betw een system clock and CPU clock The CPU clock can be selected by using bit 1 (PCC1) of the processor clock control register (PCC) and bit 4 (CSS0) of the subclock control register (CSS). Actually, th[...]

  • Página 107

    CHAPTER 5 CLOCK GENERA TOR User’s Manual U15331EJ4V1UD 107 5.6.2 Sw itching between sy stem clock and CPU clock The following figure illustrates how the CPU clock and system clock switch. Figure 5-10. Sw itching Betw een System Clock and CPU Clock System clock CPU clock Interrupt request signal RESET V DD f X f X f XT f X Low-speed operation High[...]

  • Página 108

    108 User’s Manual U15331EJ4V1UD CHAPTER 6 16-BIT TIMER 20 6.1 16-Bit Timer 20 Functions 16-bit timer 20 has the following functions. • Timer interrupt • Timer output • Count value capture (1) Timer interrupt An interrupt is generated when a count value and compare value match. (2) Timer output Timer output can be controlled when a count val[...]

  • Página 109

    CHAPTER 6 16-BIT TIMER 20 User’s Manual U15331EJ4V1UD 109 Figure 6-1. Block Diagram of 16-Bit T imer 20 CPT20/TO20 /INTP3/P33 Internal bus Internal bus 16-bit timer mode control register 20 (TMC20) 16-bit timer mode control register 20 TOF20 CPT201 CPT200 TOC20 TCL201 TCL200 TOE20 f X f X /2 2 Edge detector 16-bit capture register 20 (TCP20) 16-b[...]

  • Página 110

    CHAPTER 6 16-BIT TIMER 20 110 User’s Manual U15331EJ4V1UD (4) 16 -bit counter read buffer 20 This buffer is used to latch and hold the count value for TM20. 6.3 Registers Controlling 16-Bit Timer 20 16-bit timer 20 is controlled by the follow ing three registers. • 16-bit timer mode control register 20 (TMC20) • Port mode register 3 (PM3) •[...]

  • Página 111

    CHAPTER 6 16-BIT TIMER 20 User’s Manual U15331EJ4V1UD 111 Figure 6-2. Format of 16-Bit Timer Mode Control Re gister 20 Symbol <7> <6> 5 4 3 2 1 <0> Address After reset R/W TMC20 TOD20 TOF20 CPT201 CPT200 TOC20 TCL201 TCL200 TOE20 FF48H 00H R/W Note 1 TOD20 Timer output data 0 Timer output is “0” 1 Timer output is “1” TOF[...]

  • Página 112

    CHAPTER 6 16-BIT TIMER 20 112 User’s Manual U15331EJ4V1UD (2) Port mode register 3 (PM3) This register is used to set the I/O mode of port 3 in 1-bit units. When using the P33/INTP3/CPT20/T O20 pin as a capture input (CPT20), set PM33 to 1. When using the above pin as a timer output (TO20), set the PM33 and P33 output latches to 0. PM3 is set wit[...]

  • Página 113

    CHAPTER 6 16-BIT TIMER 20 User’s Manual U15331EJ4V1UD 113 6.4 16-Bit Timer 20 Operation 6.4.1 Operation as timer interrupt 16-bit timer 20 can generate interrupts repeatedly each time the free-running c ounter value reaches the value set to CR20. Since this counter is not cl eared and holds the count even after an interr upt is generated, the int[...]

  • Página 114

    CHAPTER 6 16-BIT TIMER 20 114 User’s Manual U15331EJ4V1UD Figure 6-5. Timing of Timer Interrupt Opera tion CR20 INTTM20 TO20 TOF20 NN N N N t 0000H N FFFFH N 0000H 0001H 0001H Count clock TM20 count value Interrupt acknowledgement Interrupt acknowledgement Overflow flag set Remark N = 0000H to FFFFH[...]

  • Página 115

    CHAPTER 6 16-BIT TIMER 20 User’s Manual U15331EJ4V1UD 115 6.4.2 Operation as timer output 16-bit timer 20 can invert the timer output repeatedly each time the free-running counter va lue reaches the value set to CR20. Since this counter is not cleared and holds the count even after the timer output is inverted, the interval time is equal to one c[...]

  • Página 116

    CHAPTER 6 16-BIT TIMER 20 116 User’s Manual U15331EJ4V1UD 6.4.3 Capture operation The capture operation consists of latching the count value of 16-bit timer counter 20 (TM20) into a capture register in synchronization w ith a capture tr igger, and retaining the count value. Set TMC20 as shown in Figure 6-8 to allow t he 16-bit timer to start the [...]

  • Página 117

    CHAPTER 6 16-BIT TIMER 20 User’s Manual U15331EJ4V1UD 117 6.4.4 16-bit timer counter 20 readout The count value of 16-bit timer counter 20 (TM20) is read out using a 16-bit m anipulation instruction. TM20 readout is performed via t he counter read buffer. The counter read buffer latches the TM 20 count value, the buffer operation is held pending [...]

  • Página 118

    CHAPTER 6 16-BIT TIMER 20 118 User’s Manual U15331EJ4V1UD 6.5 Cautions on Using 16-Bit Timer 2 0 6.5.1 Restrictions w hen rewr iting 16-b it compare register 20 (1) Disable interrupts (T MMK20 = 1) and inversion contro l of timer output (TOC20 = 0) before rew riting the compare register (CR20). If the value in CR20 is rewritten in the interrupt-e[...]

  • Página 119

    CHAPTER 6 16-BIT TIMER 20 User’s Manual U15331EJ4V1UD 119 <Countermeasure B> When rew riting using 16-bit access <1> Disable interrupts (TMMK20 = 1) and invers ion control of timer output (TOC20 = 0). <2> Rew rite CR20 (16 bits). <3> Wait for one cycle or more of the count clock. <4> Clear the interrupt request flag [...]

  • Página 120

    120 User’s Manual U15331EJ4V1UD CHAPTER 7 8-BIT TIMERS 50, 60, AND 61 7.1 Functions of 8-Bit Timers 50, 60, and 61 One 8-bit timer channel (timer 50) and two 8-bit timer/ev ent counter channels (timer 60 and 61) are incorporated in the µ PD789489 Subseries. The operation modes listed in the following table can be set via mode register settings. [...]

  • Página 121

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 121 (5) PPG output mode (PPG: Programmable Pulse Generator) Pulses are output using any cycle or duty ratio (pulse width) set (both the cycle and pulse w idth are programmable). (6) 24-bit eve nt counter mode Operation as an external event counter with 24-bit resolution is enabled[...]

  • Página 122

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 122 7.2 Configuration of 8-Bit Timers 50, 60, and 61 8-bit timers 50, 60, and 61 in clude the follow ing hardware. Table 7-2. Configuration of 8-Bit Time rs 50, 60, and 61 Item Configuration Timer counter 8 bits × 3 (TM50, TM60, TM61) Registers Compare registers: 8 bits × 5 (CR5[...]

  • Página 123

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 123 Figure 7-2. Block Diagram of Timer 50 TEG50 TCL500 TCL501 8-bit timer mode control register 50 (TMC50) Decoder Selector Selector 8-bit compare register 50 (CR50) 8-bit timer counter 50 (TM50) Selector Count operation start signal from Figure 7-3(D) (cascade connection) INTTM50[...]

  • Página 124

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 124 TCE60 TCL602 TCL601 TCL600 TMD601 TMD600 TOE600 8-bit timer mode control register 60 (TMC60) Carrier generator output control register 60 (TCA60) Decoder 8-bit timer counter 60 (TM60) F/F TM50 match signal (in cascade connection mode) Count operation start signal to timer 50 ([...]

  • Página 125

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 125 TCE61 TCL612 TCL611 TCL610 TMD611 TMD610 TOE610 8-bit timer mode control register 61 (TMC61) Decoder 8-bit timer counter 61 (TM61) F/F Clear 8-bit compare register 61 (CR61) Selector INTTM61 Match TO61/TMI61 /INTP2/P32 Reset PPG mode 8-bit H width compare register 61 (CRH61) I[...]

  • Página 126

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 126 Figure 7-5. Block Diagram of Outp ut Controller (Timer 60) F/F RMC60 NRZ60 TOE60 PM31 P31 output latch Selector TO60/INTP1/P31 Carrier generator mode Carrier clock (1) 8-bit comp are register 50 (CR50) This 8-bit register is used to cont inually compare the value set to CR50 w[...]

  • Página 127

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 127 (4) 8-bit H w idth comp are registers 60 and 61 (CRH60, CRH61) In carrier generator mode and PPG output mode, the high-leve l width of timer output is set by writing a value to CRH6n. This 8-bit register is used to continually compare the value set to CRH6n wi th the count val[...]

  • Página 128

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 128 7.3 Control Registers for 8-Bit Timers 50, 60, and 61 8-bit timers 50, 60, and 61 are contro lled by the follow ing six registers. • 8-bit timer mode control register 50 (TMC50) • 8-bit timer mode control register 60 (TMC60) • Carrier generator output c ontrol register 6[...]

  • Página 129

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 129 Figure 7-6. Format of 8-Bit Timer Mode Control Regis ter 50 (2/2) Symbol <7> <6> 5 4 3 2 1 <0> Address After reset R/W TMC50 TCE50 TEG50 TCL502 TCL501 TCL500 TMD501 TMD500 TOE50 FF4DH 00H R/W TOE50 Control of timer output Note 4 0 Output disabled 1 Output ena[...]

  • Página 130

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 130 Figure 7-7. Format of 8-Bit Timer Mode Control Regis ter 60 Symbol <7> 6 5 4 3 2 1 <0> Address After reset R/W TMC60 TCE60 0 TCL602 TCL601 TCL600 TMD601 TMD600 TOE600 FF4EH 00H R/W TCE60 Control of TM60 count operation Note 1 0 Clear TM60 count value and stop opera[...]

  • Página 131

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 131 (3) Carrier generator output control register 60 (TCA60) This register is used to set the time r output data in carri er generator mode. TCA60 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets this register to 00H. Figure 7-8. Format of Carrier Gen[...]

  • Página 132

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 132 (4) 8-bit timer mod e control register 61 (TMC61) 8-bit timer mode control register 61 (TMC61) is us ed to control the timer 61 count clock setting and the operation mode setting. TMC61 is set with a 1-bit or 8-bi t memory manipulation instruction. RESET input sets this regist[...]

  • Página 133

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 133 (5) Port mode register 3 (PM3) This register is used to set the I/O mode of port 3 in 1-bit units. When using the P30/INTP0/TO 50/TMI60 pin as a timer out put (TO50), set PM30 and th e P30 output latch to 0. When used as a timer input (TMI60), set PM30 to 1. When using the P31[...]

  • Página 134

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 134 7.4 Operation of 8-Bit Timers 50, 60, and 61 7.4.1 Operation as 8-bit timer counter Timer 50, timer 60, and timer 61 can be independently used as 8-bit timer counters. The following modes can be used for the 8-bit timer counter. • Interval timer wi th 8-bit resolution • Ex[...]

  • Página 135

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 135 Table 7-3. Interval Time of Timer 50 TCL502 TCL501 TCL500 Minimum Interval Time Maximum Interval Time Resolution 0 0 0 1/f X (0.2 µ s) 2 8 /f X (51.2 µ s) 1/f X (0.2 µ s) 0 0 1 2 3 /f X (1.6 µ s) 2 11 /f X (409.6 µ s) 2 3 /f X (1.6 µ s) 0 1 0 2 7 /f X (25.6 µ s) 2 15 /f[...]

  • Página 136

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 136 Figure 7-11. Timing of Interv al Timer Operat ion with 8-Bit Resolution (Basic Operation) Count stop Count clock CRnm TCEnm INTTMnm TOnm N t TMnm N 00H 01H N 00H 01H N 00H 00H 01H 00H 01H Clear Clear Clear Count start Interrupt acknowledgement Interrupt acknowledgement Interru[...]

  • Página 137

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 137 Figure 7-13. Timing of Interv al Timer Operation with 8-Bit Resolution (When CRnm Is Set to FFH) Count clock CRnm TCEnm INTTMnm TOnm FFH TMnm FFH 00H 01H 00H 01H 00H FFH 00H 01H FFH FFH 00H Clear Clear Clear Count start Remark nm = 50, 60, 61 Figure 7-14. Timing of Interv al T[...]

  • Página 138

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 138 Figure 7-15. Timing of Interv al Timer Operation with 8-Bit Resolution (When CRnm Changes from N to M (N > M)) Count clock CRnm TCEnm INTTMnm TOnm TMnm 00H 00H 00H N − 1 N MN M N M 00H FFH M H Clear Clear Clear TMnm overflows because M < N CRnm overwritten Remark 00H ?[...]

  • Página 139

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 139 Figure 7-16. Timing of Interv al Timer Operation with 8-Bit Resolution (When Timer 60 Match Signal Is Selected for Timer 50 Count Clock) Timer 60 count clock CR60 TCE60 INTTM60 TO60 TM60 N 00H M 00H 00H 01H M N M 00H M 00H 00H 01H Y − 1 Y 00H Y 00H Y Input clock to timer 50 [...]

  • Página 140

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 140 (2) Ope ration as external ev ent counter with 8-bit resolution (timer 60 and timer 61 only ) The external event counter counts the number of external clock pulses input to the TMI6m pin by using 8-bit timer counter 6m (TM6m). To operate timer 6m as an external event counter, [...]

  • Página 141

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 141 (3) Operation as square-wave output w ith 8-bit resolution Square waves of any frequency can be output at an interval specified by the value preset in 8-bit compare register nm (CRnm). To operate timer nm for square-wave output, se ttings must be made in the following sequence[...]

  • Página 142

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 142 Table 7-7. Square-Wav e Output Range of Timer 60 TCL602 TCL601 TCL600 Minimum Pulse Width Maximum Pulse Width Resolution 0 0 0 1/f X (0.2 µ s) 2 8 /f X (51.2 µ s) 1/f X (0.2 µ s) 0 0 1 2 2 /f X (0.8 µ s) 2 10 /f X (204 µ s) 2 2 /f X (0.8 µ s) 0 1 0 f TMI input cycle f TM[...]

  • Página 143

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 143 7.4.2 Operation as 16-bit timer counter Timer 50 and timer 60 can be used as a 16-bit timer counter using cascade connection. In this case, 8-bit timer counter 50 (TM50) is the higher 8 bits and 8-bit timer counter 60 (TM60) is the lower 8 bits. 8-bit timer 60 controls reset a[...]

  • Página 144

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 144 Table 7-9. Interval Time with 16-Bit Reso lution TCL602 TCL601 TCL600 Minimum Interval Time Maximum Interval Time Resolution 0 0 0 1/f X (0.2 µ s) 2 16 /f X (13.1 ms) 1/f X (0.2 µ s) 0 0 1 2 2 /f X (0.8 µ s) 2 18 /f X (52.4 ms) 2 2 /f X (0.8 µ s) 0 1 0 f TMI input cy cle f[...]

  • Página 145

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 145 Interval time Count clock TM60 count value CR60 TCE60 INTTM60 TO60 FFH 00H 7FH 00H N 00H NN N N 80H 7FH 80H FFH 00H N 00H N N N TM50 count pulse TM50 00H X X − 1 01H CR50 X X X 7FH 80H FFH 00H N 00H N N N X X − 1 00H t Not cleared because TM50 does not match Cleared becaus[...]

  • Página 146

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 146 (2) Ope ration as external e vent counter with 16-bit resolution The external event counter counts t he number of external clock pulses input to the T MI60 pin by TM50 and TM60. To operate as an external event c ounter with 16-bit resolution, setti ngs must be made in the foll[...]

  • Página 147

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 147 TMI60 pin input TM60 count value CR60 TCE60 INTTM60 FFH 00H 7FH 00H N 00H NN N N 80H 7FH 80H FFH 00H N 00H N N N TM50 count pulse TM50 00H X 01H CR50 X X X 7FH 80H FFH 00H N 00H N N N X X − 1 00H X − 1 Not cleared because TM50 does not match Cleared because TM50 and TM60 m[...]

  • Página 148

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 148 (3) Operation as square-wave output w ith 16-bit resolution Square waves of any frequency can be out put at an interval specified by the count value preset in CR50 and CR60. To operate as a square-wave output w ith 16-bit resolu tion, settings must be made in the followi ng se[...]

  • Página 149

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 149 Count clock TM60 count value CR60 TCE60 INTTM60 TO60 Note FFH 00H 7FH 00H N 00H NN N N 80H 7FH 80H FFH 00H N 00H N N N TM50 count pulse TM50 00H X X − 1 01H CR50 X X X 7FH 80H FFH 00H N 00H N N N X X − 1 00H Not cleared because TM50 does not match Cleared because TM50 and [...]

  • Página 150

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 150 7.4.3 Operation as carrier generator An arbitrary carrier clock generated by TM60 can be output in the cy cle set in TM 50. To operate timer 50 and timer 60 as carrier generators, settings must be made in the following sequence. <1> Disable operation of TM50 and TM60 (TC[...]

  • Página 151

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 151 Figure 7-22. Timing of Carrier Ge nerator Operation (When CR60 = N, CRH60 = M (M > N)) TM60 count clock TM60 count value CR60 TCE60 INTTM60 M 00H N 00H 01H N CRH60 M N 00H Carrier clock N 00H 00H N M 00H 01H L L 00H 01H L 00H 01H L 00H L 00H 01H TM50 count value CR50 TCE50 [...]

  • Página 152

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 152 Figure 7-23. Timing of Carrier Ge nerator Operation (When CR60 = N, CRH60 = M (M < N)) TM60 count clock TM60 count value CR60 TCE60 INTTM60 N 00H N L CRH60 M Carrier clock N 00H 00H 01H L 00H 01H L 00H 01H L 00H L 00H 01H TM50 count value CR50 TCE50 INTTM50 TM50 count clock[...]

  • Página 153

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 153 Figure 7-24. Timing of Carrier Ge nerator Operation (When CR60 = CRH60 = N) TM60 count clock TM60 count value CR60 TCE60 INTTM60 N 00H 00H 00H N CRH60 N N Carrier clock 00H 00H N N 00H 01H L 00H 01H L 00H 01H L 00H L 00H 01H TM50 count value CR50 TCE50 INTTM50 TM50 count clock[...]

  • Página 154

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 154 7.4.4 PWM output mode operation (timer 50 ) In the PWM output mode, TO50 becom es high level when TM50 overflows, and TO50 becomes low level when CR50 and TM50 match. It is thus possible to output a pulse with any duty ratio (free-running). To operate timer 50 in the PWM outpu[...]

  • Página 155

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 155 Figure 7-26. Opera tion Timing When Overwriting CR50 (When Rising Edge Is Se lected) (1) When setting CR50 > TM50 after ov erflow Count clock CR50 TCE50 INTTM50 TO50 N TM50 N 00H 00H 00H 01H FFH M FFH 01H M Overflow Overflow Overflow Count start CR50 overwrite (2) When sett[...]

  • Página 156

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 156 Figure 7-27. Opera tion Timing in PWM Output Mode (When Both Edges A re Selected) (1) CR50 = Ev en number Count clock CR50 TCE50 INTTM50 TO50 2N TM50 2N 00H 00H 01H FFH FFH 2N 02H FEH 01H 02H FEH Overflow Overflow Count start (2) When CR5 0 = Odd number Count clock CR50 TCE50 [...]

  • Página 157

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 157 Figure 7-28. Oper ation Timing in PWM Output Mode (When Both Edges Are Selected) (When CR50 Is Overwritten) Count clock CR50 TCE50 INTTM50 TO50 2N + 1 TM50 2N 00H 00H 00H 01H FFH FFH 01H 2N + 1 01H 02H FEH 2N Overflow Overflow Overflow Count start CR50 overwrite Remark N = 00H[...]

  • Página 158

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 158 7.4.5 PPG output mode operation (timer 60 and timer 61) In the PPG output mode, a pulse of any duty ratio can be output by setting a low-level w idth using CR6m and a high-level width using CRH6m. To operate timer 6m in PPG output mode, se ttings must be made in the follow ing[...]

  • Página 159

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 159 Figure 7-29. PPG Output Mode Timing (Bas ic Operation) Count clock TM6m count value CR6m TCE6m INTTM6m 00H N 00H 01H N CRH6m M N TO6m Note 00H 00H 01H M 01H 01H M 00H Clear Clear Clear Clear Count start Note The initial value of TO6m is low level w hen output is enabled (TOE6m[...]

  • Página 160

    CHAPTER 7 8-BIT TIMERS 50, 60, A ND 61 User’s Manual U15331EJ4V1UD 160 7.5 Cautions on Using 8-Bit Timers 50, 60, and 61 (1) Error on starting timer An error of up to 1.5 clocks is included in the time between the timer being started and a match signal being generated. This is because the rising edge is detected and the counter is incremented if [...]

  • Página 161

    User’s Manual U15331EJ4V1UD 161 CHAPTER 8 WATCH TIMER 8.1 Watch Timer Functions The watch timer has the follow ing functions. • Watch timer • Interval timer The watch and interval timers can be used at the same time. Figure 8-1 shows a block diagram of the w atch timer. Figure 8-1. Block Diagram of Watch Time r f X /2 7 f XT /2 f XT Selector [...]

  • Página 162

    CHAPTER 8 WA TCH TIMER 162 User’s Manual U15331EJ4V1UD (1) Watch timer An interrupt request (INTWT) occurs at an interval of 0.5 second when using ei ther the 4.19 MHz main system clock or the 32.768 kHz subsystem clock. Also, an interrupt request (INTWT) occurs at an in terval of 1.0 seconds when using the 32.768 kHz subsystem clock via a settin[...]

  • Página 163

    CHAPTER 8 WA TCH TIMER User’s Manual U15331EJ4V1UD 163 8.3 Control Registers for Watch Timer The watch timer is controlled by the follow ing registers. • Watch timer mode control register (WTM) • Watch timer interrupt time selection register (WTIM) (1) Watch timer mode c ontrol register (WTM) This register is used to control t he watch timer [...]

  • Página 164

    CHAPTER 8 WA TCH TIMER 164 User’s Manual U15331EJ4V1UD (2) Watch timer interrupt ti me selection register (W TIM) This register is used to set the interrupt time by select ing either the source clock or the clock divided by 2 for the subsystem clock to be input to w atch timer. WTIM is set with a 1-bit or 8-bi t memory manipulation instruction. R[...]

  • Página 165

    CHAPTER 8 WA TCH TIMER User’s Manual U15331EJ4V1UD 165 8.4 Watch Timer Operation 8.4.1 Operation as w atch timer The main system clock (4.19 MHz) or subsystem clock (32.768 kHz) is used to enable the w atch timer to operate at 0.5-second intervals. Also, an interrupt request (INTWT) occurs at an interv al of 1.0 seconds when us ing the 32.768 kHz[...]

  • Página 166

    CHAPTER 8 WA TCH TIMER 166 User’s Manual U15331EJ4V1UD Figure 8-4. Watch Timer/Interv al Timer Operation Timing 0H Start Overflow Overflow 5-bit counter Count clock f W /2 9 Watch timer interrupt INTWT Interval timer interrupt INTWTI Watch timer interrupt time (0.5 s) Watch timer interrupt time (0.5 s) Interval time (T) T Caution When operation o[...]

  • Página 167

    User’s Manual U15331EJ4V1UD 167 CHAPTER 9 WATCHDOG TIMER 9.1 Watchdog Timer Functions The watchdog timer has the follow ing functions. • Watchdog timer • Interval timer Caution Select the watchdog timer mode or interval timer mode by using the w atchdog time r mode register (WDTM). (1) Watchdog timer The watchdog timer is used to detect a pro[...]

  • Página 168

    CHAPTER 9 WA TCHDOG TIMER 168 User’s Manual U15331EJ4V1UD 9.2 Watchdog Timer Configuration The watchdog timer includes the follow ing hardware. Table 9-3. Configuration of Watc hdog Timer Item Configuration Control registers Watchdog timer clock selection register (WDCS) Watchdog timer mode register (WDTM) Figure 9-1. Block Diagram of Watc hdog T[...]

  • Página 169

    CHAPTER 9 WA TCHDOG TIMER User’s Manual U15331EJ4V1UD 169 9.3 Watchdog Timer Control Registers The watchdog timer is controlled by the follow ing two registers. • Watchdog timer clock selection register (WDCS) • Watchdog timer mode register (WDTM) (1) Watc hdog timer clock selection register (WDCS) This register sets the watchdog timer count [...]

  • Página 170

    CHAPTER 9 WA TCHDOG TIMER 170 User’s Manual U15331EJ4V1UD (2) Watc hdog timer mode register (WDTM) This register sets the operation mode of the watchdog timer, and enables /disables counting of the wa tchdog timer. WDTM is set with a 1-bit or 8-bi t memory manipulation instruction. RESET input sets WDTM to 00H. Figure 9-3. Format of Watchdog Time[...]

  • Página 171

    CHAPTER 9 WA TCHDOG TIMER User’s Manual U15331EJ4V1UD 171 9.4 Watchdog Timer Operation 9.4.1 Operation as w atchdog timer The watchdog timer detects a program loop w hen bit 4 (W DT M4) of the w atchdog timer mode register (WDTM) is set to 1. The count clock (program loop detection time interval) of the watchdog timer can be selected by bits 0 to[...]

  • Página 172

    CHAPTER 9 WA TCHDOG TIMER 172 User’s Manual U15331EJ4V1UD 9.4.2 Operation as interval timer When bits 4 and 3 (WDTM4, WDT M3) of the w atchdog timer mode register (WDTM) are set to 0 and 1, respectively, the watchdog timer operates as an interval timer that repeatedly generates an interrupt at intervals specified by a preset count value. Select a[...]

  • Página 173

    User’s Manual U15331EJ4V1UD 173 CHAPTER 10 10-BIT A/D CONVERTER 10.1 10-Bit A/D Converter Functions The 10-bit A/D converter is a 10-bit resolution converter used to convert analog inputs into digital signals. This converter can control eight channels (ANI0 to ANI7) of analog inputs. A/D conversion can only be started by softw are. One of analog [...]

  • Página 174

    CHAPTER 10 10-BIT A /D CONVERTER 174 User’s Manual U15331EJ4V1UD Figure 10-1. Block Diagram of 10-Bit A/D Converter ANI3/P63 Sample & hold circuit Voltage comparator Successive approximation register (SAR) Controller A/D conversion result register 0 (ADCRL0) AV SS INTAD0 A/D converter mode register 0 (ADML0) Internal bus V SS ADCS0 FR02 FR01 [...]

  • Página 175

    CHAPTER 10 10-BIT A /D CONVERTER User’s Manual U15331EJ4V1UD 175 (3) Sample & hold circuit The sample & hold circuit samples consecutive analog inputs from the input ci rcuit, one by one, and sends them to the voltage comparator. The sampled analog input voltage is held during A/D conversion. (4) Voltage comparator The voltage comparator [...]

  • Página 176

    CHAPTER 10 10-BIT A /D CONVERTER 176 User’s Manual U15331EJ4V1UD 10.3 10-Bit A/D Converter Control Registers The 10-bit A/D converter is controll ed by the followi ng two registers. • A/D converter mode register 0 (ADML0) • Analog input channel specific ation register 0 (ADS0) (1) A /D conv erter mode register 0 (A DML0) ADML0 specifies the c[...]

  • Página 177

    CHAPTER 10 10-BIT A /D CONVERTER User’s Manual U15331EJ4V1UD 177 Cautions 1. Start conversion (A DCS0 = 1) after 14 µ s have elapsed following th e setting of A DCE0. If A DCE0 is not used, the con v ersion result immediately after the setting of b it 7 (A DCS0) is undefined. 2 . The conv ersion result may be undefined after A DCS0 has been clea[...]

  • Página 178

    CHAPTER 10 10-BIT A /D CONVERTER 178 User’s Manual U15331EJ4V1UD 10.4 10-Bit A/D Converter Operation 10.4.1 Basic operation of 10-bit A/D converter <1> Bit 0 of A/D converter mode regist er 0 (ADML0) is set (ADCE0 = 1). <2> Select a channel for A/D conversion, using analog input channel specificati on register 0 (ADS0). <3> When[...]

  • Página 179

    CHAPTER 10 10-BIT A /D CONVERTER User’s Manual U15331EJ4V1UD 179 Figure 10-4. Basic Operation of 10-Bit A /D Converter Conversion time Sampling time Sampling A/D conversion Undefined Conversion result Conversion result A/D converter operation SAR ADCRL0 INTAD0 A/D conversion continues until bit 7 (ADCS 0) of A/D converter mode register 0 (ADML0) [...]

  • Página 180

    CHAPTER 10 10-BIT A /D CONVERTER 180 User’s Manual U15331EJ4V1UD Figure 10-5. Relations hip Betw een A nalog Input Voltage and A /D Conversion Re sult 1,023 1,022 1,021 3 2 1 0 A/D conversion result (ADCRL0) 1 2,048 1 1,024 3 2,048 2 1,024 5 2,048 3 1,024 2,043 2,048 1,022 1,024 2,045 2,048 1,023 1,024 2,047 2,048 1 Input voltage/AV DD[...]

  • Página 181

    CHAPTER 10 10-BIT A /D CONVERTER User’s Manual U15331EJ4V1UD 181 10.4.3 Operation mode of 10-bit A/D converter The A/D converter is initially in select mode. In this mode, analog input channel specification regi ster 0 (ADS0) is used to select an analog input channel from ANI0 to ANI7 for A/D conversion. A/D conversion can be started only by soft[...]

  • Página 182

    CHAPTER 10 10-BIT A /D CONVERTER 182 User’s Manual U15331EJ4V1UD 10.5 Cautions Related to 10-Bit A/D Converter (1) Curre nt consumption in standby mode In standby mode, the A/D converter stops operation. Clearing bit 7 (ADCS0) and bit 0 (ADCE0) of A/D converter mode register 0 (ADML0) to 0 can reduce the curr ent consumption. Figure 10-7 shows ho[...]

  • Página 183

    CHAPTER 10 10-BIT A /D CONVERTER User’s Manual U15331EJ4V1UD 183 (5) Timing of unde fined A/D conv ersion result The A/D conversion value may becom e undefined if the timing of the co mpletion of A/D conversion and the timing to stop the A/D conversion operat ion conflict. Therefore, read the A/ D conversion result while the A/D conversion operat[...]

  • Página 184

    CHAPTER 10 10-BIT A /D CONVERTER 184 User’s Manual U15331EJ4V1UD (6) Noise prevention To maintain a resolution of 10 bits, watch for noise at the AV DD and ANI0 to ANI7 pins. The higher the output impedance of the analog input s ource, the larger the effect by noise. To reduce noise, attach an external capacitor to the relevant pi ns as shown in [...]

  • Página 185

    CHAPTER 10 10-BIT A /D CONVERTER User’s Manual U15331EJ4V1UD 185 (9) Interrupt request flag (A DIF0) Changing the contents of A/D converter mode register 0 (ADML0) does not clear the interrupt request flag (ADIF0). If the analog input pins are changed dur ing A/D conversion, therefore, the A/D conv ersion result and the conversion end interrupt r[...]

  • Página 186

    186 User’s Manual U15331EJ4V1UD CHAPTER 11 SERIAL INTERFACE 20 11.1 Serial Interface 20 Functions Serial interface 20 has the following three modes. • Operation stop mode • Asynchronous serial interface (UART) mode • 3-w ire serial I/O mode (1) Ope ration stop mode This mode is used when serial transfer is not performed. Pow er consumption [...]

  • Página 187

    CHAPTER 11 SERIA L INTERFA CE 20 User’s Manual U15331EJ4V1UD 187 Internal bus Receive buffer register 20 (RXB20) Switch of the first bit Asynchronous serial interface status register 20 (ASIS20) Serial operation mode register 20 (CSIM20) Receive shift register 20 (RXS20) CSIE20 DIR20 CSCK20 PE20 FE20 OVE20 TXE20 RXE20 PS201 PS200 CL20 SL20 Asynch[...]

  • Página 188

    CHAPTER 11 SERIA L INTERFA CE 20 188 User’s Manual U15331EJ4V1UD Clock for receive detection Transmit shift clock Receive shift clock Receive detection TXE20 RXE20 CSIE20 1/2 1/2 Transmit clock counter (3 bits) Receive clock counter (3 bits) 4 f X /2 f X /2 3 f X /2 4 f X /2 5 f X /2 6 f X /2 7 f X /2 8 f X /2 2 ASCK20/SCK20/P20 TPS203 TPS202 TPS[...]

  • Página 189

    CHAPTER 11 SERIA L INTERFA CE 20 User’s Manual U15331EJ4V1UD 189 (1) Transmit shift register 20 (TXS20) TXS20 is a register in which transmi t data is prepared. The transmit data is output from TXS20 bit-serially . When the data length is seven bits, bits 0 to 6 of t he data in T XS20 w ill be transmi t data. Writing data to TXS20 triggers transm[...]

  • Página 190

    CHAPTER 11 SERIA L INTERFA CE 20 190 User’s Manual U15331EJ4V1UD 11.3 Serial Interface 20 Control Registers Serial interface 20 is controlled by the follow ing six registers. • Serial operation mode register 20 (CSIM20) • Asynchronous serial interfac e mode register 20 (ASIM20) • Asynchronous serial interface status register 20 (ASIS20) •[...]

  • Página 191

    CHAPTER 11 SERIA L INTERFA CE 20 User’s Manual U15331EJ4V1UD 191 (2) A synchronous serial interface mode register 20 (A SIM20) ASIM20 is used to make the settings relat ed to asynchronous serial interface mode. ASIM20 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets ASIM20 to 00H. Figure 11-4. Format of A synchronous[...]

  • Página 192

    CHAPTER 11 SERIA L INTERFA CE 20 192 User’s Manual U15331EJ4V1UD Table 11-2. Serial Interface 20 Operation Mode Setting s (1) Ope ration stop mode ASIM20 CSIM20 TXE20 RXE20 CSIE20 DIR20 CSCK20 PM22 P22 PM21 P21 PM20 P20 First Bit Shift Clock P22/SI20/ RxD20 Pin Function P21/SO20/ TxD20 Pin Function P20/SCK20/ ASCK20 Pin Function 0 0 0 × × × No[...]

  • Página 193

    CHAPTER 11 SERIA L INTERFA CE 20 User’s Manual U15331EJ4V1UD 193 (3) A synchronous serial interface status register 20 (A SIS20) ASIS20 indicates the type of a recepti on error, if it occurs w hile asynch ronous serial interface mode is set. ASIS20 is set with a 1-bit or 8-bi t memory manipulation instruction. The contents of ASIS20 are undefined[...]

  • Página 194

    CHAPTER 11 SERIA L INTERFA CE 20 194 User’s Manual U15331EJ4V1UD (4) Baud ra te generator control register 20 (BRGC20) BRGC20 is used to specify the serial clock for serial interface 20. BRGC20 is set with an 8-bit memory manipulation instruction. RESET input sets BRGC20 to 00H. Figure 11-6. Format of Baud Rate Ge nerator Control Register 20 TPS2[...]

  • Página 195

    CHAPTER 11 SERIA L INTERFA CE 20 User’s Manual U15331EJ4V1UD 195 The baud rate transmit/receive clock to be generated is either a divided system clock signal, or a signal obtained by dividing the clock input to the ASCK20 pin. (a) Generation of UART baud rate transmit/receive clock form system clock The transmit/receive clock is generated by divi[...]

  • Página 196

    CHAPTER 11 SERIA L INTERFA CE 20 196 User’s Manual U15331EJ4V1UD (b) Generation of UART baud rate transmit/receiv e clock from ext ernal clock input to A SCK20 pin The transmit/receive clock is generated by dividing t he clock input from the ASCK20 pin. The baud rate of a clock generated from the clo ck input to the ASCK20 pin is es timated by us[...]

  • Página 197

    CHAPTER 11 SERIA L INTERFA CE 20 User’s Manual U15331EJ4V1UD 197 11.4 Serial Interface 20 Operation Serial interface 20 provides the following three modes. • Operation stop mode • Asynchronous serial interface (UART) mode • 3-w ire serial I/O mode 11.4.1 Operation stop mode In operation stop mode, serial trans fer is not executed, t hereby [...]

  • Página 198

    CHAPTER 11 SERIA L INTERFA CE 20 198 User’s Manual U15331EJ4V1UD (b) Asynchronous serial interface mode register 20 (A SIM20) ASIM20 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets ASIM20 to 00H. TXE20 0 1 Transmit operation control Transmit operation stopped Transmit operation enabled Receive operation stopped Rece[...]

  • Página 199

    CHAPTER 11 SERIA L INTERFA CE 20 User’s Manual U15331EJ4V1UD 199 11.4.2 A synchronous serial interface (UART) mode In this mode, the one-byte data follow ing the start bit is transmitted/received, enabli ng full-duplex communication. This device incorporates a UART- dedicated baud rate generator that enables communica tions at the desired baud ra[...]

  • Página 200

    CHAPTER 11 SERIA L INTERFA CE 20 200 User’s Manual U15331EJ4V1UD (b) Asynchronous serial interface mode register 20 (A SIM20) ASIM20 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets ASIM20 to 00H. TXE20 0 1 Transmit operation control Transmit operation stopped Transmit operation enabled Receive operation stopped Rece[...]

  • Página 201

    CHAPTER 11 SERIA L INTERFA CE 20 User’s Manual U15331EJ4V1UD 201 (c) Asy nchronous serial interface status register 20 (ASIS20) ASIS20 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets ASIS20 to 00H. PE20 0 1 Parity error flag No parity error occurred A parity error occurred (when the transmit parity and receive parit[...]

  • Página 202

    CHAPTER 11 SERIA L INTERFA CE 20 202 User’s Manual U15331EJ4V1UD (d) Baud rate generator control register 20 (BRGC20) BRGC20 is set with an 8-bit memo ry manipulation instruction. RESET input sets BRGC20 to 00H. TPS203 0 0 0 0 0 0 0 0 1 TPS202 0 0 0 0 1 1 1 1 0 f X /2 f X /2 2 f X /2 3 f X /2 4 f X /2 5 f X /2 6 f X /2 7 f X /2 8 (2.5 MHz) (1.25 [...]

  • Página 203

    CHAPTER 11 SERIA L INTERFA CE 20 User’s Manual U15331EJ4V1UD 203 Table 11-5. Example of Relation ship Between System Clock and Baud Rate Error (%) Baud Rate (bps) n BRGC20 Set Value f X = 5.0 MHz f X = 4.9152 MHz 1,200 8 70H 2,400 7 60H 4,800 6 50H 9,600 5 40H 19,200 4 30H 38,400 3 20H 76,800 2 10H 1.73 0 Caution Do not select n = 1 during operat[...]

  • Página 204

    CHAPTER 11 SERIA L INTERFA CE 20 204 User’s Manual U15331EJ4V1UD (2) Communication operation (a) Data format The transmit/receive data format is as shown in Figur e 11-7. One data frame c onsists of a start bit, character bits, parity bit, and stop bit(s). The specification of character bit length in one data frame, parity selection, and spec ifi[...]

  • Página 205

    CHAPTER 11 SERIA L INTERFA CE 20 User’s Manual U15331EJ4V1UD 205 (b) Parity types and operation The parity bit is used to detect a bit error in the communication data. Normally , the same kind of parity bit is used on the transmitting side and the receiving side. With even parity and odd parity, a one-bit (odd number) error can be detected. With [...]

  • Página 206

    CHAPTER 11 SERIA L INTERFA CE 20 206 User’s Manual U15331EJ4V1UD (c) Transmission A transmit operation is started by w r iting transmit data to transmit shift register 20 (TXS20). The start bit, parity bit, and stop bit(s) are added automatically. When the transmit operation starts, the data in TXS20 is shifted out, and when TXS20 is empty, a tra[...]

  • Página 207

    CHAPTER 11 SERIA L INTERFA CE 20 User’s Manual U15331EJ4V1UD 207 (d) Reception When bit 6 (RXE20) of asynchronous serial interface mode register 20 (ASIM20) is set (1), a receive operation is enabled and sampling of t he RxD20 pin input is performed. RxD20 pin input sampling is performed using t he serial clock specified by BRGC20. When the RxD20[...]

  • Página 208

    CHAPTER 11 SERIA L INTERFA CE 20 208 User’s Manual U15331EJ4V1UD (e) Receive errors The following three errors may occur during a receiv e operation: a parity e rror, framing error, and overrun error. After data reception, an error flag is se t in asynchronous serial in terface status register 20 (ASIS20). Receive error causes are shown in Table [...]

  • Página 209

    CHAPTER 11 SERIA L INTERFA CE 20 User’s Manual U15331EJ4V1UD 209 (f) Reading receive data When the reception completion interrupt (INTSR20) occurs, receive data can be read by reading the value of receive buffer register 20 (RXB20). To read the receive data stored in receive buffer register 20 (RXB20), read w hile reception is enabled (RXE20 = 1)[...]

  • Página 210

    CHAPTER 11 SERIA L INTERFA CE 20 210 User’s Manual U15331EJ4V1UD (3) Cautions related to UART mode (a) When bit 7 (T XE20) of asynchronous serial inte rface mode register 20 ( ASIM20) is cleared during transmission, be sure to set transmit shift regist er 20 (TXS20) to FFH, then set T XE20 to 1 before executing the next transmission. (b) W hen bi[...]

  • Página 211

    CHAPTER 11 SERIA L INTERFA CE 20 User’s Manual U15331EJ4V1UD 211 11.4.3 3-w ire serial I/O mode The 3-wire serial I/O mode is useful for connection of peripheral I/Os and display controllers, etc., w hich incorporate a conventional clocked se rial interface, such as the 75XL Series, 78K Series, and 17K Series. Communication is performed using thr[...]

  • Página 212

    CHAPTER 11 SERIA L INTERFA CE 20 212 User’s Manual U15331EJ4V1UD (b) Asynchronous serial interface mode register 20 (A SIM20) ASIM20 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets ASIM20 to 00H. When 3-wire serial I/O mode is sele cted, ASIM20 must be set to 00H. TXE20 0 1 Transmit operation control Transmit operat[...]

  • Página 213

    CHAPTER 11 SERIA L INTERFA CE 20 User’s Manual U15331EJ4V1UD 213 (c) Baud rate generator control register 20 (BRGC20) BRGC20 is set with an 8-bit memo ry manipulation instruction. RESET input sets BRGC20 to 00H. TPS203 0 0 0 0 0 0 0 0 TPS202 0 0 0 0 1 1 1 1 f X /2 f X /2 2 f X /2 3 f X /2 4 f X /2 5 f X /2 6 f X /2 7 f X /2 8 (2.5 MHz) (1.25 MHz)[...]

  • Página 214

    CHAPTER 11 SERIA L INTERFA CE 20 214 User’s Manual U15331EJ4V1UD (2) Communication operation In 3-wire serial I/O mode, data transmission/reception is performed in 8-bit units. Data is transmitted/ received bit by bit in synchronization w ith the serial clock. Transmit shift register 20 (TXS20/SIO20) and receiv e shift register 20 (RXS20) shift o[...]

  • Página 215

    CHAPTER 11 SERIA L INTERFA CE 20 User’s Manual U15331EJ4V1UD 215 Figure 11-11. 3-Wire Serial I/O Mode Timing (2/2) (ii) Slave operation timing (CSCK20=1) 12 3 45 6 7 8 DI7 DI6 DI5 DI4 DI3 DI2 DI1 DI0 DO7 DO6 DO5 DO4 DO3 DO2 DO1 DO0 SCK20 SI20 Note SO20 SIO20 write INTCSI20 Note The value of the last bit previously output is output. (3) Transfer s[...]

  • Página 216

    216 User’s Manual U15331EJ4V1UD CHAPTER 12 SERIAL INTERFACE 1A0 12.1 Function of Serial Interface 1A0 Serial interface 1A0 has the following three modes. • Operation stop mode • 3-w ire serial I/O mode • 3-w ire serial I/O mode with automatic transmit/receive function (1) Ope ration stop mode This mode is used when serial transfer w ill not[...]

  • Página 217

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 217 12.2 Configuration of Serial Interface 1A0 Serial interface 1A0 includes the following hardw are. Table 12-1. Configuration o f Serial Interface 1A 0 Item Configuration Registers Serial I/O shi ft register 1A0 (SIO1A0) Automatic data transmit/receive address pointer 0 (ADTP0) Contr[...]

  • Página 218

    CHAPTER 12 SERIA L INTERFA CE 1A0 218 User’s Manual U15331EJ4V1UD (1) Serial I/O shift register 1A 0 (SIO1A 0) This is an 8-bit register used to carry out par allel/serial conversion and to carry out serial transmission/reception (shift operation) in synchronization w ith the serial clock. SIO1A0 is set with an 8-bit me mory manipulation instruct[...]

  • Página 219

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 219 12.3 Control Registers for Serial Interface 1A0 Serial interface 1A0 is controlled by the follow ing five registers. • Serial operation mode register 1A0 (CSIM1A0) • Automatic data transmit/receive control register 0 (ADTC0) • Automatic data transmit/receive interv al specifi[...]

  • Página 220

    CHAPTER 12 SERIA L INTERFA CE 1A0 220 User’s Manual U15331EJ4V1UD Figure 12-2. Format of Serial Operatio n Mode Register 1A 0 Symbol <7> 6 <5> <4> 3 2 1 0 Address After reset R/W C SI M 1A 0 CSIE10 DIR10 ATE0 LSCK10 0 0 SCL101 SCL100 FF78H 00H R/W Specification of operation enable/disable CSIE10 Shift register operation Serial c[...]

  • Página 221

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 221 (2) A utomatic data transmit/receive control register 0 (ADTC0) This register sets automatic re ception enable/disable, the operation mode, and di splays the state of automatic transmit/receive control. ADTC0 is set via a 1-bit or 8-bit memory manipulation instruction. RESET input [...]

  • Página 222

    CHAPTER 12 SERIA L INTERFA CE 1A0 222 User’s Manual U15331EJ4V1UD (3) A utomatic data transmit/receive inte rv al specification register 0 (ADTI0) This register sets the autom atic data transmit/receive f unction data transfer interval. ADTI0 is set via a 1-bit or 8-bit memory manipulation instruction. RESET input sets this register to 00H. Figur[...]

  • Página 223

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 223 Figure 12-4. Format of Automatic Data Transmit /Receiv e Interval Specification Register 0 (2/2) Symbol <7> 6 5 <4> <3> <2> <1> <0> Address After reset R/W A DT I 0 ADTI07 0 0 ADTI04 ADTI03 ADTI02 ADTI01 ADTI00 FF7BH 00H R/W ADTI04 ADTI03 ADTI02 [...]

  • Página 224

    CHAPTER 12 SERIA L INTERFA CE 1A0 224 User’s Manual U15331EJ4V1UD 12.4 Serial Interface 1A0 Operation Serial interface 1A0 provides the following three modes. • Operation stop mode • 3-w ire serial I/O mode • 3-w ire serial I/O mode with automatic transmit/receive function 12.4.1 Operation stop mode In operation stop mode, serial transfer i[...]

  • Página 225

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 225 12.4.2 3-w ire serial I/O mode The 3-wire serial I/O mode is useful for connection of peripheral I/Os and display controllers, etc., w hich incorporate a conventional clocked se rial interface, such as the 75XL Series, 78K Series, and 17K Series. Communication is performed using th[...]

  • Página 226

    CHAPTER 12 SERIA L INTERFA CE 1A0 226 User’s Manual U15331EJ4V1UD Symbol <7> 6 <5> <4> 3 2 1 0 Address After reset R/W C SI M 1A 0 CSIE10 DIR10 ATE0 LSCK10 0 0 SCL101 SCL100 FF78H 00H R/W Specification of operation enable/disable CSIE10 Shift register operation Serial counter Port Note 0 Operation stopped Cleared Port function 1[...]

  • Página 227

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 227 (2) Communication operation In 3-wire serial I/O mode, data transmission/rec eption is performed in 8-bit units. Data is transmitted/received bit by bit in sync hronization with the serial clock. Serial I/O shift register 1A0 (SIO1A0 ) shift operations are performed in sy nchroniza[...]

  • Página 228

    CHAPTER 12 SERIA L INTERFA CE 1A0 228 User’s Manual U15331EJ4V1UD Figure 12-5. 3-Wire Serial I/O Mode Timing (2/2) (ii) Slav e operation timing 12 3 45 6 7 8 DI7 DI6 DI5 DI4 DI3 DI2 DI1 DI0 DO7 DO6 DO5 DO4 DO3 DO2 DO1 DO0 SCK10 SI10 Note SO10 SIO1A0 write INTCSI10 Note The value of the last bit previously output is output.[...]

  • Página 229

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 229 (3) MSB/LSB switching as th e start bit In the 3-wire serial I/O mode, transfer can be selected to start from the MSB or LSB. Figure 12-6 shows the configuration of serial I/O shift register 1A0 (SIO1A0) and the internal bus. As shown in the figure, MSB/LSB can be read/written in r[...]

  • Página 230

    CHAPTER 12 SERIA L INTERFA CE 1A0 230 User’s Manual U15331EJ4V1UD 12.4.3 3-w ire serial I/O mode with automatic transmit/receive function This 3-wire serial I/O mode is used for transmission/recept ion of a maximum of 16-byte data without the use of software. Once transfer is started, the set number of bytes of data prestor ed in the RAM can be t[...]

  • Página 231

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 231 Symbol <7> 6 <5> <4> 3 2 1 0 Address After reset R/W C SI M 1A 0 CSIE10 DIR10 ATE0 LSCK10 0 0 SCL101 SCL100 FF78H 00H R/W Specification of operation enable/disable CSIE10 Shift register operation Serial counter Port Note 0 Operation stopped Cleared Port function 1[...]

  • Página 232

    CHAPTER 12 SERIA L INTERFA CE 1A0 232 User’s Manual U15331EJ4V1UD (b) Automatic data transmit/receive control register 0 (A DTC0) ADTC0 is set via a 1-bit or 8-bit memory manipulation instruction. RESET input sets this register to 00H. Symbol <7> <6> 5 4 <3> 2 1 0 Address After reset R/W ADTC0 RE0 ARLD0 0 0 TRF0 0 0 0 FF79H 00H [...]

  • Página 233

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 233 (c) Automatic data transmit/receiv e inte rval specification register 0 (ADTI0) ADTI0 is set via a 1-bit or 8-bit memory manipulation instruction. RESET input sets this register to 00H. Symbol <7> 6 5 <4> <3> <2> <1> <0> Address After reset R/W A[...]

  • Página 234

    CHAPTER 12 SERIA L INTERFA CE 1A0 234 User’s Manual U15331EJ4V1UD Symbol <7> 6 5 <4> <3> <2> <1> <0> Address After reset R/W A DT I 0 ADTI07 0 0 ADTI04 ADTI03 ADTI02 ADTI01 ADTI00 FF7BH 00H R/W ADTI04 ADTI03 ADTI02 ADTI01 ADTI00 Data transfer interval specification (f X = 5.0 MHz, f SCK = 1.25 MHz) Note 2 n 1 0[...]

  • Página 235

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 235 (2) A utomatic transmit/receive data setting (a) Transmit data setting <1> Write transmit data from the leas t significant address FFA0H of buffer RAM (up to FFAFH). T he transmit data should be in the order from higher address to lower address. <2> Set the value obtain[...]

  • Página 236

    CHAPTER 12 SERIA L INTERFA CE 1A0 236 User’s Manual U15331EJ4V1UD (3) Communication operation (a) Basic transmit/receive mode This transmit/receive mode is the same as the 3-wire serial I/O mode in w hich the specified number of data are transmitted/received in 8-bit units. Serial transfer is started when any data is w ritten to serial I/O shift [...]

  • Página 237

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 237 Figure 12-8. Basic Transmit/Receive Mode Flow chart Remark ADTP0: Automatic data transmit/receive address pointer 0 ADTI0: Automatic data transmit/receive interval specification register 0 SIO1A0: Serial I/O shift register 1A0 TRF0: Bit 3 of automatic data transmi t/receive control[...]

  • Página 238

    CHAPTER 12 SERIA L INTERFA CE 1A0 238 User’s Manual U15331EJ4V1UD In 6-byte transmission/reception (bit 6 (ARLD0) and bi t 7 (RE0) of automatic data transmit/receive control register 0 (ADTC0) = 0, and 1, respectively) in basic transmit/receive mode, buffer RAM operates as follow s. (i) Before transmission /reception (refer to Figure 12-9 (a)) Af[...]

  • Página 239

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 239 Figure 12-9. Buffer RAM Operation in 6-Byte Transmission/Reception (in Basic Transmit/Receive Mode) (2/2) (b) 4th byte transmission/reception Receive data 1 (R1) Receive data 2 (R2) Receive data 3 (R3) Transmit data 4 (T4) Transmit data 5 (T5) Transmit data 6 (T6) FFAFH FFA5H FFA0H[...]

  • Página 240

    CHAPTER 12 SERIA L INTERFA CE 1A0 240 User’s Manual U15331EJ4V1UD (b) Basic transmit mode In this mode, the specified number of 8-bit unit data are transmitted. Serial transfer is started when any data is w ritten to serial I/O shift register 1A0 (SIO1A0) while bit 7 (CSIE10) of serial operation mode r egister 1A0 (CSIM1A0) is set to 1, and bit 7[...]

  • Página 241

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 241 Figure 12-11. Basic Transmit Mode Fl owchart Remark ADTP0: Automatic data transmit/receive address pointer 0 ADTI0: Automatic data transmit/receive interval specification register 0 SIO1A0: Serial I/O shift register 1A0 TRF0: Bit 3 of automatic data transmi t/receive control regist[...]

  • Página 242

    CHAPTER 12 SERIA L INTERFA CE 1A0 242 User’s Manual U15331EJ4V1UD In 6-byte transmission (bit 6 (ARLD0) and bit 7 (RE0) of automatic data transmit/rec eive control register 0 (ADTC0) are 0) in basic transmit mode, buffer RAM operates as follows. (i) Before transmission (refer to Figure 12-12 (a)) After any data has been w ritten to SIO1A0 (start [...]

  • Página 243

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 243 Figure 12-12. Buffer RAM Operation in 6-Byte Transmission (in Basic Transmit Mode) (2/2) (b) 4th byte tra nsmission point Transmit data 1 (T1) Transmit data 2 (T2) Transmit data 3 (T3) Transmit data 4 (T4) Transmit data 5 (T5) Transmit data 6 (T6) FFAFH FFA5H FFA0H SIO1A0 0 CSIIF10[...]

  • Página 244

    CHAPTER 12 SERIA L INTERFA CE 1A0 244 User’s Manual U15331EJ4V1UD (c) Repeat transmit mode In this mode, data stored in the buffer RAM is transmitted repeatedly. Serial transfer is started by w riting any data to seri al shift I/O register 1A0 (SIO1A0) when bit 7 (CSIE10) of serial operation mode register 1A0 (CSIM1A0) is set to 1, and bit 7 (RE0[...]

  • Página 245

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 245 Figure 12-14. Repeat Transmit Mod e Flowchart Start Write transmit data in buffer RAM Set ADTP0 to the value (pointer value) obtained by subtracting 1 from the number of transmit data bytes Set the transmission/reception operation interval time in ADTI0 Write any data to SIO1A0 (St[...]

  • Página 246

    CHAPTER 12 SERIA L INTERFA CE 1A0 246 User’s Manual U15331EJ4V1UD In 6-byte transmission (bit 6 (ARLD0) and bit 7 (RE0) of automatic data transmit/rec eive control register 0 (ADTC0) are 1 and 0, respectively) in repeat transmit mode, buffer RAM operates as follow s. (i) Before transmission (refer to Figure 12-15 (a)) After any data has been w ri[...]

  • Página 247

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 247 Figure 12-15. Buffer RAM Operation in 6-Byte Transmission (in Repeat Transmit Mode) (2/2) (c) Upon completion of transmission of 6 bytes Transmit data 1 (T1) Transmit data 2 (T2) Transmit data 3 (T3) Transmit data 4 (T4) Transmit data 5 (T5) Transmit data 6 (T6) FFAFH FFA5H FFA0H S[...]

  • Página 248

    CHAPTER 12 SERIA L INTERFA CE 1A0 248 User’s Manual U15331EJ4V1UD (d) Automatic transmission/reception su spension and restart Automatic transmission/reception can be temporarily suspended by setting bit 7 (CSIE10) of serial operation mode register 1A0 (CSIM1A0) to 0. During 8-bit data transfer, the transmi ssion/reception is not suspended if bit[...]

  • Página 249

    CHAPTER 12 SERIA L INTERFA CE 1A0 User’s Manual U15331EJ4V1UD 249 (4) Timing of inte rrupt request signal generation The interrupt request signal is generated in synchroni zation w ith the timing shown in Table 12-2. Table 12-2. Timing of Interrupt Re quest Signal Generation Operation Mode Timing of Interrupt Request Signal Master mode 10th seria[...]

  • Página 250

    250 User’s Manual U15331EJ4V1UD CHAPTER 13 LCD CONTROLLER/DRIVER 13.1 LCD Controller/Driver Functions The functions of the LCD controller/driver of the µ PD789489 Subseries are as follows. (1) Automatic output of segment and common signal s based on automatic display data memory read (2) Tw o different display modes: • 1/3 duty (1/3 bias) • [...]

  • Página 251

    CHAPTER 13 LCD CONTROLLER/DRIVER User’s Manual U15331EJ4V1UD 251 The correspondence with the LCD display RAM is show n in Figure 13-1 below. Figure 13-1. Correspondence w ith LCD Display RA M Address Bit Segment 7 6 5 4 3 2 1 0 FA1BH 0 0 0 0 → S27 Note FA1AH 0 0 0 0 → S26 Note FA19H 0 0 0 0 → S25 Note FA18H 0 0 0 0 → S24 Note FA17H 0 0 0 [...]

  • Página 252

    CHAPTER 13 LCD CONTROLLER/DRIVER 252 User’s Manual U15331EJ4V1UD LCDC03 LCDC02 LCDC01 LCDC00 2 2 f LCD 2 6 f LCD 2 7 f LCD 2 8 f LCD 2 9 LCDON0 VAON0 V LC0 COM0 COM1 COM2 COM3 3210 3210 65 74 FA00H LCDON0 3210 3210 65 74 FA1BH LCDON0 S27 f X /2 5 f X /2 6 f X /2 7 f XT S0 f LCD 3210 3210 65 74 FA0FH LCDON0 S15 LCDCL LIPS0 GAIN V LC2 CAPH CAPL V L[...]

  • Página 253

    CHAPTER 13 LCD CONTROLLER/DRIVER User’s Manual U15331EJ4V1UD 253 13.3 Registers Controlling LCD Controller/Driver The LCD controller/driver is controll ed by the following three registers. • LCD display mode register 0 (LCDM0) • LCD clock control register 0 (LCDC0) • LCD voltage boost control register 0 (LCDVA0)[...]

  • Página 254

    CHAPTER 13 LCD CONTROLLER/DRIVER 254 User’s Manual U15331EJ4V1UD (1) LCD display mode register 0 (LCDM0) LCDM0 specifies whether to enable display . It also specifies whether to enable booster circuit operation, segment pin/common pin out put, and the display mode. LCDM0 is set with a 1-bit or 8-bi t memory manipulation instruction. RESET input s[...]

  • Página 255

    CHAPTER 13 LCD CONTROLLER/DRIVER User’s Manual U15331EJ4V1UD 255 (2) LCD clock control register 0 (LCDC0) LCDC0 specifies the LCD source clock and LCD clock. The frame frequency is determined according to the LCD clock and number of time slices. LCDC0 is set with a 1-bit or 8-bi t memory manipulation instruction. RESET input sets LCDC0 to 00H. Fi[...]

  • Página 256

    CHAPTER 13 LCD CONTROLLER/DRIVER 256 User’s Manual U15331EJ4V1UD (3) LCD v oltage boost control register 0 (LCDVA 0) LCDVA0 controls the voltage boost le vel during the volt age boost operation. LCDVA0 is set with a 1-bit or 8-bi t memory manipulation instruction. RESET input sets LCDVA0 to 00H. Figure 13-5. Format of LCD Voltage Boost Control Re[...]

  • Página 257

    CHAPTER 13 LCD CONTROLLER/DRIVER User’s Manual U15331EJ4V1UD 257 13.4 Setting LCD Controller/Driver Set the LCD controller/driver using the following procedure. <1> Set the LCD clock using LCD clock control register 0 (LCDC0). <2> Set the voltage boost level using LCD vo ltage boost control register 0 (LCDVA0). GAIN = 0: VLC0 = 4.5 V,[...]

  • Página 258

    CHAPTER 13 LCD CONTROLLER/DRIVER 258 User’s Manual U15331EJ4V1UD 13.6 Common and Segment Signals Each pixel of the LCD panel turns on when the pot ential difference betw een the corresponding common and segment signals becomes higher than a s pecific voltage (LCD drive voltage, V LCD ). It turns off when the potential difference becomes lower tha[...]

  • Página 259

    CHAPTER 13 LCD CONTROLLER/DRIVER User’s Manual U15331EJ4V1UD 259 Figure 13-7. Common Signal Wav eforms COMn (Three-time-slice mode) T F = 3 × T V LC0 V SS V LCD V LC1 V LC2 T F = 4 × T COMn (Four-time-slice mode) V LC0 V LCD V LC1 V LC2 V SS T: One LCD clock period T F : Frame frequency Figure 13-8. Voltages and Phases of Common and Segment Sig[...]

  • Página 260

    CHAPTER 13 LCD CONTROLLER/DRIVER 260 User’s Manual U15331EJ4V1UD 13.7 Display Modes 13.7.1 Three-time-slice display example Figure 13-10 shows how a nine-digit LCD panel having the di splay pattern show n in Figure 13-9 is connected to the segment signals (S0 to S26) and the common signals (COM0 to COM2) of the µ PD789489 Subseries chip. This ex[...]

  • Página 261

    CHAPTER 13 LCD CONTROLLER/DRIVER User’s Manual U15331EJ4V1UD 261 Figure 13-10. Exam ple of Connecting Three-Time-Slice LCD Panel ××××××××××××××××××××××××××× x’ 00 x’ 10 x’ 10 x’ 00 x’ 10 x’ 11 x’ 00 x’ 10 x’ 00 01 10 11 11 11 11 01 11 11 001011011101110110111111111 Bit 3 Bit 2 Bit 1 Bit 0 Timing strobe[...]

  • Página 262

    CHAPTER 13 LCD CONTROLLER/DRIVER 262 User’s Manual U15331EJ4V1UD Figure 13-11. Three-Time-Slic e LCD Drive Wav eform Examples (1/3 Bias Method) V LC0 V LC2 COM0 +V LCD 0 COM0-S9 -V LCD V LC1 +1/3V LCD -1/3V LCD V SS V LC0 V LC2 COM1 V LC1 V SS V LC0 V LC2 COM2 V LC1 V SS V LC0 V LC2 S9 V LC1 V SS +V LCD 0 COM1-S9 -V LCD +1/3V LCD -1/3V LCD +V LCD[...]

  • Página 263

    CHAPTER 13 LCD CONTROLLER/DRIVER User’s Manual U15331EJ4V1UD 263 13.7.2 Four-time-slice display example Figure 13-13 shows how a 14-digit LCD panel having the disp lay pattern show n in Figure 13-12 is connected to the segment signals (S0 to S27) and the co mmon signals (COM0 to COM3) of the µ PD789489 Subseries chip. This example displays the d[...]

  • Página 264

    CHAPTER 13 LCD CONTROLLER/DRIVER 264 User’s Manual U15331EJ4V1UD Figure 13-13. Exa mple of Connecting Four-Time-Slice LCD Panel 0010100010110010001000101000 0110010101110111011101100101 0111111110100111110101111111 0001011011111111111100010110 Bit 3 Bit 2 Bit 1 Bit 0 Timing strobe Data memory address LCD panel FA00H 1 2 3 4 5 6 7 8 9 A B C D E F [...]

  • Página 265

    CHAPTER 13 LCD CONTROLLER/DRIVER User’s Manual U15331EJ4V1UD 265 Figure 13-14. Four-Time-Slice LCD Drive Wav eform Examples (1/3 Bias Me thod) T F V LC0 V LC2 COM0 +V LCD 0 COM0-S16 -V LCD V LC1 +1/3V LCD -1/3V LCD V SS V LC0 V LC2 COM1 V LC1 V SS V LC0 V LC2 COM2 V LC1 V SS V LC0 V LC2 COM3 V LC1 V SS +V LCD 0 COM1-S16 -V LCD +1/3V LCD -1/3V LCD[...]

  • Página 266

    CHAPTER 13 LCD CONTROLLER/DRIVER 266 User’s Manual U15331EJ4V1UD 13.8 Supplying LCD Driv e Voltages V LC0 , V LC1 , and V LC2 The µ PD789489 Subseries contains a booster circuit ( × 3 only) to generate a supply volt age to drive the LCD. T he internal LCD reference vo ltage is output from the V LC2 pin. A voltage two times higher than that on V[...]

  • Página 267

    User’s Manual U15331EJ4V1UD 267 CHAPTER 14 MULTIPLIER 14.1 Multiplier Function The multiplier has the following function. • Calculation of 8 bits × 8 bits = 16 bits 14.2 Multiplier Configuration (1) 16-bit multiplication result storage register 0 (MUL0) This register stores the 16-bi t result of multiplication. This register holds the result o[...]

  • Página 268

    CHAPTER 14 MULTIPLIER 268 User’s Manual U15331EJ4V1UD Figure 14-1. Block Diagram of Multiplier Internal bus Selector Counter value 3 CPU clock Start Clear Counter output 16-bit adder 16-bit multiplication result storage register 0 (Master) (MUL0) 16-bit multiplication result storage register 0 (Slave) Multiplication data register A (MRA0) Multipl[...]

  • Página 269

    CHAPTER 14 MULTIPLIER User’s Manual U15331EJ4V1UD 269 14.3 Multiplier Control Register The multiplier is controlled by the following register. • Multiplier control register 0 (MULC0) (1) Multiplier control register 0 (MULC0) MULC0 indicates the operating status of the multiplier after operation, as well as controls the multiplier. MULC0 is set [...]

  • Página 270

    CHAPTER 14 MULTIPLIER 270 User’s Manual U15331EJ4V1UD 14.4 Multiplier Operation The multiplier of the µ PD789489 Subseries can execute t he calculation of 8 bits × 8 bits = 16 bits. Figure 14-3 shows the operation timing of the mu ltiplier w here MRA0 is set to AAH and MRB0 is set to D3H. <1> Counting is started by setting MULST0. <2&g[...]

  • Página 271

    User’s Manual U15331EJ4V1UD 271 CHAPTER 15 REMOTE CONTROLLER RECEIVER ( µ PD789489, 78F 9489 ONLY) 15.1 Remote Controller Receiver Functions The remote controller receiver uses the following rem ote controller modes. • T ype A reception mode … Guide pulse (h alf clock) provided 15.2 Remote Controller Receiver Configuration The remote control[...]

  • Página 272

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 272 Figure 15-1. Block Diagram of Remote Controller Receiver RIN/P34 Noise canceler f X /2 6 f X /2 7 f X /2 8 f XT Clock counter Selector Remote controller receive control register ( RMCN) Internal bus RMIN PRSEN RMCK1 RMCK0 Input control Edge detect[...]

  • Página 273

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 273 (2) Remote contr oller receive data register (R MDR) This register holds the remote contro l ler reception data. When the remote controller receive shift register (RMSR) overflows, the data in RMSR is transferred to RM DR. Bit 7 stores the last da[...]

  • Página 274

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 274 (4) Remote cont roller receive GPHS compare register (RMGPHS) This register is used to detect the high level of a remote controller guid e pulse (short side). RMGPHS is set with an 8-bit me mory manipulation instruction. RESET input sets RMGPHS to[...]

  • Página 275

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 275 (8) Remote cont roller receive DH0S compare register (RMDH0S) This register is used to detect the high level of remote controller data 0 (short side). RMDH0S is set with an 8-bit memo ry manipulation instruction. RESET input sets RMDH0S to 00H. (9[...]

  • Página 276

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 276 (12) Remote co ntroller receive end-w id th select register (RMER) This register determines the interval bet ween t he timing at which the INT REND signal is output. RMER is set with an 8-bit memory manipulation instruction. RESET input sets RMER [...]

  • Página 277

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 277 15.3 Registers to Control Remote Co ntroller Receiver The remote controller receiver is controlled b y the following register . • Remote controller receive control register (RMCN) (1) Remote cont roller receive control register (RMCN) This regis[...]

  • Página 278

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 278 Figure 15-3. Format of Remo te Controller Receive Control Register (2/2) Symbol 7 6 5 4 3 2 1 0 Address After reset R/W RMCN RMEN NCW PRSEN RMIN 0 0 RMCK1 RMCK0 FF60H 00H R/W RMCK1 RMCK0 Selection of source clock (f REM ) of remote controller coun[...]

  • Página 279

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 279 15.4 Operation of Remote Controller Receiv er The following remote controller reception m ode is used for this remote controller receiver . • T ype A reception mode with guide pulse (half clock) 15.4.1 Format of ty pe A reception mode Figure 15-[...]

  • Página 280

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 280 Figure 15-5. Operation Flow of Type A Reception Mode Note Read RM DR before data has been set to all the bits of RMSR. Longer than END interval? No Yes Start Yes No Generate INTGP Set data to all bits of RMSR OK? No Guide pulse high level width OK[...]

  • Página 281

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 281 15.4.3 Timing Operation varies dependin g on the positi ons of the RIN input waveform below . (1) Guide pulse high level wid th determination Relationship Between RMGPHS/RMGPHL/Counter Position of W aveform Corresponding Operation Counter < PMG[...]

  • Página 282

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 282 (3) Data high lev el width determination Relationship Between RMDH0S/RMDH0L/RMDH1S/RM DH1L/Counter Position of W aveform Corresponding Operation Counter < RMDH0S <1>: Short Error interrupt IN TRERR is generated. Measuring the guide pulse [...]

  • Página 283

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 283 (4) End widt h determination RIN RMDLS RMDLL <1> <2> RIN RMER ∆ Relationship Between RMER/Counter Posi tion of Waveform Corresponding Operation Counter < RMER <1>: Short Error interrupt INTRERR is generated. Measuring the gu[...]

  • Página 284

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 284 Figure 15-6. Setting Ex ample (Where n1 = 1, n2 = 2) RIN RIN_2 T W RIN_1 Clock RMGPHS/RMDH0S/RMDH1S n1 n2 RMGPHL/RMDH0L/RMDH1L RMDLS RMDLL T WE RMER (1) Formula for RMGPHS, RMDLS, RMDH0S, and RMDH1S − 2 − n1 (2) Formula for RMGPHL, RMDLL, RMDH[...]

  • Página 285

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 285 15.4.5 Error interrupt generation timing After the guide pulse has been detected normally , the IN TRERR signal is generated und er any of the following conditions. • Counter < RMDLS at the rising edge of RIN • RMDLL ≤ count er and counte[...]

  • Página 286

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 286 Figure 15-7. Gene ration Timing of INTRERR Signal RIN INTRERR RIN INTRERR RIN INTRERR RIN INTRERR RIN INTRERR RIN INTRERR RIN INTRERR INTREND RIN INTRERR RIN INTRERR Example 1 Counter < RMGPHS → INTRERR is not generated. Basic waveform Exampl[...]

  • Página 287

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 287 15.4.6 Noise elimination This remote controller receiver provides a function that supplies the signa ls input from the outside to the RIN pin after eliminating noise. Noise width can be eliminated by setting bit 5 (PRSEN) and bit 6 (NCW ) of the r[...]

  • Página 288

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 288 Figure 15-8. Noise Elimination Operation Example (1/2) (a) 1-clock noise elimination (PRSEN = 0, NCW = 0) Remark Internal RIN is a signal after synchronization and samplin g are performed twice, and is therefore later than the actual signal input [...]

  • Página 289

    CHAPTER 15 REMOTE CONTROL LER RECEIVER ( µ PD789489, 78F9489 ONL Y) User’s Manual U15331EJ4V1UD 289 Figure 15-8. Noise Elimination Operation Example (2/2) (c) 2-clock noise elimination (PRSEN = 1, NCW = 0) Remark Internal RIN is a signal after synchronization and samplin g are performed twice, and is therefore later than the actual signal input [...]

  • Página 290

    290 User’s Manual U15331EJ4V1UD CHAPTER 16 INTERRUPT FUNCTIONS 16.1 Interrupt Function Types The following tw o types of interrupt functions are used. (1) Non-maskable interrupt This interrupt is acknowledged unconditionally. It does not undergo interrupt priority control and is given top priority over all other interrupt requests. A standby rele[...]

  • Página 291

    CHAPTER 16 INTERRUPT FUNCTIONS User’s Manual U15331EJ4V1UD 291 Table 16-1. Interrupt Sources ( µ PD789488, 78F9488) Interrupt Source Interrupt Type Priority Note 1 Name Trigger Internal/ External Vector Table Address Basic Configuration Type Note 2 Non-maskable − INTWDT Watchdog timer overflow (with watchdog timer mode 1 selected) (A) 0 INTWDT[...]

  • Página 292

    CHAPTER 16 INTERRUPT FUNCTIONS 292 User’s Manual U15331EJ4V1UD Table 16-2. Interrupt Sources ( µ PD789489, 78F9489) Interrupt Source Interrupt Type Priority Note 1 Name Trigger Internal/ External Vector Table Address Basic Configuration Type Note 2 Non-maskable − INTWDT Watchdog timer overflow (with watchdog timer mode 1 selected) (A) 0 INTWDT[...]

  • Página 293

    CHAPTER 16 INTERRUPT FUNCTIONS User’s Manual U15331EJ4V1UD 293 Figure 16-1. Basic Configur ation of Interrupt Function (A ) Internal non-maskable interrupt Internal bus Interrupt request Vector table address generator Standby release signal (B) Internal maskable interrupt MK IF IE Internal bus Interrupt request Vector table address generator Stan[...]

  • Página 294

    CHAPTER 16 INTERRUPT FUNCTIONS 294 User’s Manual U15331EJ4V1UD 16.3 Registers Controlling Interrupt Function The following five types of registers are used to control the interrupt functions. • Interrupt request flag registers (IF0 to IF2) • Interrupt mask flag registers (MK0 to MK2) • External interrupt mode registers (INTM0 and INTM1) •[...]

  • Página 295

    CHAPTER 16 INTERRUPT FUNCTIONS User’s Manual U15331EJ4V1UD 295 (1) Interrupt request flag registers (IF0 to IF2) An interrupt request flag is set (1) when the co rresponding interrupt request is generated, or w hen an instruction is executed. It is cl eared (0) w hen the interrupt request is acknowledged, when the RESET signal is input, or when a[...]

  • Página 296

    CHAPTER 16 INTERRUPT FUNCTIONS 296 User’s Manual U15331EJ4V1UD (2) Interrupt mask flag registers (MK0 to MK2) Interrupt mask flags are used to enable and di sable the corresponding maskable interrupts. MK0 to MK2 are set with a 1-bit or 8- bit memory manipulation instruction. RESET input sets these registers to FFH. Figure 16-3. Format of In terr[...]

  • Página 297

    CHAPTER 16 INTERRUPT FUNCTIONS User’s Manual U15331EJ4V1UD 297 (3) External interrupt mode registers (INTM0, INT M1) These registers are used to specify the valid edge for INTP0 to INTP3. INTM0 and INTM1 are set with an 8-bit memory manipulation instruction. RESET input sets these registers to 00H. Figure 16-4. Format of Externa l Interrupt Mode [...]

  • Página 298

    CHAPTER 16 INTERRUPT FUNCTIONS 298 User’s Manual U15331EJ4V1UD (4) Program status word (PSW) The program status word is used to hold the instruction execution resu lts and the current status of the interrupt requests. The IE flag, used to enable and disable maskable interrupts, is mapped to the PSW. The PSW can be read and written in 8-bit units,[...]

  • Página 299

    CHAPTER 16 INTERRUPT FUNCTIONS User’s Manual U15331EJ4V1UD 299 (5) Key return mo de register 00 (KRM00) This register is used to set the pin that is to detect the key return signal (rising edge of port 0). KRM00 is set with a 1-bit or 8-bi t memory manipulation instruction. RESET input sets this register to 00H. Figure 16-6. Format of Key Return [...]

  • Página 300

    CHAPTER 16 INTERRUPT FUNCTIONS 300 User’s Manual U15331EJ4V1UD (6) Key return mo de register 01 (KRM01) ( µ PD789489, 78F9489 only) This register is used to set the pin that is to detect the key return signal (falling edge of port 6). KRM01 is set with a 1-bit or 8-bi t memory manipulation instruction. RESET input sets this register to 00H. Figu[...]

  • Página 301

    CHAPTER 16 INTERRUPT FUNCTIONS User’s Manual U15331EJ4V1UD 301 16.4 Interrupt Servicing Operation 16.4.1 Non-maskable interrupt req uest acknowledg ment operation The non-maskable interrupt request is unconditionally ack nowledged even w hen interrupts are disabled. It is not subject to interrupt priority control and takes precedence over all oth[...]

  • Página 302

    CHAPTER 16 INTERRUPT FUNCTIONS 302 User’s Manual U15331EJ4V1UD Figure 16-10. Flow from Generation of Non-Maskable In terrupt Request to A cknow ledgment Start WDTM4 = 1 (watchdog timer mode is selected) Interval timer No WDT overflows No Yes Reset processing No Yes Yes Interrupt request is generated Interrupt servicing starts WDTM3 = 0 (non-maska[...]

  • Página 303

    CHAPTER 16 INTERRUPT FUNCTIONS User’s Manual U15331EJ4V1UD 303 16.4.2 Maskable interrupt request ackno wledgment op eration A maskable interrupt request can be acknowledged w hen the interrupt request flag is set to 1 and the corresponding interrupt mask flag is cleared to 0. A vector ed interrupt is acknowledged in the interrupt enabled status ([...]

  • Página 304

    CHAPTER 16 INTERRUPT FUNCTIONS 304 User’s Manual U15331EJ4V1UD Figure 16-14. Interrupt Reque st Acknowledgment Timing (Example: MOV A , r) Clock CPU MOV A, r Saving PSW and PC, and jump to interrupt servicing 8 clocks Interrupt servicing program Interrupt If the interrupt request has generated an interrupt request flag (xxIFx) by t he time the in[...]

  • Página 305

    CHAPTER 16 INTERRUPT FUNCTIONS User’s Manual U15331EJ4V1UD 305 Figure 16-16. Example of Mu ltiple Interrupt Servicing Example 1. A cknowledging multiple interrupts INTyy EI Main servicing EI INTyy servicing INTxx servicing RETI IE = 0 INTxx RETI IE = 0 The interrupt request INTyy is acknow ledged during the serv icing of interrupt INT xx and mult[...]

  • Página 306

    CHAPTER 16 INTERRUPT FUNCTIONS 306 User’s Manual U15331EJ4V1UD 16.4.4 Putting interrupt reque sts on hold If an interrupt request (such as a maskable, non-maskable, or external interrupt) is generated when a certain type of instruction is being execut ed, the interrupt request will not be acknow ledged until the instruct ion is completed. Such in[...]

  • Página 307

    User’s Manual U15331EJ4V1UD 307 CHAPTER 17 STANDBY FUNCTION 17.1 Standby Function and Configuration 17.1.1 Standby function The standby function is used to reduce the power consumption of the system and can be effected in the follow ing two modes. (1) HA LT mode This mode is set when the HALT inst ruction is executed. The HALT m ode stops the ope[...]

  • Página 308

    CHAPTER 17 STA NDBY FUNCTION 308 User’s Manual U15331EJ4V1UD 17.1.2 Registe r controlling standby function The wait time after the STOP mode is released upon in terrupt request generation until oscillation stabilizes is controlled by the oscillation stabilizati on time selection register (OSTS). OSTS is set with an 8-bit memo ry manipulation inst[...]

  • Página 309

    CHAPTER 17 STA NDBY FUNCTION User’s Manual U15331EJ4V1UD 309 17.2 Standby Function Operation 17.2.1 HALT mode (1) HA LT mode The HALT mode is set by exec uting the HALT instruction. The operation statuses in the HALT m ode are shown in the following table. Table 17-1. Operation Statuses in HALT Mode HALT Mode Operation Status During Main System C[...]

  • Página 310

    CHAPTER 17 STA NDBY FUNCTION 310 User’s Manual U15331EJ4V1UD (2) Releasing HA LT mode The HALT mode can be released by the following three sources. (a) Release by unmasked interrupt request The HALT mode is released by an unmasked interrupt request. In this case, if interrupts are enabled to be acknowledged, vectored interrupt serv icing is perfo[...]

  • Página 311

    CHAPTER 17 STA NDBY FUNCTION User’s Manual U15331EJ4V1UD 311 (c) Release by RESET input When the HALT mode is released by the RESET signal , execution branches to the reset vector address in the same manner as the ordinary reset oper ation, and program exec ution is started. Figure 17-3. Releasing HA LT Mode by RESET Input HALT instruction RESET [...]

  • Página 312

    CHAPTER 17 STA NDBY FUNCTION 312 User’s Manual U15331EJ4V1UD 17.2.2 STOP mode (1) Se tting and operation status of STOP mode The STOP mode is set by exec uting the STOP instruction. Caution Because the standby mode can be released by an interrupt request signal, the standby mode is released as soon as it is set if there is an interrupt source w h[...]

  • Página 313

    CHAPTER 17 STA NDBY FUNCTION User’s Manual U15331EJ4V1UD 313 (2) Releasing STOP mode The STOP mode can be released by the following tw o sources. (a) Release by unmasked interrupt request The STOP mode can be released by an unmasked interr upt request. In this case, if interrupts are enabled to be acknowledged, vectored interrupt servici ng is pe[...]

  • Página 314

    CHAPTER 17 STA NDBY FUNCTION 314 User’s Manual U15331EJ4V1UD (b) Release by RESET input When the STOP mode is released by the RESET si gnal, the reset operation is performed after the oscillation stabilization time has elapsed. Figure 17-5. Releasing STOP Mode by RESET Input STOP instruction RESET signal Wait (2 15 /f X : 6.55 ms) STOP mode Opera[...]

  • Página 315

    User’s Manual U15331EJ4V1UD 315 CHAPTER 18 RESET FUNCTION The following tw o operations are available to generate reset signals. (1) External reset input by RESET pin (2) Internal reset by w atchdog timer program loop time detection External and internal reset have no functional differences. In both cases, program exec ution starts at the address[...]

  • Página 316

    CHAPTER 18 RESET FUNCTION 316 User’s Manual U15331EJ4V1UD Figure 18-2. Reset Timing by RESET Input X1 RESET Internal reset signal Port pin During normal operation Delay Delay Hi-Z Reset period (oscillation stops) Normal operation (reset processing) Oscillation stabilization time wait Figure 18-3. Reset Timing by Ov erflow in Watchdog Timer X1 Ove[...]

  • Página 317

    CHAPTER 18 RESET FUNCTION User’s Manual U15331EJ4V1UD 317 Table 18-1. Status of Hardw are A fter Reset (1/2) Hardware Status After Reset Program counter (PC) Note 1 Contents of reset vector table (0000H, 0001H) set Stack pointer (SP) Undefined Program status word (PSW) 02H Data memory Undefined Note 2 RAM General-purpose registers Undefined Note [...]

  • Página 318

    CHAPTER 18 RESET FUNCTION 318 User’s Manual U15331EJ4V1UD Table 18-1. Status of Hardw are A fter Reset (2/2) Hardware Status After Reset Operation mode register (CSIM1A0) 00H Shift register (SIO1A0) 00H Buffer memory (SBMEM0 to SBMEMF) Undefined Automatic data transmit/receive control register (ADTC0) 00H Automatic data transmit/receive address p[...]

  • Página 319

    User’s Manual U15331EJ4V1UD 319 CHAPTER 19 FLASH MEMORY VERSION The µ PD78F9488 is available as the flash memory version of the µ PD789488 (mask ROM version). The µ PD78F9489 is available as the flash memory version of the µ PD789489 (mask ROM version). The differences between the µ PD78F9488, 78F9489, and the mask ROM vers ion are shown in [...]

  • Página 320

    CHAPTER 19 FLA SH MEMORY VERSION 320 User’s Manual U15331EJ4V1UD 19.1 Flash Memory Characteristics Flash memory programming is performed by connecting a dedicated flash programmer (Flashpro III (part no. FL- PR3, PG-FP3)/Flashpro IV (part no. FL-PR4, PG-FP4)) to the target system w ith the µ PD78F9488 or 78F9489 mounted on the target system (on-[...]

  • Página 321

    CHAPTER 19 FLA SH MEMORY VERSION User’s Manual U15331EJ4V1UD 321 19.1.2 Communication mod e Use the communication mode shown in Table 19-2 to perform communication between the dedicated flash programmer and µ PD78F9488 or 78F9489. Table 19-2. Communic ation Mode List TYPE Setting Note 1 CPU Clock Communication Mode COMM PORT SIO Clock In Flashpr[...]

  • Página 322

    CHAPTER 19 FLA SH MEMORY VERSION 322 User’s Manual U15331EJ4V1UD Figure 19-3. Example of Co nnection w ith Dedicated Flash Programmer (a) 3-w ire serial I/O Dedicated flash programmer VPP1 VDD RESET SCK SO SI CLK Note 1 GND V PP V DD RESET SCK20 SI20 SO20 X1 V SS PD78F9488 PD78F9489 µ µ (b) 3-wire serial I/O w ith handshake VPP1 VDD RESET SCK S[...]

  • Página 323

    CHAPTER 19 FLA SH MEMORY VERSION User’s Manual U15331EJ4V1UD 323 If Flashpro III/Flashpro IV is used as a dedicated flas h programmer, the following signals are generated for the µ PD78F9488 and 78F9489. For details, refer to the manual of Flashpro III/Flashpro IV. Table 19-3. Pin Connection List Signal Name I/O Pin Function Pin Name 3-Wire Seri[...]

  • Página 324

    CHAPTER 19 FLA SH MEMORY VERSION 324 User’s Manual U15331EJ4V1UD 19.1.3 On-board pin processin g When performing programming on the target sy stem, provide a connector on t he target system to connect the dedicated flash programmer. An on-board function that allows sw itching between normal operation m ode and flash memory programming mode may be[...]

  • Página 325

    CHAPTER 19 FLA SH MEMORY VERSION User’s Manual U15331EJ4V1UD 325 (1) Signal conflict If the dedicated flash programmer (output ) is connected to a serial interfac e pin (input) that is connected to another device (output), a signal conflict occurs. To prevent this, isolate the connection wi th the other device or set the other device to the outpu[...]

  • Página 326

    CHAPTER 19 FLA SH MEMORY VERSION 326 User’s Manual U15331EJ4V1UD <RESET pin> If the reset signal of the dedicated flash programmer is connected to the RESET pin connected to the reset signal generator on-board, a signal conflict occu rs. To prevent this, isolate the c onnection w ith the reset signal generator. If the reset signal is input [...]

  • Página 327

    CHAPTER 19 FLA SH MEMORY VERSION User’s Manual U15331EJ4V1UD 327 19.1.4 Connection of adap ter for flash writing The following figure show s an example of recommended c onnection when the adapter for flash writing is used. Figure 19-8. Wiring Example for Flash Wr iting A dapter w ith 3-Wire Serial I/O GND VDD SI SO SCK CLK OUT RESET VPP RESER VE/[...]

  • Página 328

    CHAPTER 19 FLA SH MEMORY VERSION 328 User’s Manual U15331EJ4V1UD Figure 19-9. Wiring Example for Flash Writing A dapter w ith 3-Wire Serial I/O w ith Handshake PD78F9488, PD78F9489 GND VDD VDD2 (L VDD) SI SO SCK CLKOUT RESET VPP RESERVE/HS WRITER INTERF ACE VDD (2.7 ‘ 5.5 V) GND 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 60 59 58 57 56 [...]

  • Página 329

    CHAPTER 19 FLA SH MEMORY VERSION User’s Manual U15331EJ4V1UD 329 Figure 19-10. Wiring Example for Flash Writing Adapter with UA RT GND VDD SI SO SCK CLK OUT RESET VPP RESER VE/HS WRITER INTERF ACE VDD (2.7 to 5.5 V) GND 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 80 79 78 77 76 75[...]

  • Página 330

    CHAPTER 19 FLA SH MEMORY VERSION 330 User’s Manual U15331EJ4V1UD 19.2 Cautions on µ PD78F9488 and 78F9489 (1) Whe n using HALT mode with subclock multiplied by four Observe the following constraints w hen using the flash version ( µ PD78F9488 and 78F9489) in the HALT mode with the subclock multiplied by 4 as the CPU clock. • Be sure to insert[...]

  • Página 331

    User’s Manual U15331EJ4V1UD 331 CHAPTER 20 MASK OPTIONS The µ PD789488 and 789489 have the following mask options. • Pin function The segment pins of the LCD and port 7 (i nput port) can be selected in 1-bit units. <1> S (16 + n) <2> P7n (n = 0 to 3) The segment pins of the LCD and port 8 (I/O port) can be selected in 1-bit units. [...]

  • Página 332

    332 User’s Manual U15331EJ4V1UD CHAPTER 21 INSTRUCTION SET This chapter lists the instruction set of the µ PD789489 Subseries. For details of the operation and machine language (instruction code) of eac h instruction, refer to 78K/0S Series Instructions User’s Manual (U11047E) . 21.1 Operation 21.1.1 Operand identifier s and description method[...]

  • Página 333

    CHAPTER 21 INSTRUCTION SET User’s Manual U15331EJ4V1UD 333 21.1.2 Description of “Operation” column A: A register; 8-bit accumulator X: X register B: B register C: C register D: D register E: E register H: H register L: L register AX: AX register pair; 16-bit accumulator BC: BC register pair DE: DE register pair HL: HL register pair PC: Progr[...]

  • Página 334

    CHAPTER 21 INSTRUCTION SET 334 User’s Manual U15331EJ4V1UD 21.2 Operation List Mnemonic Operands Bytes Clocks Operation Flag Z AC CY MOV r, #byte 3 6 r ← byte saddr, #byte 3 6 (saddr) ← byte sfr, #byte 3 6 sfr ← byte A, r Note 1 2 4 A ← r r, A Note 1 2 4 r ← A A, saddr 2 4 A ← (saddr) saddr, A 2 4 (saddr) ← A A, sfr 2 4 A ← sfr sf[...]

  • Página 335

    CHAPTER 21 INSTRUCTION SET User’s Manual U15331EJ4V1UD 335 Mnemonic Operands Bytes Clocks Operation Flag Z AC CY MOVW rp, #word 3 6 rp ← wor d AX, saddrp 2 6 AX ← (saddrp) saddrp, AX 2 8 (saddrp) ← AX AX, rp Note 1 4 AX ← rp rp, AX Note 1 4 rp ← AX XCHW AX, rp Note 1 8 AX ↔ rp ADD A, #byte 2 4 A, CY ← A + byte x x x saddr, #byte 3 6[...]

  • Página 336

    CHAPTER 21 INSTRUCTION SET 336 User’s Manual U15331EJ4V1UD Mnemonic Operands Bytes Clocks Operation Flag Z AC CY SUBC A, #byte 2 4 A, CY ← A − byte − CY x x x saddr, #byte 3 6 (saddr), CY ← (saddr) − byte − CY x x x A, r 2 4 A, CY ← A − r − CY x x x A, saddr 2 4 A, CY ← A − (saddr) − CY x x x A, ! addr16 3 8 A, CY ← A ?[...]

  • Página 337

    CHAPTER 21 INSTRUCTION SET User’s Manual U15331EJ4V1UD 337 Mnemonic Operands Bytes Clocks Operation Flag Z AC CY CMP A, #byte 2 4 A − byte x x x saddr, #byte 3 6 (saddr) − byte x x x A, r 2 4 A − r x x x A, saddr 2 4 A − (saddr) x x x A, !addr16 3 8 A − (addr16) x x x A, [HL] 1 6 A − (HL) x x x A, [HL+byte] 2 6 A − (HL + byte) x x x[...]

  • Página 338

    CHAPTER 21 INSTRUCTION SET 338 User’s Manual U15331EJ4V1UD Mnemonic Operands Bytes Clocks Operation Flag Z AC CY CALL !addr16 3 6 (SP − 1) ← (PC + 3) H , (SP − 2) ← (PC + 3) L , PC ← addr16, SP ← SP − 2 CALLT [addr5] 1 8 (SP − 1) ← (PC + 1) H , (SP − 2) ← (PC + 1) L , PC H ← (00000000, addr5 + 1), PC L ← (00000000, addr5[...]

  • Página 339

    CHAPTER 21 INSTRUCTION SET User’s Manual U15331EJ4V1UD 339 21.3 Instructions Listed by Addressing Ty pe (1) 8-bit instructions MOV, XCH, ADD, ADDC, SUB, SUBC , AND, OR, XOR, CMP, INC, DEC, ROR, ROL, RORC, ROLC, PUSH, POP, DBNZ 2nd Operand 1st Operand #byte A r sfr saddr !ad dr 16 PSW [DE] [HL] [HL+byte] $addr1 6 1 None A ADD ADDC SUB SUBC AND OR [...]

  • Página 340

    CHAPTER 21 INSTRUCTION SET 340 User’s Manual U15331EJ4V1UD (2) 16-bit instructions MOVW, XCHW, ADDW, SUBW, CMPW, PUSH, POP, INCW, DECW 2nd Operand 1st Operand #word AX rp Note saddrp SP None AX ADDW SUBW CMPW MOVW XCHW MOVW MOVW rp MOVW MOVW Note I N C W DECW PUSH POP saddrp MOVW s p M O V W Note Only w hen rp = BC, DE, or HL. (3) Bit ma nipulati[...]

  • Página 341

    CHAPTER 21 INSTRUCTION SET User’s Manual U15331EJ4V1UD 341 (4) Call instructions/branch instructions CALL, CALLT, BR, BC, BNC, BZ, BNZ, DBNZ 2nd Operand 1st Operand AX !addr16 [addr5] $addr16 Basic Instructions BR CALL BR CALLT BR BC BNC BZ BNZ Compound Instructions DBNZ (5) Other instructions RET, RETI, NOP, EI, DI, HALT , STOP[...]

  • Página 342

    342 User’s Manual U15331EJ4V1UD CHAPTER 22 ELECTRICAL SPECIFICATIONS ( µ PD789488, 78F9488, 789489, 78F9489) A bsolute Maximum Ratings (T A = 25 ° C) Parameter Symbol Conditions Ratings Unit V DD Power supply voltage AV DD V DD = AV DD − 0.3 to +6.5 V V PP µ PD78F9488, 78F9489 only, Note 1 − 0.3 to +10.5 V V I1 P00 to P07, P10, P11, P20 to[...]

  • Página 343

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) User’s Manual U15331EJ4V1UD 343 Caution Product quality may suffer if the absolute m aximum rating is exceeded ev en momentarily for any parameter. That is, the absolute ma ximum ratings are rated v alues at which the product is on the ve rge of suffering physical dam[...]

  • Página 344

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) 344 User’s Manual U15331EJ4V1UD Main System Clock Osc illator Characteristics (T A = –40 to +85 ° C, V DD = 1.8 to 5.5 V) Resonator Recommended Circuit Parameter Conditions MIN. TYP. MAX. Unit Oscillation frequency (f X ) Note 1 1.0 5.0 MHz Ceramic resonator X2 X1 [...]

  • Página 345

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) User’s Manual U15331EJ4V1UD 345 Subsystem Clock Oscilla tor Characteristics (T A = –40 to +85 ° C, V DD = 1.8 to 5.5 V) Resonator Recommended Circuit Parameter Conditions MIN. TYP. MAX. Unit Oscillation frequency (f XT ) Note 1 32 32.768 35 kHz V DD = 4.5 to 5.5 V [...]

  • Página 346

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) 346 User’s Manual U15331EJ4V1UD DC Characteristics (T A = –40 to +85 ° C, V DD = 1.8 to 5.5 V) (1/6) Parameter Symbol Conditions MIN. TYP. MAX. Unit Per pin 10 mA Output current, low I OL All pins 80 mA Per pin –1 mA Output current, high I OH All pins –15 mA V [...]

  • Página 347

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) User’s Manual U15331EJ4V1UD 347 DC Characteristics (T A = –40 to +85 ° C, V DD = 1.8 to 5.5 V) (2/6) Parameter Symbol Conditions MIN. TYP. MAX. Unit I LIH1 P00 to P07, P10, P11, P20 to P25, P30 to P34, P60 to P67, P70 to P73 Note 1 , P80 to P87 Note 1 , RESET 3 µ [...]

  • Página 348

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) 348 User’s Manual U15331EJ4V1UD DC Characteristics (T A = –40 to +85 ° C, V DD = 1.8 to 5.5 V) (3/6) Parameter Symbol Conditions MIN. TYP. MAX. Unit V DD = 5.0 V ± 10% Note 2 2 3.5 mA V DD = 3.0 V ± 10% Note 3 0.4 1 mA I DD1 5.0 MHz crystal oscillation operation [...]

  • Página 349

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) User’s Manual U15331EJ4V1UD 349 DC Characteristics (T A = –40 to +85 ° C, V DD = 1.8 to 5.5 V) (4/6) Parameter Symbol Conditions MIN. TYP. MAX. Unit V DD = 5.0 V ± 10% Note 2 5.5 9.0 mA V DD = 3.0 V ± 10% Note 3 1.3 2.3 mA I DD1 5.0 MHz crystal oscillation operat[...]

  • Página 350

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) 350 User’s Manual U15331EJ4V1UD DC Characteristics (T A = –40 to +85 ° C, V DD = 1.8 to 5.5 V) (5/6) Parameter Symbol Conditions MIN. TYP. MAX. Unit V DD = 5.0 V ± 10% Note 2 2.5 5.0 mA V DD = 3.0 V ± 10% Note 3 0.5 1.2 mA I DD1 5.0 MHz crystal oscillation operat[...]

  • Página 351

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) User’s Manual U15331EJ4V1UD 351 DC Characteristics (T A = –40 to +85 ° C, V DD = 1.8 to 5.5 V) (6/6) Parameter Symbol Conditions MIN. TYP. MAX. Unit V DD = 5.0 V ± 10% Note 2 6.0 12.0 mA V DD = 3.0 V ± 10% Note 3 1.6 3.2 mA I DD1 5.0 MHz crystal oscillation opera[...]

  • Página 352

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) 352 User’s Manual U15331EJ4V1UD AC Characteristics (1) Basic operation (T A = –40 to +85 ° C, V DD = 1.8 to 5.5 V) Parameter Symbol Conditions MIN. TYP. MAX. Unit V DD = 2.7 to 5.5 V 0.4 8.0 µ s Operating with main system clock V DD = 1.8 to 5.5 V 1.6 8.0 µ s Ori[...]

  • Página 353

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) User’s Manual U15331EJ4V1UD 353 (2) Serial interface 20 (SIO20) (T A = –40 to +85 ° C, V DD = 1.8 to 5.5 V) (a) 3-wire serial I/O mode (internal clock output) Parameter Symbol Conditions MIN. TYP. MAX. Unit V DD = 2.7 to 5.5 V 800 ns SCK20 cycle time t KCY1 V DD = [...]

  • Página 354

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) 354 User’s Manual U15331EJ4V1UD (d) UART mode (external clock input) Parameter Symbol Conditions MIN. TYP. MAX. Unit V DD = 2.7 to 5.5 V 800 ns ASCK20 cycle time t KCY3 V DD = 1.8 to 5.5 V 3200 ns V DD = 2.7 to 5.5 V 400 ns ASCK20 high-/low-level width t KH3 , t KL3 V[...]

  • Página 355

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) User’s Manual U15331EJ4V1UD 355 (3) Serial interface 1A0 (SIO1A 0) (T A = –40 to +85 ° C, V DD = 1.8 to 5.5 V) (a) 3-w ire serial I/O mode, 3-w i re serial I/O mode with automa tic transmit/receive function (internal clock output) Parameter Symbol Conditions MIN. T[...]

  • Página 356

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) 356 User’s Manual U15331EJ4V1UD A C Timing Measurement Points (Excluding X1 and XT1 Inputs) 0.8V DD 0.2V DD Point of measurement 0.8V DD 0.2V DD Clock Timing 1/f X t XL t XH X1 input V IH4 (MIN.) V IL4 (MAX.) 1/f XT t XTL t XTH XT1 input V IH4 (MIN.) V IL4 (MAX.) Capt[...]

  • Página 357

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) User’s Manual U15331EJ4V1UD 357 Key Return Input Timing t KRL KR0 to KR7 ( PD789488, 78F9488) , KR00 to KR07, KR10 to KR17 ( PD789489, 78F9489) µ µ RESET Input Timing RESET t RSL Serial Transfer Timing 3-w ire serial I/O mode: Remark m = 1, 2, 4, 5 UA RT mode (exter[...]

  • Página 358

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) 358 User’s Manual U15331EJ4V1UD 10-Bit A/D Conv erter Characteristics (T A = –40 to +85 ° C, 1.8 V ≤ AV DD = V DD ≤ 5.5 V, AV SS = V SS = 0 V) Parameter Symbol Conditions MIN. TYP. MAX. Unit Resolution 10 10 10 bit 4.5 V ≤ AV DD ≤ 5.5 V ± 0.2 ± 0.4 %FSR 2[...]

  • Página 359

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) User’s Manual U15331EJ4V1UD 359 LCD Characteristics (T A = –40 to +85 ° C, V DD = 1.8 to 5.5 V) Parameter Symbol Conditions MIN. TYP. MAX. Unit GAIN = 1 0.84 1.0 1.165 V LCD output voltage variation range V LCD2 C1 to C4 Note 1 = 0.47 µ F GAIN = 0 1.26 1.5 1.74 V [...]

  • Página 360

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) 360 User’s Manual U15331EJ4V1UD Data Retention Timing (STO P Mode Release by RESET) V DD Data retention mode STOP mode HALT mode Internal reset operation Operation mode t SREL t WAIT STOP instruction execution V DDDR RESET Data Retention Timing (Standby Re lease Signa[...]

  • Página 361

    CHAPTER 22 ELECTRICA L SPECIFICA TIONS ( µ PD789488, 78F9488, 789489, 78F9489) User’s Manual U15331EJ4V1UD 361 Flash Memory Writing and Erasing Characteristics (T A = 10 to 40 ° C, V DD = 1.8 to 5.5 V) ( µ PD78F9488, 78F9489 only) Parameter Symbol Conditions MIN. TY P. MAX. Unit Write/erase operating frequency f X 2.7 V ≤ V DD ≤ 5.5 V 1.0 [...]

  • Página 362

    362 User’s Manual U15331EJ4V1UD CHAPTER 23 CHARACTERISTICS CUR VES OF LCD CONTROLLER/DRIVER (REFERENCE VALUES) (1) Characteristics curv es of volta ge boosting stabilization time The following show s the characteristi cs curves of the time from the st art of voltage boosting (VAON0 = 1) and the changes in the LCD output vo ltage (w hen GAIN is se[...]

  • Página 363

    CHAPTER 23 CHA RA CTERISTICS CURVES OF LCD CONTROLLER/DRIVER (REFERENCE VALUES) User’s Manual U15331EJ4V1UD 363 (2) Temp erature characteristics of LCD output voltage T he follow ing shows the temperature charac teristics curves of LCD output voltage. LCD output voltage [V] V LCD2 V LCD1 V LCD0 V LCD2 V LCD1 V LCD0 − 40 − 30 − 20 − 1 0 0 [...]

  • Página 364

    364 User’s Manual U15331EJ4V1UD CHAPTER 24 PACKAGE DRAWINGS 80-PIN PLASTIC QFP (14x14) NOTE Each lead centerline is located within 0.13 mm of its true position (T.P.) at maximum material condition. ITEM MILLIMETERS A B D G 17.20 ± 0.20 14.00 ± 0.20 0.13 0.825 I 17.20 ± 0.20 J C 14.00 ± 0.20 H 0.32 ± 0.06 0.65 (T.P.) K 1.60 ± 0.20 P 1.40 ± [...]

  • Página 365

    CHAPTER 24 PA CKA GE DRAWINGS User’s Manual U15331EJ4V1UD 365 80-PIN PLASTIC TQFP (FINE PITCH) (12x12) ITEM MILLIMETERS G H 0.22 ± 0.05 1.25 A 14.0 ± 0.2 C 12.0 ± 0.2 D F 1.25 14.0 ± 0.2 B 12.0 ± 0.2 M N 0.08 0.145 ± 0.05 P Q 0.1 ± 0.05 1.0 J 0.5 (T.P.) K L 0.5 1.0 ± 0.2 I 0.08 S 1.1 ± 0.1 R 3 ° + 4 ° − 3 ° R H K L J F Q G I T U S P[...]

  • Página 366

    366 User’s Manual U15331EJ4V1UD CHAPTER 25 RECOMMENDED SOLDERING CONDITIONS The µ PD789489 subseries should be soldered and mount ed under the following recommended conditions. For soldering methods and conditions other than those recommended below, contact an NEC Electronics sales representative. For technical information, see the following w e[...]

  • Página 367

    CHAPTER 25 RECOMMENDED SOLDERING CONDITIONS User’s Manual U15331EJ4V1UD 367 Table 25-1. Surface Mounting Ty pe Soldering C onditions (2/3) (3) µ PD78F9489GC-8BT: 80-pin plastic QFP (14x14) Soldering Method Soldering Conditions Recommended Condition Symbol Interface reflow Package peak temperature: 235 ° C, Time:30 seconds max. (at 210 ° C or h[...]

  • Página 368

    CHAPTER 25 RECOMMENDED SOLDERING CONDITIONS 368 User’s Manual U15331EJ4V1UD Table 25-1. Surface Mounting Type Soldering Conditions (3/3) (5) µ PD789488GC- ××× -8BT-A: 80-pin plastic QFP (14x14) µ PD78F9488GC-8BT-A: 80-pin plastic QFP (14x14) µ PD789489GC- ××× -8BT-A: 80-pin plastic QFP (14x14) µ PD78F9489GC-8BT-A: 80-pin plastic QFP (14[...]

  • Página 369

    369 User’s Manual U15331EJ4V1UD APPENDIX A DEVELOPMENT TOOLS The following development tools are availabl e for development of systems using the µ PD789489 Subseries. Figure A-1 shows development tools. • Support for PC98-NX Series Unless specified otherwise, the produc ts supported by IBM PC/AT™ compat ibles can be used in the PC98-NX Serie[...]

  • Página 370

    APPENDIX A DEVELOPMENT TOOLS User’s Manual U15331EJ4V1UD 370 Figure A -1. Development Tools Language processing software · Assembler package · C compiler package · Device file · C library source file Note 1 Debugging software · Integrated debugger · System simulator Host machine (PC or EWS) Interface adapter In-circuit emulator Emulation bo[...]

  • Página 371

    APPENDIX A DEVELOPMENT TOOLS User’s Manual U15331EJ4V1UD 371 A.1 Softw are Package Software tools for development of the 78K/0 S Series are combined in this package. The following tools are included. RA78K0S, CC78K0S, ID78K0S-NS, SM78K0S, and device files SP78K0S Software package Part number: µ S ×××× SP78K0S Remark ×××× in the part numb[...]

  • Página 372

    APPENDIX A DEVELOPMENT TOOLS 372 User’s Manual U15331EJ4V1UD Remark ×××× in the part number differs depending on the host machine and operating system to be used. µ S ×××× RA78K0S µ S ×××× CC78K0S ×××× Host Machine OS Supply Medium AB13 Japanese Windows 3.5" 2HD FD BB13 English Windows AB17 Japanese Windows BB17 PC-9800 ser[...]

  • Página 373

    APPENDIX A DEVELOPMENT TOOLS User’s Manual U15331EJ4V1UD 373 A.5 Debugging Tools (Hardw are) IE-78K0S-NS In-circuit emulator In-circuit emulator for debugging hardware and so ftware of an application system using the 78K/0S Series. Can be used with the integrated the debugger ID78K0S-NS. Used in combination with an AC adapter, emulation pr obe, a[...]

  • Página 374

    APPENDIX A DEVELOPMENT TOOLS 374 User’s Manual U15331EJ4V1UD A.6 Debugging Tools (Softw are) This debugger supports the in-circuit emulat ors IE-78K0S-NS and IE-78K0S-NS-A for the 78K/0S Series. The ID78K0S-NS is Windows-based software. It has improved C-compatible debugging functions and can display the results of tracing with the source program[...]

  • Página 375

    User’s Manual U15331EJ4V1UD 375 APPENDIX B NOTES ON TARGET SYSTEM DESIGN Figures B-1 to B-6 show the conditions w hen connecti ng the emulation probe to the conversion adapter or conversion socket. Follow the configuration below and c onsider the shape of parts to be mounted on the target system w hen designing a system. Of the products described[...]

  • Página 376

    APPENDIX B NO TES ON TARGET SYSTEM DESIGN User’s Manual U15331EJ4V1UD 376 Figure B-2. Connection Conditions of Targe t System (When NP-80GC-TQ Is Use d) Emulation probe NP-80GC-TQ Emulation board IE-789488-NS-EM1 24.8 mm 25 mm 40 mm 34 mm T arget system 21 mm Pin 1 11 mm 21 mm Conv ersion adapter TGC-080SBP Figure B-3. Connection Conditions of Ta[...]

  • Página 377

    APPENDIX B NO TES ON TARGET SYSTEM DESIGN User’s Manual U15331EJ4V1UD 377 (2) NP-80GK, NP-H80GK-TQ Figure B-4. Distance Betw een In-Circuit Emulator and Conv ersion Adapter (8 0GK) 170 mm Note In-circuit emulator IE-78K0S-NS or IE-78K0S-NS-A Emulation board IE-789488-NS-EM1 Conversion adapter TGK-080SDP Target system TGCN1 Emulation probe NP-80GK[...]

  • Página 378

    APPENDIX B NO TES ON TARGET SYSTEM DESIGN User’s Manual U15331EJ4V1UD 378 Figure B-5. Connection Conditions of Targe t System (When NP-80GK Is Use d) Emulation probe NP-80GK Emulation board IE-789488-NS-EM1 23 mm 40 mm 34 mm T arget system 16 mm Pin 1 11 mm 25 mm 16 mm Conv ersion adapter TGK-080SDP Figure B-6. Connection Conditions of Targ et Sy[...]

  • Página 379

    379 User’s Manual U15331EJ4V1UD APPENDIX C REGISTER INDEX C.1 Register Index (Register Names in Alphabetic Order) [A ] A/D conversion result register 0 (ADCR L0) ...................................................................................... .................... 174 A/D converter mode r egister 0 (ADM L0) ..................................[...]

  • Página 380

    APPENDIX C REG ISTER INDEX 380 User’s Manual U15331EJ4V1UD [L] LCD clock control r egister 0 (LCDC0 ) ........................................................................................... ....................... 256 LCD display mode r egister 0 (LCDM 0) ........................................................................................[...]

  • Página 381

    APPENDIX C REG ISTER INDEX User’s Manual U15331EJ4V1UD 381 Remote controller receive end wi dth select regi ster (R MER) ..................................................................... .......... 276 Remote controller receiv e shift rece ive (R MSR)................................................................................. ...........[...]

  • Página 382

    APPENDIX C REG ISTER INDEX 382 User’s Manual U15331EJ4V1UD C.2 Register Index (Register Symbols Alphabetic Order) [A ] ADCRL0: A/D conversion result regi ster 0 ....................................................................................... ................. 174 ADML0: A/D converte r mode regi ster 0 ......................................[...]

  • Página 383

    APPENDIX C REG ISTER INDEX User’s Manual U15331EJ4V1UD 383 MUL0H: 16-bit multiplication re sult storage r egister H ......................................................................... ........... 267 MUL0L: 16-bit multiplication re sult storage r egister L......................................................................... ............[...]

  • Página 384

    APPENDIX C REG ISTER INDEX 384 User’s Manual U15331EJ4V1UD SIO1A0: Serial I/O sh ift regist er 1A0 .......................................................................................... ..................... 218 SSCK: Subclock sele ction r egist er .............................................................................................. [...]

  • Página 385

    User’s Manual U15331EJ4V1UD 385 APPENDIX D REVISION HISTORY The following table show s the revision history up to this editi on. The “Applied to:” column indicates the chapters of each edition in which the revision w as applied. (1/4) Edition Major Revision from Previous Edition Applied to: Correction of number of vectored interrupt sources i[...]

  • Página 386

    APPENDIX D REVISIO N HISTORY User’s Manual U15331EJ4V1UD 386 (2/4) Edition Major Revision from Previous Edition Applied to: Addition of descriptions of µ PD789489, 78F9489 (under development) • Key return detection function added to port 6 ( µ PD789489, 78F9489 only) • Key return pin name of port 0 changed ( µ PD789489, 78F9489 only) • R[...]

  • Página 387

    APPENDIX D REVISIO N HISTORY User’s Manual U15331EJ4V1UD 387 (3/4) Edition Major Revision from Previous Edition Applied to: Change of descriptions of µ PD789489, 78F9489 • Change of status from under development to development completed • Change of the subseries name to “ µ PD789489 subseries” Throughout Update of 1.5 78K/0S Series Line[...]

  • Página 388

    APPENDIX D REVISIO N HISTORY User’s Manual U15331EJ4V1UD 388 (4/4) Edition Major Revision from Previous Edition Applied to: Modification of descriptions in Figure 12-4. Format of A utomatic Data Transmit/Receive Interv al Specification Register 0 CHAPTER 12 SERIA L INTERFA CE 1A0 Addition of formal specifications of µ PD789489 and 78F9489 to µ [...]