sim.ini

来自「完整的wav文件播放程序采用lpc2148芯片」· INI 代码 · 共 40 行

INI
40
字号

//*** <<< Use Configuration Wizard in Context Menu >>> *** 


LOAD .\AudioData\AUDIO.h86     // Load the Hexfile which contains the audio banks
LOAD .\obj\Voice               // Load the Application itself

/*-----------------------------------------------*/
/* Analog0() simulates analog input values given */
/*  to channel-0 (AIN0) of the C166 derivative   */
/*-----------------------------------------------*/
Signal void analog1 (float limit)  {
  float volts;

  printf ("Analog1 (%f) entered.\n", limit);
  while (1)  {          /* forever */
    volts = 0;
    while (volts <= limit)  {
      ain1 = volts;     /* analog input-0 */
//<o>AIN1 Saw Tooth Signal - rising edge time
      twatch (131072);  /* 200000 Cycles Time-Break */
      volts += 0.1;     /* increase voltage */
    }
    volts = limit;
    while (volts >= 0.0)  {
      ain1 = volts;
//<o>AIN1 Saw Tooth Signal - rising edge time
      twatch (8192);  /* 200000 Cycles Time-Break */
      volts -= 0.1;     /* decrease voltage */
    }
  }
}

FUNC void Setup (void) {
  ain1 = 3.3;
}

setup();
g,main                         // Go til main

⌨️ 快捷键说明

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