sim.ini

来自「2138串口通信,keil环境proteus仿真通过.」· INI 代码 · 共 47 行

INI
47
字号
/******************************************************************************/
/* 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.  */
/******************************************************************************/

LOAD .\AudioData\AUDIO.h86     // Load the Hexfile which contains Audio banks
LOAD .\Flash\Voice.axf         // Load the Application itself

/*-------------------------------------------------------------------*/
/* 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-0 */
//<o>AD01 Saw Tooth Signal - rising edge time
      twatch (131072);  /* 200000 Cycles Time-Break */
      volts += 0.1;     /* increase voltage */
    }
    volts = limit;
    while (volts >= 0.0)  {
      ad01 = volts;
//<o>AD01 Saw Tooth Signal - rising edge time
      twatch (8192);  /* 200000 Cycles Time-Break */
      volts -= 0.1;     /* decrease voltage */
    }
  }
}

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

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

⌨️ 快捷键说明

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