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

📄 measure.ini

📁 keilc pic的版本 才搞到的 希望对大家有帮助
💻 INI
字号:

/*--------------------------------------------*/
/* MyStatus shows analog and other values ... */
/*--------------------------------------------*/

FUNC void MyStatus (void)  {
  printf ("=============================\n");
  printf (" Analog-Input-0:  %f\n", ain0);
  printf (" Analog-Input-1:  %f\n", ain1);
  printf (" Analog-Input-2:  %f\n", ain2);
  printf (" Analog-Input-3:  %f\n", ain3);
  printf (" Registers (CP):  %04X\n", CP);
  printf (" Program Counter: %06lXH\n", $);
  printf ("=============================\n");
}

/*-------------------------------------------*/
/* Function MyRegs() shows Registers R0...R7 */
/*-------------------------------------------*/

FUNC void MyRegs (void)  {
  printf ("---------- MyRegs() ----------\n");
  printf (" R4   R8   R9   R10  R11  R12\n");
  printf (" %04X %04X %04X %04X %04X %04X\n",
            R4,  R8,  R9,  R10, R11, R12);
  printf ("------------------------------\n");
}

/*-----------------------------------------------*/
/* Analog0() simulates analog input values given */
/*  to channel-0 (AIN0) of the C166 derivative   */
/*-----------------------------------------------*/
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 (200000);  /* 200000 Cycles Time-Break */
      volts += 0.1;     /* increase voltage */
    }
    volts = limit;
    while (volts >= 0.0)  {
      ain0 = volts;
      twatch (200000);  /* 200000 Cycles Time-Break */
      volts -= 0.1;     /* decrease voltage */
    }
  }
}


⌨️ 快捷键说明

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