Electronic Components Datasheet Search
  English  ▼

X  

M68HC08 Datasheet(PDF) 77 Page - Freescale Semiconductor, Inc

Part # M68HC08
Description  Microcontrollers
PDF  188 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  FREESCALE [Freescale Semiconductor, Inc]
Direct Link  http://www.freescale.com
Logo FREESCALE - Freescale Semiconductor, Inc

M68HC08 Datasheet(HTML) 77 Page - Freescale Semiconductor, Inc

Back Button M68HC08 Datasheet HTML 73Page - Freescale Semiconductor, Inc M68HC08 Datasheet HTML 74Page - Freescale Semiconductor, Inc M68HC08 Datasheet HTML 75Page - Freescale Semiconductor, Inc M68HC08 Datasheet HTML 76Page - Freescale Semiconductor, Inc M68HC08 Datasheet HTML 77Page - Freescale Semiconductor, Inc M68HC08 Datasheet HTML 78Page - Freescale Semiconductor, Inc M68HC08 Datasheet HTML 79Page - Freescale Semiconductor, Inc M68HC08 Datasheet HTML 80Page - Freescale Semiconductor, Inc M68HC08 Datasheet HTML 81Page - Freescale Semiconductor, Inc Next Button
Zoom Inzoom in Zoom Outzoom out
 77 / 188 page
background image
Internal Clock Generator Module (ICG)
Usage Notes
MC68HC908RF2 — Rev. 4.0
Data Sheet
MOTOROLA
Internal Clock Generator Module (ICG)
77
Figure 6-7. Code Example for Switching Clock Sources
6.4.2 Enabling the Clock Monitor
Many applications require the clock monitor to determine if one of the clock sources
has become inactive, so the other can be used to recover from a potentially
dangerous situation. Using the clock monitor requires both clocks to be active
(ECGON and ICGON both set). To enable the clock monitor, both clocks also must
be stable (ECGS and ICGS both set). This is to prevent the use of the clock monitor
when a clock is first turned on and potentially unstable.
Enabling the clock monitor and clock monitor interrupts requires a flow similar to
this flow:
1.
Enable the alternate clock source
2.
Wait for both clock sources to be stable
3.
Switch to the desired clock source if necessary
4.
Enable the clock monitor
5.
Enable clock monitor interrupts
These events must happen in sequence. A short assembly code example of how
to employ this flow is shown in Figure 6-8. This code is for illustrative purposes only
and does not represent valid syntax for any particular assembler.
Figure 6-8. Code Example for Enabling the Clock Monitor
;Clock Switching Code Example
;This code switches from Internal to External clock
;Clock Monitor and interrupts are not enabled
start
lda
#$13
;Mask for CS, ECGON, ECGS
;If switching from External to Internal, mask is $0C.
loop
**
**
;Other code here, such as writing the COP, since ECGS may
;take some time to set
sta
icgcr
;Try to set CS, ECGON and clear ICGON. ICGON will not
;clear until CS is set, and CS will not set until
;ECGON and ECGS are set.
cmpa
icgcr
;Check to see if ECGS set, then CS set, then ICGON clear
bne
loop
;Keep looping until ICGON is clear.
;Clock Monitor Enabling Code Example
;This code turns on both clocks, selects the desired
; one, then turns on the Clock Monitor and Interrupts
start
lda
#$AF
;Mask for CMIE, CMON, ICGON, ICGS, ECGON, ECGS
; If Internal Clock desired, mask is $AF
; If External Clock desired, mask is $BF
; If interrupts not desired mask is $2F int; $3F ext
loop
**
**
;Other code here, such as writing the COP, since ECGS
; and ICGS may take some time to set.
sta
icgcr
;Try to set CMIE. CMIE wont set until CMON set; CMON
; won’t set until ICGON, ICGS, ECGON, ECGS set.
brset
6,ICGCR,error ;Verify CMF is not set
cmpa
icgcr
;Check if ECGS set, then CMON set, then CMIE set
bne
loop
;Keep looping until CMIE is set.
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com



Html Pages

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  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com