📄 main.c
字号:
#include <hidef.h> /* common defines and macros */
#include <mc9s12dg128.h> /* derivative information */
#pragma LINK_INFO DERIVATIVE "mc9s12dg128b"
unsigned char Itimer10ms;
unsigned char Utimer10ms;
unsigned char counter ;
/*****************************************************************************
*函数名: RTIInit()
*入口参数:无
*出口参数:无
*功能: 初始化系统时钟,经PLL倍频后,CPU时钟频率为48MHz,总线时钟频率是24MHz,
*******************************************************************************/
void RTIInit(void)
{
REFDV = 0x01; //24M bus clock
SYNR = 0x02; //48M system clock
while(!CRGFLG_LOCK);
CLKSEL = 0x80;
RTICTL = 0x64; //RTR[6:4]=110,RTR[3:0]=0100,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -