?? main.c
字號:
/************************************************************/
/* PROJECT NAME: PLL */
/* Project: LPC2100 Training course */
/* Engineer: T Martin tmartin@hitex.co.uk */
/* Filename: main.c */
/* Language: C */
/* Compiler: Keil ARM V2.00b */
/* Assembler: */
/* */
/************************************************************/
/* COPYRIGHT: Hitex UK Ltd 2005 */
/* LICENSE: THIS VERSION CREATED FOR FREE DISTRIBUTION */
/************************************************************/
/* Function: */
/* */
/* Example Phase locked loop configuration for LPC2100 */
/* */
/* Demonstrates setup of PLL and VPB divider */
/* */
/* Oscillator frequency 12.000 Mhz */
/* Target board keil MCB21000 */
/************************************************************/
#include <LPC210x.H>
void init_PLL(void);
int main(void)
{
init_PLL(); // Configure the PLL and VPB divider
//This is normally done in the startup code
//but for this example the startup config is disabled
while(1) //main loop
{
; //Idle
}
}
void init_PLL(void)
{
PLLCFG = ; // Set multiplier and divider of PLL to give 60.00 Mhz
PLLCON = ; // Enable the PLL
PLLFEED = ; // Update PLL registers with feed sequence
PLLFEED = ;
while (!(PLLSTAT & )) // test Lock bit
{
;
}
PLLCON = ; // Connect the PLL
PLLFEED = ; //Update PLL registers
PLLFEED = ;
VPBDIV = ; //Set the VLSI peripheral bus to 30.000Mhz
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -