Quantcast
Channel: Microchip Taiwan :: 論壇
Viewing full articles (4647 articles)
Browse article index
↧

Re: pic24fj256gb110 c30 bootloader configuration bit [by GodBlessU]

$
0
0
16-bit PIC24/dsPIC® Device::pic24fj256gb110 c30 bootloader configuration bit
Hello,

PIC24FJ256GB110的HID Bootloader範例程式應該是使用外振8MHz, 來產生96MHz PLL / 2 = 48MHz提供給USB module使用.

但您說想使用外振直接進來,感覺比較省電一點 ? -->這個描述讓我confuse了.


如果在您的應用程式想要切換OSC的話, 以下是建議的步驟
1. #pragma config IESO = OFF
// Internal External Switch Over Mode (IESO mode (Two-speed start-up)disabled)

2. 在程式一開始執行時切換至您需要的Clock source w/ PLL

// CF no clock failure; NOSC FRCPLL; CLKLOCK unlocked; OSWEN Switch is Complete;
__builtin_write_OSCCONH((uint8_t) ((0x100 >> _OSCCON_NOSC_POSITION) & 0x00FF));
__builtin_write_OSCCONL((uint8_t) ((0x100 | _OSCCON_OSWEN_MASK) & 0xFF));
// Wait for Clock switch to occur
while (OSCCONbits.OSWEN != 0);
↧

Viewing full articles (4647 articles)
Browse article index

Latest Images

Trending Articles



Latest Images