📄 simulator.ini
字号:
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -