⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pwm.ini

📁 LPC 2300 串口开发;LPC2300是NXP 公司推出的最新的嵌入式芯片;异步串口通讯功能很强;本人写了个测试案例;供大家参考;
💻 INI
字号:
/***********************************************************************/
/*  This file is part of the ARM Compiler package                      */
/*  Copyright KEIL ELEKTRONIK GmbH 1992-2004                           */
/***********************************************************************/
/*                                                                     */
/*  PWM.INI:  PWM Debug Initialization File                            */
/*                                                                     */
/***********************************************************************/

/*------------------------------------------------------------------*/
/* Analog0() simulates analog input values given to channel-0 (AIN0) */
/*------------------------------------------------------------------*/
Signal void analog0 (float limit)  {
  float volts;

  printf ("Analog0 (%f) entered.\n", limit);
  while (1)  {          /* forever */
    volts = 0;
    while (volts <= limit)  {
      AIN0 = volts;      /* analog input-0 */
      twatch (10000);    /* 10000 Cycles Time-Break */
      volts += 0.1;     /* increase voltage */
    }
    volts = limit;
    while (volts >= 0.0)  {
      AIN0 = volts;
      twatch (10000);  /* 10000 Cycles Time-Break */
      volts -= 0.1;     /* decrease voltage */
    }
  }
}

analog0 (3.3);    // Start Analog Signal

⌨️ 快捷键说明

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