-
#include
/*
common defines and macros */
#include
/* derivative
information */
#pragma LINK_INFO
DERIV
ATIVE
volatile uint speed_back=0,temp=0;
void
delay_ms(uint ms)
{
volatile uint x=0;
while(ms--)
{
for(x=2800;x>0;x--)
{
_asm(nop);
_asm(nop);
_asm(nop);
_asm(nop);
_asm(nop);
_asm(nop);
}
}
}
//
注意外接
16M
晶体。
//
飞思卡尔推荐配置,主频道
50MHZ
,速度更快!<
/p>
void Init_PLL(void)
{
CLKSEL = 0X00;
//disengage PLL to system
PLLCTL_PLLON = 1;
//turn on PLL
SYNR = (0xc0|0x18);
//SYDIV=0X18=24
REFDV = (0x40|0x07); //REFDIV=0X07=7
POSTDIV = 0x00;
p>
//pllclock=2*osc*(1+SYDIV)/(1+REFDIV)=100
MHz;
_asm(nop);
//BUS CLOCK=50M
_asm(nop);
_asm(nop);
_asm(nop);
_asm(nop);
_asm(nop);
_asm(nop);
_asm(nop);
_asm(nop);
-
-
-
-
-
-
-
-
-
上一篇:计算机网络英文题库(附答案)chapter2
下一篇:英文爱情寄语唯美简短