keil c51-

来自「单片机开发软件Keil」· 代码 · 共 15 行

TXT
15
字号

PORT1 &= ~0x20;            /* set P1.5 to zero: Key Input */

/* define a debug function for the pedestrian push button */
signal void push_key (void)  {
  PORT1 |=  0x20;          /* set P3.0       */
  twatch (`Clock*0.05);    /* wait 50 msec   */
  PORT1 &= ~0x20;          /* reset P3.0     */
}

/* define a toolbar button to call push_key */
define button "Push for Walk", "push_key ()"

RADIX=10 // decimal output in watch window

⌨️ 快捷键说明

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