поискавой системы для электроныых деталей
  Russian  ▼
ALLDATASHEETRU.COM

X  

64GA106 датащи(PDF) 121 Page - Microchip Technology

номер детали 64GA106
подробное описание детали  64/80/100-Pin, 16-Bit, General Purpose Flash Microcontrollers
PDF  330 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  MICROCHIP [Microchip Technology]
домашняя страница  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

64GA106 датащи(HTML) 121 Page - Microchip Technology

Back Button 64GA106 Datasheet HTML 117Page - Microchip Technology 64GA106 Datasheet HTML 118Page - Microchip Technology 64GA106 Datasheet HTML 119Page - Microchip Technology 64GA106 Datasheet HTML 120Page - Microchip Technology 64GA106 Datasheet HTML 121Page - Microchip Technology 64GA106 Datasheet HTML 122Page - Microchip Technology 64GA106 Datasheet HTML 123Page - Microchip Technology 64GA106 Datasheet HTML 124Page - Microchip Technology 64GA106 Datasheet HTML 125Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 121 / 330 page
background image
 2010 Microchip Technology Inc.
DS39905E-page 121
PIC24FJ256GA110 FAMILY
8.4.2
OSCILLATOR SWITCHING
SEQUENCE
At a minimum, performing a clock switch requires this
basic sequence:
1.
If
desired,
read
the
COSCx
bits
(OSCCON<14:12>) to determine the current
oscillator source.
2.
Perform the unlock sequence to allow a write to
the OSCCON register high byte.
3.
Write the appropriate value to the NOSCx bits
(OSCCON<10:8>) for the new oscillator source.
4.
Perform the unlock sequence to allow a write to
the OSCCON register low byte.
5.
Set the OSWEN bit to initiate the oscillator
switch.
Once the basic sequence is completed, the system
clock hardware responds automatically as follows:
1.
The clock switching hardware compares the
COSCx bits with the new value of the NOSCx
bits. If they are the same, then the clock switch
is a redundant operation. In this case, the
OSWEN bit is cleared automatically and the
clock switch is aborted.
2.
If a valid clock switch has been initiated, the
LOCK (OSCCON<5>) and CF (OSCCON<3>)
bits are cleared.
3.
The new oscillator is turned on by the hardware
if it is not currently running. If a crystal oscillator
must be turned on, the hardware will wait until
the OST expires. If the new source is using the
PLL, then the hardware waits until a PLL lock is
detected (LOCK = 1).
4.
The hardware waits for 10 clock cycles from the
new clock source and then performs the clock
switch.
5.
The hardware clears the OSWEN bit to indicate a
successful clock transition. In addition, the
NOSCx bit values are transferred to the COSCx
bits.
6.
The old clock source is turned off at this time,
with the exception of LPRC (if WDT or FSCM is
enabled) or SOSC (if SOSCEN remains set).
A recommended code sequence for a clock switch
includes the following:
1.
Disable interrupts during the OSCCON register
unlock and write sequence.
2.
Execute the unlock sequence for the OSCCON
high byte by writing 78h and 9Ah to
OSCCON<15:8>
in
two
back-to-back
instructions.
3.
Write new oscillator source to the NOSCx bits in
the instruction immediately following the unlock
sequence.
4.
Execute the unlock sequence for the OSCCON
low
byte
by
writing
46h
and
57h
to
OSCCON<7:0> in two back-to-back instructions.
5.
Set the OSWEN bit in the instruction immediately
following the unlock sequence.
6.
Continue to execute code that is not
clock-sensitive (optional).
7.
Invoke an appropriate amount of software delay
(cycle counting) to allow the selected oscillator
and/or PLL to start and stabilize.
8.
Check to see if OSWEN is ‘0’. If it is, the switch
was successful. If OSWEN is still set, then check
the LOCK bit to determine the cause of failure.
The core sequence for unlocking the OSCCON register
and initiating a clock switch is shown in Example 8-1.
EXAMPLE 8-1:
BASIC CODE SEQUENCE
FOR CLOCK SWITCHING
EXAMPLE 8-2:
BASIC CODE SEQUENCE
FOR CLOCK SWITCHING
Note 1:
The processor will continue to execute
code throughout the clock switching
sequence. Timing-sensitive code should
not be executed during this time.
2:
Direct clock switches between any
Primary Oscillator mode with PLL and
FRCPLL mode are not permitted. This
applies to clock switches in either direc-
tion. In these instances, the application
must switch to FRC mode as a transition
clock source between the two PLL
modes.
;Place the new oscillator selection in W0
;OSCCONH (high byte) Unlock Sequence
MOV
#OSCCONH, w1
MOV
#0x78, w2
MOV
#0x9A, w3
MOV.b
w2, [w1]
MOV.b
w3, [w1]
;Set new oscillator selection
MOV.b
WREG, OSCCONH
;OSCCONL (low byte) unlock sequence
MOV
#OSCCONL, w1
MOV
#0x46, w2
MOV
#0x57, w3
MOV.b
w2, [w1]
MOV.b
w3, [w1]
;Start oscillator switch operation
BSET
OSCCON,#0
//Write new "value" to OSCCONH to
//
set the new oscillator selection
__builtin_write_OSCCONH(value);
//Set the OSWEN bit to start the oscillator
//
switch operation
__builtin_write_OSCCONL(OSCCON | 0x01);



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


датащи скачать

Go To PDF Page


ссылки URL



Вашему бизинису помогли Аллдатащит?  [ DONATE ] 

Что такое Аллдатащит   |   реклама   |   контакт   |   Конфиденциальность   |   Ссылка на техническое описание    |   обмен ссыками   |   поиск по производителю
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