debugger.ini

来自「keil7.09DEMO.rar」· INI 代码 · 共 32 行

INI
32
字号
/*-----------------------------------------------*/
/* Analog0() simulates analog input values given */
/*  to channel-0 (AIN0) of the MSC1210 device    */
/*-----------------------------------------------*/
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 */
      swatch (2.0);     /* 1.0 Sec */
      volts += 0.1;     /* increase voltage */
    }
    volts = limit;
    while (volts >= 0.0)  {
      ain0 = volts;
      swatch (2.0);     /* 1.0 Sec */
      volts -= 0.1;     /* decrease voltage */
    }
  }
}


// start volatage ramp on AIN0-1
analog0 (1.5)
AIN1=0.0



⌨️ 快捷键说明

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