main.c

来自「飞思卡尔的PWM程序 学习交流 给初学者看的」· C语言 代码 · 共 22 行

C
22
字号
#include <hidef.h>      /* common defines and macros */
#include <mc9s12dg128.h>     /* derivative information */
#pragma LINK_INFO DERIVATIVE "mc9s12dg128b"



void main(void) {
  /* put your own code here */
  PWME=0x00;
  PWMPRCLK=0X66;
  PWMCLK=0XFF;
  PWMSCLA=0X7D;
  PWMSCLB=0X7D;
  PWMPOL=0XFF;
  PWMCAE=0X00;
  PWMPER0=0X13;
  PWMDTY0=0X09;
  PWME_PWME0=1;
  for(;;) {} /* wait forever */
  /* please make sure that you never leave this function */
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?