home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1996 September
/
pcwk_09_96.iso
/
demo
/
wgelectr
/
pk51demo
/
files.2
/
EXAMPLES
/
TRAFFIC
/
TRAFFIC.INI
< prev
next >
Wrap
Text File
|
1993-10-07
|
551b
|
22 lines
load traffic /* load application program */
include ds51.ini /* process standard DS51.INI file */
/* define watch variables */
ws red
ws yellow
ws green
ws stop
ws walk
/* set P1.5 to zero: Key Input */
PORT1 &= ~0x20;
/* define a debug function for the pedestrian push button */
signal void button (void) {
PORT1 |= 0x20; /* set Port1.5 */
twatch (50000); /* wait 50 ms */
PORT1 &= ~0x20; /* reset Port1.5 */
}
/* define F4 key as call to button () */
set F4="button ()"