simulator.ini

来自「RTX51 example use. Inside are example on」· INI 代码 · 共 36 行

INI
36
字号
// Disable Watchdog with pin PE_SWD
PE_SWD = 0
// perform CPU reset: uses value at PE_SWD
reset
// Create signal functions for buttons
signal void pb1 (void) {
  P1 &= ~0x20;
  twatch (30000);
  P1 |= 0x20;
}
signal void pb2 (void) {
  P4 &= ~0x20;
  twatch (30000);
  P4 |= 0x20;
}
// Create signal functions for car detectors
signal void cd1 (void) {
  P3 |= 0x04;
  twatch (10);
  P3 &= ~0x04;
}
signal void cd2 (void) {
  P3 |= 0x08;
  twatch (10);
  P3 &= ~0x08;
}
// Assign toolbox buttons to signal functions
define button "Pedestrian Button 1", "pb1()"
define button "Pedestrian Button 2", "pb2()"
define button "Car Detector 1", "cd1()"
define button "Car Detector 2", "cd2()"
// Include RTX-51 debug functions
include DBG_RTX.inc
// execute program til main
g, main

⌨️ 快捷键说明

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