Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/newdedyk/domains/bkmanuals.com/public_html/includes/pages/manual_inc.php on line 26
Freescale Semiconductor MC68HC08KH12 manuale d’uso - BKManuals

Freescale Semiconductor MC68HC08KH12 manuale d’uso

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

Vai alla pagina of

Un buon manuale d’uso

Le regole impongono al rivenditore l'obbligo di fornire all'acquirente, insieme alle merci, il manuale d’uso Freescale Semiconductor MC68HC08KH12. La mancanza del manuale d’uso o le informazioni errate fornite al consumatore sono la base di una denuncia in caso di inosservanza del dispositivo con il contratto. Secondo la legge, l’inclusione del manuale d’uso in una forma diversa da quella cartacea è permessa, che viene spesso utilizzato recentemente, includendo una forma grafica o elettronica Freescale Semiconductor MC68HC08KH12 o video didattici per gli utenti. La condizione è il suo carattere leggibile e comprensibile.

Che cosa è il manuale d’uso?

La parola deriva dal latino "instructio", cioè organizzare. Così, il manuale d’uso Freescale Semiconductor MC68HC08KH12 descrive le fasi del procedimento. Lo scopo del manuale d’uso è istruire, facilitare lo avviamento, l'uso di attrezzature o l’esecuzione di determinate azioni. Il manuale è una raccolta di informazioni sull'oggetto/servizio, un suggerimento.

Purtroppo, pochi utenti prendono il tempo di leggere il manuale d’uso, e un buono manuale non solo permette di conoscere una serie di funzionalità aggiuntive del dispositivo acquistato, ma anche evitare la maggioranza dei guasti.

Quindi cosa dovrebbe contenere il manuale perfetto?

Innanzitutto, il manuale d’uso Freescale Semiconductor MC68HC08KH12 dovrebbe contenere:
- informazioni sui dati tecnici del dispositivo Freescale Semiconductor MC68HC08KH12
- nome del fabbricante e anno di fabbricazione Freescale Semiconductor MC68HC08KH12
- istruzioni per l'uso, la regolazione e la manutenzione delle attrezzature Freescale Semiconductor MC68HC08KH12
- segnaletica di sicurezza e certificati che confermano la conformità con le norme pertinenti

Perché non leggiamo i manuali d’uso?

Generalmente questo è dovuto alla mancanza di tempo e certezza per quanto riguarda la funzionalità specifica delle attrezzature acquistate. Purtroppo, la connessione e l’avvio Freescale Semiconductor MC68HC08KH12 non sono sufficienti. Questo manuale contiene una serie di linee guida per funzionalità specifiche, la sicurezza, metodi di manutenzione (anche i mezzi che dovrebbero essere usati), eventuali difetti Freescale Semiconductor MC68HC08KH12 e modi per risolvere i problemi più comuni durante l'uso. Infine, il manuale contiene le coordinate del servizio Freescale Semiconductor in assenza dell'efficacia delle soluzioni proposte. Attualmente, i manuali d’uso sotto forma di animazioni interessanti e video didattici che sono migliori che la brochure suscitano un interesse considerevole. Questo tipo di manuale permette all'utente di visualizzare tutto il video didattico senza saltare le specifiche e complicate descrizioni tecniche Freescale Semiconductor MC68HC08KH12, come nel caso della versione cartacea.

Perché leggere il manuale d’uso?

Prima di tutto, contiene la risposta sulla struttura, le possibilità del dispositivo Freescale Semiconductor MC68HC08KH12, l'uso di vari accessori ed una serie di informazioni per sfruttare totalmente tutte le caratteristiche e servizi.

Dopo l'acquisto di successo di attrezzature/dispositivo, prendere un momento per familiarizzare con tutte le parti del manuale d'uso Freescale Semiconductor MC68HC08KH12. Attualmente, sono preparati con cura e tradotti per essere comprensibili non solo per gli utenti, ma per svolgere la loro funzione di base di informazioni e di aiuto.

Sommario del manuale d’uso

  • Pagina 1

    M68HC08 Microcontrollers freescale.com MC68HC08KH12 Data Sheet Rev. 1.1 MC68HC08KH12/H July 15, 2005[...]

  • Pagina 2

    [...]

  • Pagina 3

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 3 Advance Information — MC68HC(7)08KH12 List of Sections Section 1. General Desc ription .......... ............................. 23 Section 2. Memory Ma p ............................ ....................... 33 Section 3. Random-Access Memory (RAM) ................... [...]

  • Pagina 4

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 4 Freescale Se miconduc tor[...]

  • Pagina 5

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 5 Advance Information — MC68HC(7)08KH12 Table of Contents General Description 1.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Pagina 6

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 6 Freescale Se miconduc tor 2.3 I/O Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 2.4 Monitor ROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Section 3. Random-Access Memory (RAM) 3.1 Contents . . . . . . . . . . . .[...]

  • Pagina 7

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 7 Section 7. System Integration Module (SIM) 7.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 7.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 7.3 SIM Bus Clock Control a[...]

  • Pagina 8

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 8 Freescale Se miconduc tor 7.8.2 Reset Status Register (RSR) . . . . . . . . . . . . . . . . . . . . . . . 84 7.8.3 Break Flag Control Register (BFCR) . . . . . . . . . . . . . . . . . . 85 Section 8. Clock Generator Module (CGM) 8.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . [...]

  • Pagina 9

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 9 8.7 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 8.8 Special Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 8.8.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [...]

  • Pagina 10

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 10 Freescale Se miconduc tor 9.5.7 USB Embedded Device Control Register 2 (DCR2) . . . . . 146 9.5.8 USB Embedded Device Endpoint 0 Data Registers (DE0D0-DE0D7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 9.5.9 USB Embedded Device E ndpoint 1/2 Data Registers (DE1D0-DE1D7) . [...]

  • Pagina 11

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 11 11.6 Wait Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 11.7 TIM During Break Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . 172 11.8 I/O Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Pagina 12

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 12 Freescale Se miconduc tor 12.8.1 Port F Data Register (PTF) . . . . . . . . . . . . . . . . . . . . . . . . 202 12.8.2 Data Direction Register F (DDRF). . . . . . . . . . . . . . . . . . . 203 12.9 Port Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 12[...]

  • Pagina 13

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 13 14.4.1 IRQ1 /V PP Pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 14.5 IRQ Module During Break Interrupts . . . . . . . . . . . . . . . . . . . 217 14.6 IRQ Status and Control Register (ISCR) . . . . . . . . . . . . . . . . 217 Section 15.[...]

  • Pagina 14

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 14 Freescale Se miconduc tor Section 16. Break Module (BREAK) 16.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 16.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 16.3 Features . . . . . . . . . . [...]

  • Pagina 15

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 15 17.12 HUB Repeater Electrical Characteristics . . . . . . . . . . . . . . . . 255 17.13 USB Signaling Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 17.14 TImer Interface Module Characterist ics . . . . . . . . . . . . . . . . . 256 17.15 Cloc[...]

  • Pagina 16

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 16 Freescale Se miconduc tor[...]

  • Pagina 17

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 17 Advance Information — MC68HC(7)08KH12 List of Figures Figure Title P age 1-1 MCU Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 1-2 64-Pin QFP Assignments ( Top View) . . . . . . . . . . . . . . . . . . . . 28 1-3 Power Supply Bypa[...]

  • Pagina 18

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 18 Freescale Se miconduc tor Figure Title P age 7-15 Wait Mode Entry Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 7-16 Wait Recovery from Interrupt or Br eak . . . . . . . . . . . . . . . . . . . 81 7-17 Wait Recovery from Internal Reset . . . . . . . . . . . . . . . . .[...]

  • Pagina 19

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 19 Figure Title P age 9-20 USB Embedded De vice Endpoint 0 Data Register (UE0D0-UE0D7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 10-1 Monitor Mode Circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 10-2 Monitor Data Format[...]

  • Pagina 20

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 20 Freescale Se miconduc tor Figure Title P age 12-20 Data Direction Register F (DDRF) . . . . . . . . . . . . . . . . . . . . . 203 12-21 Port F I/O Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 12-22 Port Option Control Register (POC) . . . . . . . . . . . .[...]

  • Pagina 21

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 21 Advance Information — MC68HC(7)08KH12 List of Tables T ab le Title Pa ge 2-1 Vector Addresses .......... ................ ................. ................ .......... 43 7-1 Signal Name Convention s .............................................. .......... 65 7-2 PI[...]

  • Pagina 22

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 22 Freescale Se miconduc tor T ab le Title Pa ge 12-1 I/O Port Register Summ ary............ ............................... .......... 184 12-2 Port A Pin Functions ...... ................ ............................... .......... 188 12-3 Port B Pin Functions ...... ................ .........[...]

  • Pagina 23

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 23 Advance Information — MC68HC(7)08KH12 Section 1. General Description 1.1 Contents 1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [...]

  • Pagina 24

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 24 Freescale Se miconduc tor 1.2 Introduction The MC68HC(7)08KH12 is a member of the low-cost, high-performance M68HC08 Family of 8-bi t microcontroller units (MCUs). The M68HC08 Family is based on the customer-spec ified integrated circuit (CSIC) design strategy. All MCUs in t he family use the[...]

  • Pagina 25

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 25 • Full Universal Serial Bus Specif ication 1.1 Com posite HUB with Embedded 1 Functions: –1 × 12 MHz Upstream Port –4 × 12 MHz / 1.5 MHz Downstream Ports –1 × Hub Control Endpoint (Endpoi nt0) with 8 byte transmit buffer and 8 byte receive buffer –1 × Hub[...]

  • Pagina 26

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 26 Freescale Se miconduc tor Features of the CPU08 include the following: • Enhanced HC05 Programming Model • Extensive Loop Co ntrol Functions • 16 Addressing Modes (E ight More Than the HC05) • 16-Bit Index Regist er and Stack Pointer • Memory-to-Memory Data Transfers • Fast 8 × 8[...]

  • Pagina 27

    MC68HC(7 )08KH12 — Rev . 1.1 Adv ance Inf ormation Freescale Semicon ductor 27 Figure 1-1. MCU Block Diagram DS Port 1 ➀ PORTS ARE SOFTWARE CONFIGURABLE WITH PULLUP DEVICE IF INPUT PORT ➁ SOFTWARE CONFIGURABLE LED DIRECT DRIVE 3mA SOURCE /10mA SINK or STANDARD DRIVE ➂ PIN CONTAINS INTEGRATED PULLUP DEVICE ➃ PIN HAS INTERRUPT CAPABILITY ?[...]

  • Pagina 28

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 28 Freescale Se miconduc tor 1.5 Pin Assignments 1.5.1 Quad Flat Pack (QFP) Package Figure 1-2 Shows the 64-pin QFP assignments. Figure 1-2. 64-Pin QFP Assignments (Top View) DMINUS0 DPLUS0 REGOUT VSSA OSC2 OSC1 CGMXFC VDDA DPLUS1 DMINUS1 DPLUS2 DMINUS2 DPLUS3 1 2 3 4 5 6 7 8 9 10 11 12 13 DMINU[...]

  • Pagina 29

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 29 1.5.2 Power Supply Pins (V DDA , V SSA , V DD1 , V SS1 , V DD2 , and V SS2 ) V DDA and V SSA are the analog power suppl y and ground pins used by the on-chip Phase- Locked Loop circuit. V DD2 and V SS2 are the power supply and ground pins used by the internal circuitry[...]

  • Pagina 30

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 30 Freescale Se miconduc tor 1.5.3 Oscillator Pins (OSC1 and OSC2) The OSC1 and OSC2 pins ar e the connections for the on-chip oscillator circuit. (See Section 8. Clock G enerator Module (CGM) .) 1.5.4 External Reset Pin (RST ) A logic zero on the RST pin forces the MCU to a known start-up state[...]

  • Pagina 31

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 31 1.5.8 Port A Input/Output (I/O) Pins (PTA7–PTA0) PTA7–PTA0 are general-purpose bi directional I/O port pins. (See Section 12. I/O Ports .) Each pin contains a software configurable pull- up device when the pin is configured as an input. (See 12.9 Port Options .) 1.[...]

  • Pagina 32

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 32 Freescale Se miconduc tor 1.5.13 Port F I/O Pins (PTF7/KBF7–PTF0/KBF0) PTF7/KBF7–PTF0/KBF0 are gener al-purpose bidirectio nal I/O port pins. (See Section 12. I/O Ports .) Any or all of the port F pins can be programmed to serve as ex ternal interrupt pins. (See Section 15. Keyboard Inter[...]

  • Pagina 33

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 33 Advance Information — MC68HC(7)08KH12 Section 2. Memory Map 2.1 Contents 2.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.3 I/O Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [...]

  • Pagina 34

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 34 Freescale Se miconduc tor $0000 ↓ $005F I/O REGISTERS (80 BYTES) $0060 ↓ $01DF RAM (384 BYTES) $01E0 ↓ $CDFF UNIMPLEMENTED (52, 256 BYTES) $D000 ↓ $FDFF ROM/OTPROM (11776 BYTES) $FE00 BREAK STATUS REGISTER (BSR) $FE01 RESET STATUS REGISTER (RSR) $FE02 RESERVED $FE03 BREAK FLAG CONTROL[...]

  • Pagina 35

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 35 2.3 I/O Section Addresses $0000–$005F, shown in Figure 2-2 , contain most of the control, status, and data registers. Additional I/O registers have the following addresses: • $FE00 (Break Status Register, BSR) • $FE01 (Reset Status Register, RSR) • $FE02 (Reser[...]

  • Pagina 36

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 36 Freescale Se miconduc tor A d d r . N a m e B i t 7 654321 B i t 0 $0000 Port A Data Register (PTA) R: PTA7 PTA6 PTA5 PTA4 PTA3 PTA2 PTA1 PTA0 W: $0001 Port B Data Register (PTB) R: PTB7 PTB6 PTB5 PTB4 PTB3 PTB2 PTB1 PTB0 W: $0002 Port C Data Register (PTC) R : 000 PTC4 PTC3 PTC2 PTC1 PTC0 W:[...]

  • Pagina 37

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 37 $0010 TIM Status and Control Register (TSC) R: TOF TOIE TSTOP 00 PS2 PS1 PS0 W: 0 TRST $0011 Unimplemented R: W: $0012 TIM Counter Register High (TCNTH) R: Bit 15 14 13 12 11 10 9 Bit 8 W: $0013 TIM Counter Register Low (TCNTL) R : B i t 7 654321 B i t 0 W: $0014 TIM C[...]

  • Pagina 38

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 38 Freescale Se miconduc tor $0020 USB Embedded Device Endpoint 0 Data Register 0 (DE0D0) R: DE0R07 DE0R06 DE0R05 DE0R04 DE0R03 DE0R02 DE0R01 DE0R00 W: DE0T07 DE0T06 DE0T05 DE0T04 DE0T03 DE0T02 DE0T01 DE0T00 $0021 USB Embedded Device Endpoint 0 Data Register 1 (DE0D1) R: DE0R17 DE0R16 DE0R15 DE0[...]

  • Pagina 39

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 39 $0030 USB HUB Endpoint 0 Data Register 0 (HE0D0) R: HE0R07 HE0R06 HE0R05 HE0R04 HE0R03 HE0R02 HE0R01 HE0R00 W: HE0T07 HE0T06 HE0T05 HE0T04 HE0T03 HE0T02 HE0T01 HE0T00 $0031 USB HUB Endpoint 0 Data Register 1 (HE0D1) R: HE0R17 HE0R16 HE0R15 HE0R14 HE0R13 HE0R12 HE0R11 H[...]

  • Pagina 40

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 40 Freescale Se miconduc tor $0040 Port F Keyboard Status and Control Register (KBFSCR) R : 0000 KEYFF 0 IMASKF MODEF W: ACKF $0041 Port F Keyboard Interrupt Enable Register (KBFIER) R: KBFIE7 KBFIE6 KBFIE5 KBFIE4 KBFIE3 KBFIE2 KBFIE1 KBFIE0 W: $0042 Port F Pull-up Enable Register (PFPER) R: PFP[...]

  • Pagina 41

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 41 $0050 Unimplemented R: W: $0051 USB HUB Downstream Port 1 Control Register (HDP1CR) R: PEN1 LOWSP1 RST1 RESUM1 SUSP1 0D 1 + D 1 – W: $0052 USB HUB Downstream Port 2 Control Register (HDP2CR) R: PEN2 LOWSP2 RST2 RESUM2 SUSP2 0D 2 + D 2 – W: $0053 USB HUB Downstream [...]

  • Pagina 42

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 42 Freescale Se miconduc tor $FE00 Break Status Register (BSR) R: RRRRRR SBSW R W: $FE01 Reset Status Register (RSR) R: POR PIN COP ILOP ILAD USB 0 0 W: $FE02 Reserved R: W: $FE03 Break Flag Control Register (BFCR) R: B C F E RRRRRRR W: $FE04 Interrupt Status Register 1 (INT1) R: IF6 IF5 IF4 IF3[...]

  • Pagina 43

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 43 Table 2-1 is a list of vector locations. 2.4 Monitor ROM The 240 bytes at addresses $FE 10–$FEFF are reserved ROM addresses that contain the instruct ions for the monitor functions. (See Section 10. Monitor ROM (MON) .) T ab le 2-1. V ector Addresses Address Vector $[...]

  • Pagina 44

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 44 Freescale Se miconduc tor[...]

  • Pagina 45

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 45 Advance Information — MC68HC(7)08KH12 Section 3. Random-Access Memory (RAM) 3.1 Contents 3.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.3 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Pagina 46

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 46 Freescale Se miconduc tor During a subroutine call, the CPU uses two bytes of the stack to store the return address. The stack po inter decrements during pushes and increments during pulls. NOTE: Be careful when using nested subr outines. The CPU ma y overwrite data in the RAM during a s ubro[...]

  • Pagina 47

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 47 Advance Information — MC68HC(7)08KH12 Section 4. Read-Only Memory (ROM) 4.1 Contents 4.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 4.3 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Pagina 48

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 48 Freescale Se miconduc tor[...]

  • Pagina 49

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 49 Advance Information — MC68HC(7)08KH12 Section 5. Configuration Register (CONFIG) 5.1 Contents 5.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 5.3 Functional Description . . . . . . . . . . . . . . . . . . . . . . . [...]

  • Pagina 50

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 50 Freescale Se miconduc tor NOTE: The CONFIG register is a special r egister containing one-time writable latches after each reset. Upon a reset, the CONFIG register defaults to the predetermined settin gs as shown in Figure 5-1 . SSREC — Short stop recovery bit SSREC enables the CP U to exit[...]

  • Pagina 51

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 51 Advance Information — MC68HC(7)08KH12 Section 6. Central Processor Unit (CPU) 6.1 Contents 6.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 6.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Pagina 52

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 52 Freescale Se miconduc tor 6.3 Features Features of the CPU include the following: • Full Upward, Object-Code Com patibility with M68HC05 Family • 16-Bit Stack Po inter with St ack Manipulation Instructions • 16-Bit Index Register with X-Register M anipulation Instructions • 8-MHz CPU [...]

  • Pagina 53

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 53 Figure 6-1. CPU Registers 6.4.1 Accumulator (A) The accumulator is a general-purpose 8- bit register. The CPU uses the accumulator to hold operands and th e results of arithmetic/logic operations. ACCUMULATOR (A) INDEX REGISTER (H:X) STACK POINTER (SP) PROGRAM COUNTER [...]

  • Pagina 54

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 54 Freescale Se miconduc tor 6.4.2 Index Register (H:X) The 16-bit index register allows indexed addressing of a 64-Kbyte memory space. H is the upper byte of the index regi ster, and X is the lower byte. H:X is the conc atenated 16-bit index register. In the indexed addressi ng modes, the CPU u[...]

  • Pagina 55

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 55 6.4.3 Stack Pointer (SP) The stack pointer is a 16-bi t register that contains the address of the next location on the stack. During a rese t, the stack pointer is preset to $00FF. The reset stack pointer (RSP) in struction also sets the least significant byte to $FF b[...]

  • Pagina 56

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 56 Freescale Se miconduc tor 6.4.4 Program Counter (PC) The program counter is a 16-bit register that contains the address of the next instruction or operand to be fetched. Normally, the program counter autom atically increm ents to the next sequential memory location every time an instruct ion [...]

  • Pagina 57

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 57 6.4.5 Condition Code Register (CCR) The 8-bit condition code register cont ains the interrupt mask and five flags that indicate the re sults of the instruction just executed. Bits 6 and 5 are set permanently to logic one. The following pa ragraphs describe the function[...]

  • Pagina 58

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 58 Freescale Se miconduc tor I — Interrupt Mask When the interrupt mask is set, all maskable CPU interrupts are disabled. CPU interrupts are ena bled when the interrupt mask is cleared. When a CPU in terrupt occurs, the interrupt mask is set automatically after t he CPU registers are sa ved on[...]

  • Pagina 59

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 59 C — Carry/Borrow Flag The CPU sets the carry/borrow flag when an addition operation produces a carry out of bit 7 of th e accumulator or when a subtraction operation requires a borrow. Some instructions — such as bit test and branch, shift, and rotate — also clea[...]

  • Pagina 60

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 60 Freescale Se miconduc tor[...]

  • Pagina 61

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 61 Advance Information — MC68HC(7)08KH12 Section 7. System Integration Module (SIM) 7.1 Contents 7.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 7.3 SIM Bus Clock Control and Generation . . . . . . . . . . . . . . . . [...]

  • Pagina 62

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 62 Freescale Se miconduc tor 7.7 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 7.7.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 7.7.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Pagina 63

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 63 Figure 7-1. SIM Block Diagram STOP/WAIT CLOCK CONTROL CLOCK GENERATORS POR CONTROL RESET PIN CONTROL SIM RESET STATUS REGISTER INTERRUPT CONTROL AND PRIORITY DECODE MODULE STOP MODULE WAIT CPU STOP (FROM CPU) CPU WAIT (FROM CPU) SIMOSCEN (TO CGM) CGMOUT (FROM CGM) INTE[...]

  • Pagina 64

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 64 Freescale Se miconduc tor Addr. Register Name Bit 7 6 5 4 3 2 1 Bit 0 $FE00 Break Status Register (BSR) Read: RRRRRR SBSW R Write: Reset: 0 $FE01 Reset Status Register (RSR) Read: POR PIN COP ILOP ILAD USB 0 0 Write: R e s e t : 10000000 $FE03 Break Flag Control Register (BFCR) Read: B C F E [...]

  • Pagina 65

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 65 Table 7-1 shows the internal signal names used in this section. 7.3 SIM Bus Clock Control and Generation The bus clock generator provides system clock signal s for the CPU and peripherals on the MCU. The syst em clocks are generated from an incoming clock, CG MOUT, as [...]

  • Pagina 66

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 66 Freescale Se miconduc tor 7.3.2 Clock Start-Up from POR When the power-on reset module generat es a reset, t he clocks to the CPU and peripherals are inactive an d held in an inactive phase until after the 4096 CGMXCLK cycle POR tim eout has completed. The RST pin is driven low by the SIM du [...]

  • Pagina 67

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 67 An internal reset cl ears the SIM counter (see 7.5 SIM Counter ), but an external reset does not. Each of th e resets sets a co rresponding bit in the reset status register (RSR). (See 7.8 SIM Registers .) 7.4.1 External Pin Reset The RST pin circuits incl ude an inter[...]

  • Pagina 68

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 68 Freescale Se miconduc tor Figure 7-5. Inter nal Reset Timing The COP reset is asynchro nous to the bus clock. Figure 7-6. Sources of Internal Reset The active reset feature allows the par t to issue a reset to peripherals and other chips within a system built around the MCU. 7.4.2.1 Power-On [...]

  • Pagina 69

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 69 Figure 7-7. POR Recovery 7.4.2.2 Computer Operating Properly (COP) Reset An input to the SIM is reserved for the COP reset signal. The overflow of the COP counter causes an internal reset and sets the COP bit in the reset status register (RSR). Th e SIM actively pulls [...]

  • Pagina 70

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 70 Freescale Se miconduc tor 7.4.2.3 Illegal Opcode Reset The SIM decodes signals from the CPU to detect illegal instructions. An illegal instruction sets the ILOP bit in the reset st atus register (RSR) and causes a reset. If the stop enable bit, ST OP, in the mask option regi ster is logic zer[...]

  • Pagina 71

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 71 7.5 SIM Counter The SIM counter is used by the pow er-on reset module (POR) and in stop mode recovery to allow the os cillator time to stabilize before enabling the internal bus (I BUS) clocks. The SIM c ounter also serves as a prescalar for the computer operati ng pro[...]

  • Pagina 72

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 72 Freescale Se miconduc tor 7.6 Exception Control Normal, sequential progra m execution can be chang ed in three different ways: • Interrupts – Maskable hardware CPU interrupts – Non-maskable software interrupt instru ction (SWI) • Reset • Break interrupts 7.6.1 Interrupts An interrup[...]

  • Pagina 73

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 73 Figure 7-8. Interrupt Processing NO NO NO YES NO NO YES NO YES YES FROM RESET BREAK I BIT SET? IRQ1 INTERRUPT? USB INTERRUPT? FETCH NEXT INSTRUCTION UNSTACK CPU REGISTERS. STACK CPU REGISTERS SET I BIT LOAD PC WITH INTERRUPT VECTOR EXECUTE INSTRUCTION. YES YES I BIT SE[...]

  • Pagina 74

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 74 Freescale Se miconduc tor At the beginning of an interrupt, the CPU sa ves the CPU register contents on the sta ck and sets the interrupt ma sk (I bit) to prevent additional interrupts. At the end of an interrupt , the RTI instruction recovers the CPU re gist er contents from the stack so tha[...]

  • Pagina 75

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 75 set, the SIM proceeds with interrup t processing; other wise, the next instruction is fetched and executed. If more than one interrupt is pending at th e end of an instruction execution, the highest priority interrupt is serviced first. Figure 7-11 demonstrates what ha[...]

  • Pagina 76

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 76 Freescale Se miconduc tor 7.6.1.2 SWI Instruction The SWI instruction is a non-maskable instruct ion that causes an interrupt regardless of the state of the interrupt mask (I bit) in the condition code register. NOTE: A software interrupt pushes PC onto the stack. A software interrupt does no[...]

  • Pagina 77

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 77 7.6.2.1 Interrupt St atus Register 1 I F 6–I F 1 — Interrupt Flags 1–6 These flags indicate the presence of interrupt r equests from the sources shown in Table 7-3 . 1 = Interrupt request present 0 = No interrupt request present Bit 0 and Bit 1 — Always read 0 [...]

  • Pagina 78

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 78 Freescale Se miconduc tor 7.6.2.2 Interrupt St atus Register 2 I F 11–I F 7 — Interrupt Flags 11–7 These flags indicate the presence of interrupt r equests from the sources shown in Table 7-3 . 1 = Interrupt request present 0 = No interrupt request present 7.6.2.3 Interrupt St atus Regi[...]

  • Pagina 79

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 79 7.6.3 Reset All reset sources always have equal and highest pr iority and cannot be arbitrated. 7.6.4 Break Interrupts The break module can st op normal program flow at a software- programmable break point by assert ing its break interrupt output. (See Section 16. Brea[...]

  • Pagina 80

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 80 Freescale Se miconduc tor below. Both STOP and WAIT clear the interrupt mask (I) in the condition code register, allowing interrupts to occur. 7.7.1 Wait Mode In wait mode, t he CPU clocks are inactive while the peripheral clocks continue to run. Figure 7-15 shows the timing fo r wait mode en[...]

  • Pagina 81

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 81 Figure 7-16. Wait Recovery from Interrupt or Break Figure 7-17. Wait Recover y from Internal Reset 7.7.2 Stop Mode In stop mode, the SIM counter is reset and the system clocks are disabled. An interrupt request from a module can cause an exit from stop mode. Stacking f[...]

  • Pagina 82

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 82 Freescale Se miconduc tor A break interrupt during stop mode sets the SI M break stop/wait bit (SBSW) in the break st atus register (BSR). The SIM counter is held in reset from the execution of the STOP instruction until th e beginning of stop recovery. It is then used to time the recovery pe[...]

  • Pagina 83

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 83 7.8 SIM Registers The SIM has three memo ry mapped registers. Table 7-4 shows the mapping of thes e registers. 7.8.1 Break Status Register (BSR) The break status register contains a flag to indicate that a break caused an exit from stop or wait mode. SBSW — SIM Break[...]

  • Pagina 84

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 84 Freescale Se miconduc tor 7.8.2 Reset Status Register (RSR) This register contains six flags that show the sour ce of the last reset. Clear the SIM reset status register by reading it. A power-on reset sets the POR bit and clear s all other bits in the register. ; ; ; This code works if the H[...]

  • Pagina 85

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 85 POR — Power-On Reset Bit 1 = Last reset caused by POR circuit 0 = Read of RSR PIN — External Reset Bit 1 = Last reset caused by external reset pin (RST ) 0 = POR or read of RSR COP — Computer Operati ng Properly Reset Bit 1 = Last reset caused by COP counter 0 = [...]

  • Pagina 86

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 86 Freescale Se miconduc tor BCFE — Break Clear Flag Enable Bit This read/write bit enables software to clear status bits by accessing status registers while the MCU is in a break state. To clear status bits during the br eak state, the BCFE bit must be set. 1 = Status bits clearable during br[...]

  • Pagina 87

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 87 Advance Information — MC68HC(7)08KH12 Section 8. Clock Generator Module (CGM) 8.1 Contents 8.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 8.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Pagina 88

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 88 Freescale Se miconduc tor 8.6.4 PLL Referenc e Divider Select Register (PRDS) . . . . . . . . 106 8.7 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 8.8 Special Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 8[...]

  • Pagina 89

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 89 8.3 Features Features of the CGM include: • VCO Center-Of-Range Frequuency t uned to 48 MHz for Low-Jitter Clock Reference for USB Module • Low-Frequency Crystal Operation with Low-Power Operation and High-Output Frequen cy Resolution • Programmable Reference Div[...]

  • Pagina 90

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 90 Freescale Se miconduc tor Figure 8-1. CGM Block Diagram BCS PHASE DETECTOR LOOP FILTER FREQUENCY DIVIDER VOLTAGE CONTROLLED OSCILLATOR AUTOMATIC MODE CONTROL LOCK DETECTOR CLOCK CGMXCL K CGMOUT CGMVDV CGMVCLK SIMOSCEN INTERRUPT CONTROL CGMINT CGMRDV PLL ANALOG ÷ 2 CGMRCLK OSC2 OSC1 SELECT CI[...]

  • Pagina 91

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 91 8.4.1 Crystal Oscillator Circuit The crystal oscillator circuit consis ts of an inverting amplifier and an external crystal. The OSC1 pin is t he input to the amp lifier and the OSC2 pin is the output. The SIMOSCEN si gnal from the sys tem integration module (SIM) enab[...]

  • Pagina 92

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 92 Freescale Se miconduc tor The operating range of the VCO is programmable for a wide range of frequencies and for maximum immunity to external noise, including supply and CGM/XFC noise. The VCO frequency is bo und to a range from roughly 40 MH z to 56 MHz, f VRS . Modulating the voltage on the[...]

  • Pagina 93

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 93 8.4.4 Acquisition and Tracking Modes The PLL filter is manually or automatically conf igurable into one of two operating modes: • Acquisition mode — In acquisition m ode, the filter can make large frequency corrections to the VC O. This mode is used at PLL startup [...]

  • Pagina 94

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 94 Freescale Se miconduc tor noise hit and th e software must take a ppropriate action, depending on the application. (See 8.7 Interrupts for information and precautions on using interrupts.) The following c onditions apply when the PLL is in automatic bandwidth control mode: • The ACQ bit (Se[...]

  • Pagina 95

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 95 2. Choose a practical PLL (cr ystal) reference frequency, f RCLK , and the reference clock divider, R. Frequency errors to the PLL are corrected at a rate of f RCLK /R. For stability and lock time reduction, this rate must be as fast as possible. The VCO frequency must[...]

  • Pagina 96

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 96 Freescale Se miconduc tor A zero value for R or N is interpreted exactly the same as a value of one. A zero value for L disabl es the PLL and prevents its selection as the source for the base clock. (See 8.4.8 Base Clock Se lector Circuit .) 8.4.8 Base Clock Selector Circuit This circuit is u[...]

  • Pagina 97

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 97 • Tuning capacitor, C 2 (can also be a fixed capacitor) • Feedback resistor, R B • Series resistor, R S (optional) The series resistor (R S ) is included in the diagram to follow strict Pierce oscillator guidelines and may not be r equired for all rang es of oper[...]

  • Pagina 98

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 98 Freescale Se miconduc tor 8.5 I/O Signals The following paragraphs descr ibe the CGM I/O signals. 8.5.1 Crystal Amplifier Input Pin (OSC1) The OSC1 pin is an input to the crystal oscillator amplifier. 8.5.2 Crystal Amplifier Output Pin (OSC2) The OSC2 pin is the output of the crystal oscillat[...]

  • Pagina 99

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 99 8.5.6 Buffered Crystal Clock Output (CGMVOUT) CGMVOUT buffers the OSC1 clo ck for external use. 8.5.7 CGMVSEL CGMVSEL must be ti ed low or floated. 8.5.8 Oscillator Enable Signal (SIMOSCEN) The SIMOSCEN signal come s from the system int egration module (SIM) and enable[...]

  • Pagina 100

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 100 Freescale Se miconduc tor 8.6 CGM Registers These registers control and m onitor operation of the CGM: • PLL control regi ster (PCTL) (See 8.6.1 PLL Cont rol Register (PCTL) .) • PLL bandwidth control register (PBWC) (See 8.6.2 PLL Bandwidth Control Register (PBWC) .) • PLL multiplier [...]

  • Pagina 101

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 101 T ab le 8-2. CGM I/O Register Summary Addr. Register Name Bit 7 6 5 4 3 2 1 Bit 0 $003A PLL Control Register (PCTL) Read: PLLIE PLLF PLLON BCS PRE1 PRE2 00 Write: R e s e t : 00101000 $003B PLL Bandwidth Control Register (PBWC) Read: AUTO LOCK ACQ 00000 Write: R e s e[...]

  • Pagina 102

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 102 Freescale Se miconduc tor 8.6.1 PLL Control Register (PCTL) The PLL control register contains t he interrupt enable a nd flag bits, the on/off switch, the base clock selector bit, the prescaler bits, and the VCO power of two range selector bits. PLLIE — PLL Interrupt Enable Bit This read/w[...]

  • Pagina 103

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 103 PLLON — PLL On Bit This read/write bit activates t he PLL and enables the VCO clock, CGMVCLK. PLLON cannot be cleared if the VCO clock is driving the base clock, CGMOUT (BCS = 1). (See 8.4.8 Base Clock Selector Circuit .) Reset sets this bit so that the loop can sta[...]

  • Pagina 104

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 104 Freescale Se miconduc tor 8.6.2 PLL Bandwidth Control Register (PBWC) The PLL bandwidth control register: • Indicates when the PLL is locked • In automatic bandwidth control mode , indicates when the PLL is in acquisition or tracking mode AUTO — Automatic Bandwidth Control Bit This rea[...]

  • Pagina 105

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 105 logic zero and has no m eaning. The write one func tion of this bit is reserved for test, so this bit must always be written a zero. Reset clears the LOCK bit. 1 = VCO frequency correct or locked 0 = VCO frequency inco rrect or unlocked ACQ — Acquisition Mode Bit Wh[...]

  • Pagina 106

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 106 Freescale Se miconduc tor MUL[11:0] — Multiplier select bits These read/write bits control the m odulo feedback divider that selects the VCO frequency mu ltiplier N. (See 8.4.3 PLL Circuits and 8.4.6 Programming the PLL .) MUL[11:0] cannot be written when the PLLON bit in the PCTL is set. [...]

  • Pagina 107

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 107 8.7 Interrupts When the AUTO bit is set in the PLL bandwidth control register (PBWC), the PLL can generate a CPU interrupt request ev ery time the LOCK bit changes state. The PLLIE bit in the PLL control register (PCTL) enables CPU interrupts from the PLL. PLLF, the i[...]

  • Pagina 108

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 108 Freescale Se miconduc tor 8.8.2 CGM During Break Interrupts The system integration module (SIM) c ontrols whether status bits in other modules can be cleared during th e break state. The BCFE bit in the SIM break flag contro l register (SBFCR) enabl es software to clear status bits during t [...]

  • Pagina 109

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 109 Other systems refer to ac quisition and lock times as the time the system takes to reduce the error between the actual output and the desired output to within specified toleranc es. Therefore, the acquisition or lock time varies according to the original error in the [...]

  • Pagina 110

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 110 Freescale Se miconduc tor The most critical parameter which af fects the reaction times of the PLL is the reference frequency, f RDV . This frequency is the input to the phase detector and controls how often the PLL makes corr ections. For stability, the corrections must be small compared to[...]

  • Pagina 111

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 111 8.9.3 Choosing a Filter Capacitor As described in 8.9.2 Parametric Infl uences on R eaction Time , the external filter capacitor, C F , is critical to the stabi lity and reaction time of the PLL. The PLL is also dependent on reference frequency and supply voltage. The[...]

  • Pagina 112

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 112 Freescale Se miconduc tor an initial frequency error, (f DES – f OR IG )/f DES , of not more th an ± 100 percent. NOTE: The inverse proportionality between the lock time a nd the reference frequency. In automatic bandwidth control m ode, the acquisition and lock times are quantized into u[...]

  • Pagina 113

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 113 Advance Information — MC68HC(7)08KH12 Section 9. Universal Serial Bus Module (USB) 9.1 Contents 9.2 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 9.3 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [...]

  • Pagina 114

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 114 Freescale Se miconduc tor 9.2 Features Features of the gene ral USB Module include the following: • Integrated 3.3 Volt Regulator with 3.3V Output Pin REGOUT • Integrated USB transceiver supp orting both full speed and low speed functions • USB Data Control Logic – Packet decoding/ge[...]

  • Pagina 115

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 115 Features of the embedded device f unction include the following: • Device Control Endpoint 0 a nd Interrupt Endpoints 1 and 2 – 8-byte transmit buffer – 8-byte receive buffer • Device Interrupt Endpoints 1 and 2 – 8-byte transmit buffer • USB generated int[...]

  • Pagina 116

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 116 Freescale Se miconduc tor Figure 9-1. USB Block Diagram 9.4 I/O Register Description of the HUB function The USB hub function prov ides a set of contro l/status registers and sixteen data registers that provide storage for t he buffering of data between the USB hub function and the CPU. Thes[...]

  • Pagina 117

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 117 T ab le 9-1. HUB Contro l Register Summary Addr. Register Name Bit 7 6 5 4 3 2 1 Bit 0 $0051 USB HUB Downstream Port 1 Control Register (HDP1CR) Read: PEN1 LOWSP1 RST1 RESUM1 SUSP1 0D 1 + D 1 – Write: R e s e t : 000000 X X $0052 USB HUB Downstream Port 2 Control Re[...]

  • Pagina 118

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 118 Freescale Se miconduc tor $005A Unimplemented Read: Write: Reset: $005B USB HUB Control Register 0 (HCR0) Read: TSEQ STALL0 TXE RXE TPSIZ3 TPSIZ2 TPSIZ1 TPSIZ0 Write: R e s e t : 00000000 $005C USB HUB Endpoint 1 Control and Data Register (HCDR) Read: STALL1 PNEW PCHG5 PCHG4 PCHG3 PCHG2 PCHG[...]

  • Pagina 119

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 119 T ab le 9-2. HUB Data Register Summary Addr. Register Name Bit 7 6 5 4 3 2 1 Bit 0 $0030 USB HUB Endpoint 0 Data Register 0 (HE0D0) Read: HE0R07 HE0R06 HE0R05 HE0R 04 HE0R03 HE0R02 HE0R01 HE0R00 Write: HE0T07 HE0T06 HE0T05 HE0T 04 HE0T03 HE0T02 HE0T01 HE0T00 R e s e t[...]

  • Pagina 120

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 120 Freescale Se miconduc tor 9.4.1 USB HUB Root Port Control Register (HRPCR) RESUM0 — Force Resume to the Root Port This read/write bit forces a resume signal (“ K” state) on to the USB root port data lines to initiate a remote wakeup. Software should control the timing of the forced res[...]

  • Pagina 121

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 121 EOF2 is generated by KH12 every mill isecond, if SOF is not detected when three or more EOF2 has occurred, softwa re can set the SUSPND-bit and put KH 12 into suspend mode. D0+/D0– — Root Port Differential Data These read only bits are the differential data shown [...]

  • Pagina 122

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 122 Freescale Se miconduc tor bit can be set to 1 by the host reques t only. It can be cleared either by hardware when a fault condition was detected or by software through the host request. Re set clears this bit. 1 = Downstream port is enabled 0 = Downstream po rt is disabled LOWSP1-LOWSP4 —[...]

  • Pagina 123

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 123 SUSP1-SUSP4 — Downstream Port Selective Suspend Bit This read/write bit forces the downstream port entering the selective suspend mode. This bit can be set by the host request SetPortFeature (PORT_SUSPEND) only. When this bit is se t, the hub prevents propagating an[...]

  • Pagina 124

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 124 Freescale Se miconduc tor SOFF — Start Of Frame Detect Flag This read only bit is set when a valid SOF PID is detected on the D0+ and D0– lines at the root port. Software must clear this flag by writing a logic 1 to SOFFR bit in the SIETSR register . Reset clears this bit. Writing to SOF[...]

  • Pagina 125

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 125 SOFIE — Start Of Fr ame Interrupt Enable This read/write bit enabl es the Start Of Fr ame to generate a USB interrupt when the SOFF bit becomes set. Re set clears this bit. 1 = USB interrupt enabled for Start Of Frame 0 = USB interrupt disabl ed for Start Of Frame E[...]

  • Pagina 126

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 126 Freescale Se miconduc tor RSTF — USB Reset Flag This read only bit is set when a valid reset signal state is detected on the D0+ and D0- lines. This reset detecti on will also generate an internal reset signal to reset the CPU and other peripherals including the USB module. This bit is cle[...]

  • Pagina 127

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 127 9.4.5 USB HUB Address Register (HADDR) USBEN — USB Module Enable This read/write bit enabl es and disables t he USB module. When USBEN is cleared, t he USB module will not respond to any tokens and the external regul ated output REGOUT will be turned off. NOTE: **US[...]

  • Pagina 128

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 128 Freescale Se miconduc tor 9.4.6 USB HUB Interrupt Register 0 (HIR0) TXDF — HUB Endpoint 0 Data Transmit Flag This read only bit is set after the data stored in HUB Endpoint 0 transmit buffers has been sent an d an ACK handshake packet from the host is received. Once the next set of data is[...]

  • Pagina 129

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 129 TXDIE — HUB Endpoint 0 Tr ansmit Interrupt Enable This read/write bit enables the Transmit H UB Endpoint 0 to generate CPU interrupt requests when the TXDF bit becomes set. Reset clears the TXDIE bit. 1 = USB interrupt enabled for Transmi t HUB Endpoint 0 0 = USB in[...]

  • Pagina 130

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 130 Freescale Se miconduc tor TSEQ — HUB Endpoint 0 Transmit Sequence Bit This read/write bit deter mines which type of da ta packet (DATA0 or DATA1) will be sent during the next IN tr ansaction directed at Endpoint 0. Toggling of this bit must be controlled by software. Reset clears this bit.[...]

  • Pagina 131

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 131 TPSIZ3-TPSIZ0 — HUB Endpoint 0 Transmit Data Packet Size These read/write bits st ore the number of trans mit data bytes for the next IN token request fo r HUB Endpoint 0. Thes e bits are cleared by reset. 9.4.8 USB HUB Endpoint1 Control & Data Register (HCDR) S[...]

  • Pagina 132

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 132 Freescale Se miconduc tor PCHG5-PCHG0 — HUB and Po rt Status Change Bits These read/write bits report the st atus change for the Hub, embedded device and the four downstream ports. The Status Change Bitmap is returned to the host th rough the HUB endpoint 1 if the bit PNEW is 1. These bits[...]

  • Pagina 133

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 133 RSEQ — HUB Endpoint 0 Receive Sequence Bit This read only bit indica tes the type of data packet last received for HUB Endpoint 0 (DAT A0 or DATA1). 1 = DATA1 Token received in la st HUB Endpoint 0 Receive 0 = DATA0 Token received in la st HUB Endpoint 0 Receive SET[...]

  • Pagina 134

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 134 Freescale Se miconduc tor 9.4.10 USB HUB Endpoint 0 Data Registers 0-7 (HE0D0-HE0D7) HE0Rx7-HE0Rx0 — HUB Endpoint 0 Receive Data Buffer These read only bits are serially loaded with OUT token or SETUP token data directed at HUB Endpoint 0. The data is received over the USB’s D0+ and D0?[...]

  • Pagina 135

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 135 T ab le 9-3. Embedded De vice Control Register Summary Addr. Register Name Bit 7 6 5 4 3 2 1 Bit 0 $0047 USB Embedded Device Control Register 2 (DCR2) Read: 0000 ENABLE2 ENABLE1 DSTALL2 DSTALL1 Write: R e s e t : 00000000 $0048 USB Embedded Device Address Register (DA[...]

  • Pagina 136

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 136 Freescale Se miconduc tor T ab le 9-4. Embedded Device Data Register Summary Addr. Register Name Bit 7 6 5 4 3 2 1 Bit 0 $0020 USB Embedded Device Endpoint 0 Data Register 0 (DE0D0) Read: DE0R07 DE0R06 DE0R05 DE0R 04 DE0R03 DE0R02 DE0R01 DE0R00 Write: DE0T07 DE0T06 DE0T05 DE0T 04 DE0T03 DE0T[...]

  • Pagina 137

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 137 $0028 USB Embedded Device Endpoint 1/2 Data Regi ster 0 (DE1D0) Read: Write: DE1T07 DE1T06 DE1T05 DE1T 04 DE1T03 DE1T02 DE1T01 DE1T00 R e s e t : XXXXXXXX $0029 USB Embedded Device Endpoint 1/2 Data Regi ster 1 (DE1D1) Read: Write: DE1T17 DE1T16 DE1T15 DE1T 14 DE1T13 [...]

  • Pagina 138

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 138 Freescale Se miconduc tor 9.5.1 USB Embedded Device Address Register (DADDR) DEVEN — Enable U SB Embedded Device These bit enable or disable the embedded device function. It is used together with PEN1-PEN 4 to control the e numeration sequence. Reset clears these bits. 1 = USB Embedded Dev[...]

  • Pagina 139

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 139 TXD0F — Embedded Device Endpo int 0 Data Transmit Flag This read only bit is set after t he data stored in embedded device Endpoint 0 transmit buffers has been sent and an ACK handshake packet from the host is received. Once the next set of data is ready in the tran[...]

  • Pagina 140

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 140 Freescale Se miconduc tor 1 = Receive Embedded Device E ndpoint 0 can generate a CPU interrupt request 0 = Receive Embedded Device E ndpoint 0 cannot generate a CPU interrupt request TXD0FR — Embedded Device En dpoint 0 Transmit Flag Reset Writing a logic 1 to this write only bit will clea[...]

  • Pagina 141

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 141 1 = Transmit on Endpoint 1 or Endpoint 2 of the embedded device has occurred 0 = Transmit on Endpoint 1 or Endpoint 2 of the embedded device has not occurred TXD1IE — Embedded Device Endpoint 1/2 Transmi t Interrupt Enable This read/write bit enabl es the USB to gen[...]

  • Pagina 142

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 142 Freescale Se miconduc tor 1 = DATA1 Token active for ne xt embedded device Endpoint 0 transmit 0 = DATA0 Token active for ne xt embedded device Endpoint 0 transmit DSTALL0 — Embedded De vice Endpoint 0 Force Stall Bit This read/write bit caus es embedded device Endpoint 0 to return a STALL[...]

  • Pagina 143

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 143 TP0SIZ3-TP0SIZ0 — Em bedded Device Endpoint 0 Transmit Data Packet Size These read/write bits st ore the number of trans mit data bytes for the next IN token request for embedded device Endpoint 0. These bits are cleared by reset. 9.5.5 USB Embedded Device Control R[...]

  • Pagina 144

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 144 Freescale Se miconduc tor 1 = The data buffers are used fo r embedded device Endpoint 2 0 = The data buffers are used fo r embedded device Endpoint 1 TX1E — Embedded Device Endpo int 1/2 Transmit Enable This read/write bi t enables a transmit to occur when the USB Host controller sends an [...]

  • Pagina 145

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 145 DRSEQ — Embedded Devi ce Endpoint 0 Receive Sequence Bit This read only bit indica tes the type of data packet last received for embedded device Endpoint 0 (DATA0 or DATA1). 1 = DATA1 Token received in la st embedded device Endpoint 0 receive 0 = DATA0 Token receive[...]

  • Pagina 146

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 146 Freescale Se miconduc tor 9.5.7 USB Embedded Device Control Register 2 (DCR2) ENABLE2 — Embedded Devi ce Endpoint 2 Enable This read/write bit enabl es embedded device Endp oint 2 and allows the USB to respond to IN packets addressed to this endpoint. Reset clears this bit. 1 = Embedded de[...]

  • Pagina 147

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 147 DSTALL1 — Embedded De vice Endpoint 1 Force Stall Bit This read/write bit caus es embedded device Endpoint 1 to return a STALL handshake when polle d by either an IN or OUT token by the USB Host Controller. Reset clears this bit. 1 = Send STALL handshake 0 = Default[...]

  • Pagina 148

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 148 Freescale Se miconduc tor 9.5.9 USB Embedded Device Endpoint 1/2 Data Registers (DE1D0-DE1D7) DE1TD7-DE1TD0 — Embedded Device Endpoint 1/ Endpoint 2 Transmit Data Buffer These write only buffers are loaded by software with data to be sent on the USB bus on the next IN to ken directed at En[...]

  • Pagina 149

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 149 Advance Information — MC68HC(7)08KH12 Section 10. Monitor ROM (MON) 10.1 Contents 10.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 10.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [...]

  • Pagina 150

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 150 Freescale Se miconduc tor 10.3 Features Features of the monitor ROM include the following: • Normal User-Mode Pin Functionality • One Pin Dedicated to Serial Communication between Monitor ROM and Host Computer • Standard Mark/Space Non-Return-to-Zero (NRZ ) Communication with Host Comp[...]

  • Pagina 151

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 151 Figure 10-1. Moni tor Mode Circuit + + + + 10 M Ω X1 V DD V DD + V HI MC145407 MC74HC125 68HC708 RST IRQ1 /V PP OSC1 OSC2 V SS2 V SSA V DD 1 PA0 V DD 10 k Ω 0.1 µ F 10 Ω 6 5 2 4 3 1 DB-25 2 3 7 20 18 17 19 16 15 V DD V DD V DD 20 pF 20 pF 10 µ F 10 µ F 10 µ [...]

  • Pagina 152

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 152 Freescale Se miconduc tor 10.4.1 Entering Monitor Mode Table 10-1 shows the pin conditions for entering monitor mode. If PTC3 is low upon moni tor mode entry, CG MOUT is equal to the crystal frequency. The bus frequency in this case is a divide-by-two of the input clock. If PTC3 is high upon[...]

  • Pagina 153

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 153 When the host computer has comple ted downloading code into the MCU RAM, This code can be executed by driving PTA0 low while asserting RST low and then high. The internal monitor ROM fi rmware will interpret the low on PTA0 as an i ndication to jump to RA M, and execu[...]

  • Pagina 154

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 154 Freescale Se miconduc tor 10.4.2 Data Format Communication with the monitor ROM is in standard non-return-to-zero (NRZ) mark/space data format. (See Figure 10-2 and Figure 10-3 .) Figure 10-2. Moni tor Data Format Figure 10-3. Sample Monitor Waveforms The data transmit and receive rate can b[...]

  • Pagina 155

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 155 10.4.4 Break Signal A start bit followed by nine low bits is a break signal. (See Figure 10-5.) When the monitor receives a break sign al, it drives the PTA0 pin high for the duration of tw o bits before echoi ng the break signal. Figure 10-5. Break Transaction 10.4.5[...]

  • Pagina 156

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 156 Freescale Se miconduc tor T ab le 10-3. READ (R ead Memory) Command Descrip tion Read byte from mem or y Operand Specifies 2-b yte addr ess in high b yte:lo w b yte order Data Returned Retu r ns contents of specified ad dre ss Opcode $4A Command Sequence ADDR. HIGH READ READ ADDR. HIGH ADDR.[...]

  • Pagina 157

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 157 T ab le 10-5. IREAD (I ndex ed Read) Command Description Read next 2 b ytes in me mory from last address accessed Operand Specifies 2-b yte addr ess in high b yte:lo w b yte order Data Retur ne d Re tur ns content s of next two addresses Opcode $1A Command Sequence DA[...]

  • Pagina 158

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 158 Freescale Se miconduc tor NOTE: A sequence of IREAD or IWRITE commands can sequentially access a block of memory over the full 64-Kbyte memory map. T ab le 10-7. READSP (Read Stack P ointer) Command Description Reads stack pointer Operand Non e Data Retur ned Retur ns stack pointer in hig h [...]

  • Pagina 159

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 159 10.4.6 Baud Rate The communication baud rate is cont rolled by crystal frequency and the state of the PTC3 pin upon entry into monitor mode. When PTC3 is high, the divide by ratio is 1024. If the PTC3 pin is at logic zero upon entry into monitor mode, the divi de by r[...]

  • Pagina 160

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 160 Freescale Se miconduc tor[...]

  • Pagina 161

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 161 Advance Information — MC68HC(7)08KH12 Section 11. Timer Interface Module (TIM) 11.1 Contents 11.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 11.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Pagina 162

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 162 Freescale Se miconduc tor 11.2 Introduction This section describes the timer inte rface module (TIM2, Version B). The TIM is a two-channel time r that provides a timi ng reference with input capture, output compar e, and pulse-width-m odulation functions. Figure 11-1 is a block diagr am of t[...]

  • Pagina 163

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 163 11.4 Functional Description Figure 11-1 shows the structure of the TIM. The central component of the TIM is the 16-bit TIM counter that can operate as a free-running counter or a modulo up-counter. The TIM counter provides the timing reference for the input capture an[...]

  • Pagina 164

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 164 Freescale Se miconduc tor T ab le 11-1. TIM I/O Register Summary Addr. Register Name Bit 7 6 5 4 3 2 1 Bit 0 $0010 TIM Status/Control Register (TSC) Read: TOF TOIE TSTOP 00 PS2 PS1 PS0 Write: 0 TRST R e s e t : 00100000 $0012 TIM Counter Register High (TCNTH) Read: Bit15 Bit14 Bit13 Bit12 Bi[...]

  • Pagina 165

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 165 11.4.1 TIM Counter Prescaler The TIM clock source can be one of th e seven prescaler outputs or the TIM clock pin, PTE0/TCLK. The pre scaler generates seven clock rates from the internal bus cl ock. The prescaler select bits, PS[2:0], in the TIM status and control reg[...]

  • Pagina 166

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 166 Freescale Se miconduc tor 11.4.3.1 Unbuffered Output Compare Any output compare channel can generate unbuffered output compare pulses as described in 11.4.3 Output Compare . The pulses are unbuffered because changing the output compare value requires writing the new value over the old value [...]

  • Pagina 167

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 167 channel 0 registers initially controls the output on t he PTE1/TCH0 pin. Writing to the TIM c hannel 1 registers enables the TIM channel 1 registers to synchronously control the output after the TI M overflows. At each subsequent overflow, t he TIM channel registers ([...]

  • Pagina 168

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 168 Freescale Se miconduc tor Figure 11-2. PWM Peri od and Pulse Width The value in the TIM counter modu lo registers and the selected prescaler output determines the frequency of the PWM output. The frequency of an 8-bit PWM signal is va riable in 256 in crements. Writing $00FF (255) to the TI [...]

  • Pagina 169

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 169 write a new, smaller pulse width value may caus e the compare to be missed. The TIM may pass the new value before it is written. Use the following methods to synch ronize unbuffered changes in the PWM pulse width on channel x: • When changing to a shorter pulse widt[...]

  • Pagina 170

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 170 Freescale Se miconduc tor control register (TSC1) is unused. Whil e the MS0B bit is set, the channel 1 pin, PTE2/TCH1, is avail able as a general-purpose I/O pin. NOTE: In buffered PWM signal gener ation, do not write new pulse width values to the currently active channel registers. Writi ng[...]

  • Pagina 171

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 171 Setting MS0B links chann els 0 and 1 and configur es them for buffered PWM operation. The TIM channel 0 r egisters (TCH0H:TCH0L) initially control the buffered PWM output. TIM status contro l register 0 (TSCR0) controls and monitors the PWM signal from the linked chan[...]

  • Pagina 172

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 172 Freescale Se miconduc tor If TIM functions are not required during wait mode, reduce power consumption by stopping the TIM befor e executing the WAIT instruction. 11.7 TIM During Break Interrupts A break interrupt st ops the TIM counter. The system integration module (SIM) c ontrols whether [...]

  • Pagina 173

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 173 minimum TCLK pulse width, TCLK LMIN or TCLK HMIN , is: The maximum TCLK frequency is: PTE0/TCLK is available as a general -purpose I/O pin when not used as the TIM clock input. When the PTE0/T CLK pin is the TIM clock input, it is an input regardless of the state of t[...]

  • Pagina 174

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 174 Freescale Se miconduc tor • Resets the TIM counter • Prescales the TIM counter clock TOF — TIM Overflow Flag Bit This read/write flag is set when the TIM counter resets to $0000 after reaching the modulo va lue programmed in the TIM counter modulo registers. Clear TOF by reading the TI[...]

  • Pagina 175

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 175 NOTE: Do not set the TSTOP bit before enteri ng wait mode if the TIM is required to exit wait mode. TRST — TIM Reset Bit Setting this write-only bit resets the TIM counter and the TIM prescaler. Setting TRST has no ef fect on any other registers. Counting resumes fr[...]

  • Pagina 176

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 176 Freescale Se miconduc tor TCNTH do not affect the latched TC NTL value until TCNTL is read. Reset clears the TIM counter registers. Setting the TIM reset bit (TRST) also clears the TIM counter registers. NOTE: If you read TCNTH during a break interrupt, be sure to unlatch TCNTL by reading TC[...]

  • Pagina 177

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 177 NOTE: Reset the TIM counter bef ore writing to the TIM counter modulo registers. 11.9.4 TIM Channel Status and Control Registers (TSC0:TSC1) Each of the TIM channel status and control regi sters does the following: • Flags input captures and output compares • Enab[...]

  • Pagina 178

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 178 Freescale Se miconduc tor CHxF — Chann el x Flag Bit When channel x is an inpu t capture channel, this read/write bit is set when an active edge occurs on the channel x pin. When channel x is an output compare channel, CHxF is set when the value in the TIM counter registers matche s the va[...]

  • Pagina 179

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 179 MSxB — Mode Select Bit B This read/write bit sele cts buffered output co mpare/PWM operation. MSxB exists only in the TIM channel 0 status and control register. Setting MS0B disables the channel 1 status and control register and reverts TCH1 to gen eral-purpose I/O.[...]

  • Pagina 180

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 180 Freescale Se miconduc tor NOTE: Before enabling a TIM ch annel register for input capture operation, make sure that the PTEx/TCH x pin is stable for at least two bus clocks. TOVx — Toggle-On-Overflow Bit When channel x is an output compar e channel, this read/write bit controls the behavio[...]

  • Pagina 181

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 181 Figure 11-7. CHxMAX Latency 11.9.5 TIM Channel Registers (TCH0H/L–TCH1H/L) These read/write registers contain the captured TIM counter value of the input capture function or the outp ut compare value of the output compare function. The state of the TIM channel regis[...]

  • Pagina 182

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 182 Freescale Se miconduc tor Address: $0017 TCH0H B i t 7 654321 B i t 0 Read: Bit15 Bit14 Bit13 Bit12 Bit11 Bit10 B it9 Bit8 Write: Reset: Indeterminate after reset Address: $0018 TCH0L B i t 7 654321 B i t 0 Read: Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0 Write: Reset: Indeterminate after reset[...]

  • Pagina 183

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 183 Advance Information — MC68HC(7)08KH12 Section 12. I/O Ports 12.1 Contents 12.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 12.3 Port A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [...]

  • Pagina 184

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 184 Freescale Se miconduc tor 12.2 Introduction Forty-two bidirectional inpu t-output (I/O) pins form five parallel ports. All I/O pins are programmab le as inputs or outputs. NOTE: Connect any unused I/O pins to an appr opriate logic level, either V DD or V SS . Although the I/O port s do not r[...]

  • Pagina 185

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 185 $0007 Data Direction Register D (DDRD) Read: DDRD7 DDRD6 D DRD5 DDRD4 DDRD 3 DDRD2 DDRD 1 DDRD0 Write: R e s e t : 00000000 $0008 Port E Data Register (PTE) Read: 0 0 0 PTE4 PTE3 PTE2 PTE1 PTE0 Write: Reset: Unaffected by reset $0009 Port F Data Register (PTF) Read: P[...]

  • Pagina 186

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 186 Freescale Se miconduc tor 12.3 Port A Port A is an 8-bit gener al-purpose bidirectional I/O port with software configurable pullups. 12.3.1 Port A Data Register (PTA) The port A data regist er contains a data latch fo r each of the eight port A pins. PTA[7:0] — Port A Data Bits These read/[...]

  • Pagina 187

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 187 DDRA[7:0] — Data Dire ction Register A Bits These read/write bits control port A data direction. Reset clears DDRA[7:0], configuring all port A pins as inputs. 1 = Corresponding port A pin configured as output 0 = Corresponding port A pin configured as input NOTE: A[...]

  • Pagina 188

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 188 Freescale Se miconduc tor 12.4 Port B Port B is an 8-bit gener al-purpose bidirectional I/O port with software configurable pullups. 12.4.1 Port B Data Register (PTB) The port B data register co ntains a data latch for each of the eight port B pins. PTB[7:0] — Port B Data Bits These read/w[...]

  • Pagina 189

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 189 12.4.2 Data Direction Register B (DDRB) Data direction register B determine s whether each port B pin is an input or an output. Writing a l ogic one to a DDRB bit enabl es the output buffer for the corresponding port B pin; a logic zero di sables the output buffer. DD[...]

  • Pagina 190

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 190 Freescale Se miconduc tor When bit DDRBx is a lo gic one, reading address $0001 reads the PTBx data latch. When bit DDRBx is a logic zero, reading address $0001 reads the voltage level on the pin. The data latch can al ways be written, regardless of the state of its data direction bit. Table[...]

  • Pagina 191

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 191 PTC[4:0] — Port C Data Bits These read/write bits are software-p rogrammable. Data direction of each port C pin is under the control of the corresponding bit in data direction register C. Reset has no effect on port C data. The port C pullup enable bit, PCP, in the [...]

  • Pagina 192

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 192 Freescale Se miconduc tor Figure 12-9. Port C I/O Circuit When bit DDRCx is a logic one, r eading address $0002 reads the PTCx data latch. When bit DDRCx is a logic zero, reading address $0002 reads the voltage level on the pin. The data latch can al ways be written, regardless of the state [...]

  • Pagina 193

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 193 12.6.1 Port D Data Register (PTD) The port D data register c ontains a data latch for each of the eight port D pins. PTD[7:0] — Port D Data Bits These read/write bits are software programmable. Data direction of each port D pin is under control of the corresponding [...]

  • Pagina 194

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 194 Freescale Se miconduc tor DDRD[7:0] — Data Dire ction Register D Bits These read/write bits control port D data direction. Reset clears DDRD[7:0], configuring all port D pins as inputs. 1 = Corresponding port D pin configured as output 0 = Corresponding port D pin configured as input NOTE:[...]

  • Pagina 195

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 195 12.7 Port E Port E is a 5-bit special function port t hat shares four of its pins with the keyboard interrupt module (KBI) and sh ares three of its pins with the timer interface module (TIM). PT E3–PTE0 pins have built-in schmitt triggered input and so ftware config[...]

  • Pagina 196

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 196 Freescale Se miconduc tor PTE[4:0] — Port E Data Bits PTE[4:0] are read/write, software- programmable bits. Data direction of each port E pin is under the control of the co rresponding bit in data direction register E. TCH1-TCH0 — Timer Channel I/O Bits The PTE2/TCH1-PTE1/TCH0 pins ar e [...]

  • Pagina 197

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 197 DDRE[4:0] — Data Dire ction Register E Bits These read/write bits control port E data direction. Reset clears DDRE[4:0], configuring all port E pins as inputs. 1 = Corresponding port E pin configured as output 0 = Corresponding port E pin configured as input NOTE: A[...]

  • Pagina 198

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 198 Freescale Se miconduc tor 12.7.3 Port-E Optical Interface Enable Register Port E pins PTE3–PTE0, each has an optical c oupling interface circuit which is specially built for optical mouse application. Bits [1:0] of the Optical Interface Enable register enable or disable the interface circu[...]

  • Pagina 199

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 199 XREF2–XREF0 — Reference Voltage Selection X These bits sets the slicing refer ence voltage for optical interface associated with PTE0 and PTE1. YREF2–YREF0 — Reference Voltage Selection Y These bits sets the slicing refer ence voltage for optical interface ass[...]

  • Pagina 200

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 200 Freescale Se miconduc tor Figure 12-17. Optical In terface Voltage References X-VREF VOLTAGE DIVIDER ENABLE VOLTAGE SELECTOR Y-VREF VOLTAGE SELECTOR Y - REFERENCE X - REFERENCE YREF2 YREF1 YREF0 XREF2 XREF1 XREF0 OIEY OIEX OPTICAL INTERFACE REGISTER ($001C)[...]

  • Pagina 201

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 201 Figure 12-18. Port E Op tical Coupling Interface PTE0 PORT LOGIC PTE0 OPTICAL INTERFACE OUTPUT BUFFER MUX SELECT PTE1 PORT LOGIC PTE1 OPTICAL INTERFACE OUTPUT BUFFER X-VREF OIEX (BIT0 OF $1C) 0 1 MUX SELECT 0 1 INTERNAL DATA BUS PTE2 PORT LOGIC PTE2 OPTICAL INTERFACE [...]

  • Pagina 202

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 202 Freescale Se miconduc tor 12.8 Port F Port F is an 8-bit general-purpose bidi rectional I/O port that shares its pins with th e keyboard in terrupt module (KBI). All Port F pins have built- in schmitt triggered input and software configurable pull-up. 12.8.1 Port F Data Register (PTF) The po[...]

  • Pagina 203

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 203 12.8.2 Data Direction Register F (DDRF) Data direction register F determines whether each port F pin is an input or an output. Writing a logic one to a DDRF bit enables the output buffer for the corresponding port F pin; a logic zero dis ables the output buffer. DDRF[[...]

  • Pagina 204

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 204 Freescale Se miconduc tor When bit DDRFx is a logic one, reading address $0009 re ads the PTFx data latch. When bit DDRF x is a logic zero, r eading address $0009 reads the voltage level on the pin. The data latch can always be written, regardless of the state of its data direction bit. Tabl[...]

  • Pagina 205

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 205 LDD — LED Direct Drive Control This read/write bit cont rols the output current capability of port C. When set, the port C pins have curr ent limiting ability so that a LED can be connected directly between the port pin and V DD or V SS without the need of a series [...]

  • Pagina 206

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 206 Freescale Se miconduc tor[...]

  • Pagina 207

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 207 Advance Information — MC68HC(7)08KH12 Section 13. Computer Operating Properly (COP) 13.1 Contents 13.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 13.3 Functional Description . . . . . . . . . . . . . . . . . . . . [...]

  • Pagina 208

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 208 Freescale Se miconduc tor 13.3 Functional Description Figure 13-1 shows the structure of the COP module. Figure 13-1. COP Block Diagram COPCTL WRITE CGMXCLK RESET VECTOR FETCH RESET CIRCUIT RESET STATUS REGISTER INTERNAL RESET SOURCES 12-BIT SIM COUNTER CLEAR ALL STAGES 6-BIT COP COUNTER COP[...]

  • Pagina 209

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 209 The COP counter is a fr ee-running 6-bit counter preceded by the 12-bit SIM counter. If not cleared by soft ware, the COP count er overflows and generates an asynchr onous reset after 2 18 –2 4 or 2 13 –2 4 CGMXCLK cycles, depending on the setting of the COP rate [...]

  • Pagina 210

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 210 Freescale Se miconduc tor 13.4.3 Power-On Reset The power-on reset (POR) ci rcuit in the SIM clears the SIM counter 4096 CGMXCLK cycles after power-up. 13.4.4 Internal Reset An internal reset clears the SIM counter and the COP counter. 13.4.5 Reset Vector Fetch A reset vector fetch occurs wh[...]

  • Pagina 211

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 211 COPRS — COP Rate Select Bit COPRS selects the COP timeout period. Rese t clears COPRS. 1 = COP reset cycle is (2 13 –2 4 ) × CGMXCLK 0 = COP reset cycle is (2 18 –2 4 ) × CGMXCLK COPD — COP Disable Bit COPD disables the COP module. 1 = COP module disabled 0 [...]

  • Pagina 212

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 212 Freescale Se miconduc tor 13.8 Low-Power Modes The WAIT and STOP in structions put the MCU in low-power consumption standby modes. 13.8.1 Wait Mode The COP continues to operate duri ng wait mode. To prevent a COP reset during wait mode, periodicall y clear the COP counter in a CPU interrupt [...]

  • Pagina 213

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 213 Advance Information — MC68HC(7)08KH12 Section 14. External Interrupt (IRQ) 14.1 Contents 14.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 14.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Pagina 214

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 214 Freescale Se miconduc tor 14.4 Functional Description A logic zero applied to th e external interrupt pin can latch a CPU interrupt request. Figure 14-1 shows the structure of the IRQ module. Interrupt signals on the IR Q1 /V PP pin are latched into the IRQ1 latch. An interrupt latch remains[...]

  • Pagina 215

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 215 Figure 14-1. IRQ Module Block Diagram 14.4.1 IRQ1 /V PP Pin A logic zero on the IRQ1 /V PP pin can latch an inte rrupt request into the IRQ1 latch. A vector fetc h, software clear, or reset clears the IRQ1 latch. If the MODE1 bit is set, the IRQ1 /V PP pin is both fal[...]

  • Pagina 216

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 216 Freescale Se miconduc tor • Vector fetch or software clear — A vector fetc h generates an interrupt acknowledge signal to cl ear the latch. Software may generate the interrupt acknowledge sig nal by writing a logic one to the ACK1 bit in the in terrupt status and cont rol register (ISCR)[...]

  • Pagina 217

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 217 14.5 IRQ Module During Break Interrupts The system integration module (SIM) c ontrols whether the IRQ1 latch can be cleared during the br eak state. The BCFE bi t in the break flag control register (BFCR) enables software to clear the latches during the break state. ([...]

  • Pagina 218

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 218 Freescale Se miconduc tor IRQF1 — IRQ1 Flag This read-only status bi t is high when the IRQ1 interrupt is pending. 1 = IRQ1 interrupt pending 0 = IRQ1 interrupt not pending ACK1 — IRQ1 Interrupt Request Acknowledge Bit Writing a logic one to this write-onl y bit clears the IRQ1 latch. AC[...]

  • Pagina 219

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 219 Advance Information — MC68HC(7)08KH12 Section 15. Keyboard Interrupt Module (KBI) 15.1 Contents 15.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 15.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . [...]

  • Pagina 220

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 220 Freescale Se miconduc tor 15.2 Introduction The keyboard module provides twen ty independently maskable external interrupts which are accessibl e via PTD7-PTD0, PTE3-PTE0 and PTF7-PTF0. Though the functionality of the three keyboard interrupts on the three ports is similar, the implementatio[...]

  • Pagina 221

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 221 T ab le 15-1. KBI I/O Register Summary Addr. Register Name Bit 7 6 5 4 3 2 1 Bit 0 $000C Port D Keyboard Status and Control Register (KBDSCR) Read: 0000 K E Y D F 0 IMASKD MODED Write: ACKD R e s e t : 00000000 $000D Port D Keyboard Interrupt Enable Register (KBDIER) [...]

  • Pagina 222

    Adv ance Inf ormation M C68HC(7)08KH1 2 — Re v . 1.1 222 Freescale Se miconducto r 15.4 Port-D Keyboard Interrupt Block Diagram Figure 15-1. Port-D Keyboar d Interrupt Bl ock Diagram KBDIE0 KBDIE7 . . . Port-D DQ CK CLR V DD MODED IMASKD KEYBOARD INTERRUPT FF VECTOR FETCH DECODER ACKD INTERNAL BUS RESET TO PULLUP ENABLE KBD7 KBD0 TO PULLUP ENABLE[...]

  • Pagina 223

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 223 15.4.1 Port-D Keyboard Interrupt Functional Description Writing to the KBDIE7–KBDIE0 bits in the keyboard interrupt enable register independently enables or disables each port D pin as a keyboard interrupt pin. Enabling a keyboard interr upt pin in port-D also enabl[...]

  • Pagina 224

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 224 Freescale Se miconduc tor • Return of all enabled keyboard interr upt pins to logic 1 — As long as any enabled keyboard interrupt pin is at logic 0, the keyboard interrupt remains set. The vector fetch or software clear and the return of all enabled keyboard interrupt pins to logic 1 may[...]

  • Pagina 225

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 225 3. Write to the ACKD bit in the keyboard status and control register to clear any false interrupts. 4. Clear the IMASKD bit. An interrupt signal on an edg e-triggered pin can be acknowledged immediately after enabling the pin. An interrupt si gnal on an edge- and leve[...]

  • Pagina 226

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 226 Freescale Se miconduc tor KEYDF — Port-D Keyboard Flag Bit This read-only bit is set when a keyboard interrupt is pending on port-D. Reset clears the KEYD F bit. 1 = Keyboard interrupt pending 0 = No keyboard interrupt pending ACKD — Port-D Key board Acknowledge Bit Writing a logic 1 to [...]

  • Pagina 227

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 227 KBDIE7–KBDIE0 — Port-D Ke yboard Interrupt Enable Bits Each of these read/write bits enables the corres ponding keyboard interrupt pin on port-D to latch inte rrupt requests. Reset clears the keyboard interrupt enable register. 1 = KBDx pin enabled as ke yboard in[...]

  • Pagina 228

    Adv ance Inf ormation M C68HC(7)08KH1 2 — Re v . 1.1 228 Freescale Se miconducto r 15.5 Port-E Keyboard Interrupt Block Diagram Figure 15-4. Port-E Keyboar d Interrupt Block Diagram KBEIE0 KBEIE3 . . . DQ CK CLR V DD MODEE IMASKE KEYBOARD INTERRUPT FF VECTOR FETCH DECODER ACKE INTERNAL BUS RESET KBE3 KBE0 SYNCHRONIZER KEYEF Port-E Keyboard Interr[...]

  • Pagina 229

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 229 15.5.1 Port-E Keyboard Interrupt Functional Description Writing to the KBEIE3–KBEIE0 bits in the keyboard interrupt enable register independently enables or disables each port E pin as a keyboard interrupt pin. Enabling a keyboard interr upt pin in port-E does not e[...]

  • Pagina 230

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 230 Freescale Se miconduc tor • Return of all enabled keyboard interr upt pins to logic 1 — As long as any enabled keyboard interrupt pin is at logic 0, the keyboard interrupt remains set. The vector fetch or software clear and the return of all enabled keyboard interrupt pins to logic 1 may[...]

  • Pagina 231

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 231 4. Write to the ACKE bit in the keyboard status and control register to clear any false interrupts. 5. Clear the IMASKE bit. An interrupt signal on an edg e-triggered pin can be acknowledged immediately after enabling the pin. An interrupt si gnal on an edge- and leve[...]

  • Pagina 232

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 232 Freescale Se miconduc tor ACKE — Port-E Key board Acknowledge Bit Writing a logic 1 to th is write-only bit clears the keyboard interrupt request on port-E. ACKE al ways reads as logic 0. Reset clears ACKE. IMASKE — Port-E Keyboard Interrupt Mask Bit Writing a logic 1 to th is read/write[...]

  • Pagina 233

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 233 KBEIE3–KBEIE0 — Port-E Ke yboard Interrupt Enable Bits Each of these read/write bits enables the corres ponding keyboard interrupt pin on port-D to latch inte rrupt requests. Reset clears the keyboard interrupt enable register. 1 = KBEx pin enabled as ke yboard in[...]

  • Pagina 234

    Adv ance Inf ormation M C68HC(7)08KH1 2 — Re v . 1.1 234 Freescale Se miconducto r 15.6 Port-F Keyboard Interrupt Block Diagram Figure 15-7. Port-F Keyboard Interrupt Block Diagram KBFIE0 KBFIE7 . . . DQ CK CLR V DD MODEF IMASKF KEYBOARD INTERRUPT FF VECTOR FETCH DECODER ACKF INTERNAL BUS RESET KBF3 KBF0 SYNCHRONIZER KEYFF Port-F Keyboard Interru[...]

  • Pagina 235

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 235 15.6.1 Port-F Keyboard Interrupt Functional Description Writing to the KBFIE7–K BFIE0 bits in the ke yboard interrupt enable register independently enables or disables each port F pin as a keyboard interrupt pin. Enabling a keyboard in terrupt pin in por t-F does no[...]

  • Pagina 236

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 236 Freescale Se miconduc tor • Return of all enabled keyboard interr upt pins to logic 1 — As long as any enabled keyboard interrupt pin is at logic 0, the keyboard interrupt remains set. The vector fetch or software clear and the return of all enabled keyboard interrupt pins to logic 1 may[...]

  • Pagina 237

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 237 4. Write to the ACKF bit in the keyboard status and control register to clear any false interrupts. 5. Clear the IMASKF bit. An interrupt signal on an edg e-triggered pin can be acknowledged immediately after enabling the pin. An interrupt si gnal on an edge- and leve[...]

  • Pagina 238

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 238 Freescale Se miconduc tor ACKF — Port-F Keyboard Acknowledge Bit Writing a logic 1 to th is write-only bit clears the keyboard interrupt request on port-F. A CKF always reads as logi c 0. Reset clears ACKF. IMASKF — Port-F Keyboard Inte rrupt Mask Bit Writing a logic 1 to th is read/writ[...]

  • Pagina 239

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 239 15.6.3.3 Port-F Pull-up Enable Register The pulll-up enable regi ster enables or disabl es the pull-up device for port F. PFPE7–PFPE0 — Port F pull-up enable bits These read/write bits enable/disable the pull-up device. Reset sets DDRF7–DDRF0 to ‘1’s, enabli[...]

  • Pagina 240

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 240 Freescale Se miconduc tor the break flag control regi ster (BFCR) enables software to clear status bits during the break state. To allow software to clear the key board interrupt la tch during a break interrupt, write a logic 1 to the BCFE bit. If a latch is cleared during the break state, i[...]

  • Pagina 241

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 241 Advance Information — MC68HC(7)08KH12 Section 16. Break Module (BREAK) 16.1 Contents 16.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 16.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Pagina 242

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 242 Freescale Se miconduc tor 16.3 Features Features of the break m odule include the following: • Accessible I/O Registers during the Break Interrupt • CPU-Generated Break Interrupts • Software-Generated Break Interrupts • COP Disabling during Break Interrupts 16.4 Functional Descriptio[...]

  • Pagina 243

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 243 Figure 16-1. Break Module Block Diagram IAB[15:8] IAB[7:0] 8-BIT COMPARATOR 8-BIT COMPARATOR CONTROL BREAK ADDRESS REGISTER LOW BREAK ADDRESS REGISTER HIGH IAB[15:0] BKPT (TO SIM) T ab le 16-1. Break I/O Register Summary Addr. Register Name Bit 7 6 5 4 3 2 1 Bit 0 $FE[...]

  • Pagina 244

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 244 Freescale Se miconduc tor 16.4.1 Flag Protection During Break Interrupts The system integration module (SIM) controls whether or not module status bits can be clea red during the break stat e. The BCFE bit in the break flag control register (BFCR) enabl es software to clear status bits durin[...]

  • Pagina 245

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 245 16.5.1 Break Status and Control Register (BRKSCR) The break status and control register contains break module enable and status bits. BRKE — Break Enable Bit This read/write bit enabl es breaks on break address register matches. Clear BRKE by writing a logic zero to[...]

  • Pagina 246

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 246 Freescale Se miconduc tor 16.6 Low-Power Modes The WAIT and STOP in structions put the MCU in low-power- consumption standby modes. 16.6.1 Wait Mode If enabled, the break module is active in wait mode. In the break routine, the user can subtract one from the re turn address on the stack if S[...]

  • Pagina 247

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 247 Advance Information — MC68HC(7)08KH12 Section 17. Preliminary Electrical Specifications 17.1 Contents 17.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 17.3 Absolute Maximum Ratings . . . . . . . . . . . . . . . . . [...]

  • Pagina 248

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 248 Freescale Se miconduc tor 17.3 Absolute Maximum Ratings Maximum rating s are t he extreme limits to which the MCU can be exposed without perman ently damaging it. NOTE: This device is not guar anteed to operate properly at the maximum ratings. Refer to 17.6 DC Electrical Characteristics for [...]

  • Pagina 249

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 249 17.4 Functional Operating Range 17.5 Thermal Characteristics Characteristic Symbol Value Unit Operat ing T emperatur e Range T A 0 to 85 ° C Operat ing V oltage Range V DD 4.0 to 5.5 V Characteristic Symbol Value Unit Ther mal Resistance QFP (64 Pins) θ JA 70 ° C/W[...]

  • Pagina 250

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 250 Freescale Se miconduc tor 17.6 DC Electrical Characteristics Characteristic Symbol Min Typ (2) Max Unit Output High V oltage (I LOAD = – 2.0 mA) All I/O Pins V OH V DD – 0.8 — — V Output Lo w V oltage (I LOAD = 1.6 mA) All I/O Pins V OL —— 0 . 4 V Input High V oltage All por ts, [...]

  • Pagina 251

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 251 17.7 Control Timing 17.8 Oscillator Characteristics Characteristic Symbol Min Max Unit Internal Operating F requency (2) f OP —6 M H z RST Input Pulse Width Lo w (3) t IRL 50 — ns NOTES: 1. V DD = 4.0 to 5.5 Vdc, V SS = 0 Vdc; timing shown with respect to 20% V DD[...]

  • Pagina 252

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 252 Freescale Se miconduc tor 17.9 USB DC Electrical Characteristics Characteristic Symbol Conditi ons Min Typ Max Unit Hi-Z State Data Line Leakage I LO 0V< V IN <3.3V – 10 + 10 µ A Diff erential Input Sensitivity V DI |(D+) – (D –)| 0.2 V Diff erential Common Mode Range V CM Inclu[...]

  • Pagina 253

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 253 17.10 USB Low Speed Source Electrical Characteristics Characteristic Symbol Conditions (Notes 1, 2,3 ) Min Typ Max Unit T ransition time: Rise Time F a ll Time T R T F Notes 4, 5, 8 C L = 2 00 pF C L =6 0 0 p F C L = 200 pF C L =6 0 0 p F 75 75 — — — 300 — 300[...]

  • Pagina 254

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 254 Freescale Se miconduc tor 17.11 USB High Speed Source Electrical Characteristics Characteristic Symbol Conditions (Notes 1, 2,3 ) Min Typ Max Unit T ransition time: Rise Time F a ll Time T R T F Notes 4,5, 8 C L =50pF C L =50pF 4 4 20 20 ns ns Rise/F all Time Matching T RFM T R /T F 90 110 %[...]

  • Pagina 255

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 255 17.12 HUB Repeater Electrical Characteristics Low Speed HUB Electri cal Characteristics (Root por t and downstream por ts configured as low speed) Characterist ic Symbol Conditions (Notes 1,2,3) Min Typ Max Unit HUB Differential Data Dela y TLHDD N ote 4, 7, 8 300 ns [...]

  • Pagina 256

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 256 Freescale Se miconduc tor 17.13 USB Signaling Levels 17.14 TImer Interface Module Characteristics Bus State Signaling Levels Transmit Receive Diff erential 1 D+ > V OH (min ) and D– < V OL (max) (D+) – (D–) > 200 mV Diff erential 0 D– > V OH (min) and D– < V OL (max)[...]

  • Pagina 257

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 257 17.15 Clock Generation Module Characteristics 17.15.1 CGM Component Specifications 17.15.2 CGM Electrical Specifications Characteristic Symbol Min Typ Max Unit Cr ystal ref erence frequency (1) 1. Fundamental mode crystals only f XCLK 6M H z Cr ystal load capacitance [...]

  • Pagina 258

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 258 Freescale Se miconduc tor 17.15.3 Acquisition/Lock Time Specifications Description Symbol Min Typ Max Not es Filter Capacitor Multiply F actor C FA C T — 0.0145 — F/s V Acquisition Mode Time F actor K AC Q —0 . 1 1 7 — V T rac king Mode Ti me F actor K TRK —0 . 0 2 1 — V Manual M[...]

  • Pagina 259

    MC68HC(7 )08KH12 — R e v . 1.1 Advance Information Freescale Semicon ductor 259 Advance Information — MC68HC(7)08KH12 Section 18. Mechanical Specifications 18.1 Contents 18.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 18.3 Plastic Quad Flat Pack (QFP). . . . . . . . . . . . . . . . . . . . . .[...]

  • Pagina 260

    Adv ance Inf ormation MC68HC(7)08KH1 2 — Re v . 1.1 260 Freescale Se miconduc tor 18.3 Plastic Quad Flat Pack (QFP) Figure 18-1. 64-Pin Quad-Flat-Pack (Case 840C-04) G H E C DET AIL A L A 48 S L –D– –A– –B– 0.05 (0.002) A–B S A–B M 0.20 (0.008) D S H S A–B M 0.20 (0.008) D S C B V 0.05 (0.002) D S A–B M 0.20 (0.008) D S H S A?[...]

  • Pagina 261

    [...]

  • Pagina 262

    How to Reac h Us: Home Page: www .freescale .com E-mail: suppor t@freescale.com USA/Europe or Locations Not Listed: F reescale Semiconductor T echnical Inf ormation Center , CH370 1300 N. Alma School Road Chandler , Arizona 85224 +1-800-521-6274 or +1-480-768-2130 suppor t@freescale.com Europe, Middle East, and Africa: F reescale Halbleiter Deutsch[...]