sim.ini

来自「a simple keil c program」· INI 代码 · 共 36 行

INI
36
字号
/******************************************************************************/
/* SIM.INI: Simulator Initialization File                                     */
/******************************************************************************/
// <<< Use Configuration Wizard in Context Menu >>>                           // 
/******************************************************************************/
/* This file is part of the uVision/ARM development tools.                    */
/* Copyright (c) 2005-2006 Keil Software. All rights reserved.                */
/* This software may only be used under the terms of a valid, current,        */
/* end user licence from KEIL for a compatible version of KEIL software       */
/* development tools. Nothing else gives you the right to use this software.  */
/******************************************************************************/

/*-------------------------------------------------------------------*/
/* Analog1() simulates analog input values given to channel-1 (AD01) */
/*-------------------------------------------------------------------*/
Signal void analog1 (float limit)  {
  float volts;

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

⌨️ 快捷键说明

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