#pragma num_alias_table_entries 14
IO_1 pulsewidth clock(7) io_on_off;
IO_2 output bit io_direct;
IO_4 input bit ioButton1;
IO_5 input bit ioButton2;
IO_6 input bit ioButton3;
network input SNVT_switch nviDirect;
network input SNVT_switch nviOn_Off;
network output SNVT_switch nvoValue01;
network output SNVT_switch nvoValue02;
network output SNVT_switch nvoValue03;
when(reset)
{
io_out(io_on_off, 0);
io_out(io_direct, 0);
}
when(nv_update_occurs(nviOn_Off))
{
io_out(io_on_off, (nviOn_Off.value));
if(nviOn_Off.value==0)
{
io_out(io_direct, 0);
nvoValue02.value=0;
nvoValue02.state=0;
}
}
when(nv_update_occurs(nviDirect))
{
if(nviOn_Off.value==0)
{
nvoValue02.value=0;
nvoValue02.state=0;
}
else
{
io_out(io_direct, (nviDirect.value && nviDirect.state));
}
}
when(io_changes(ioButton1) to 0)
{
nvoValue01.state = !nvoValue01.state;
nvoValue01.value = nvoValue01.state ? (short) 200:0;
}
when(io_changes(ioButton2) to 0)
{
nvoValue02.state = !nvoValue02.state;
nvoValue02.value = nvoValue02.state ? (short) 200:0;
}
               (
geocities.com/hk/cloud_fan_school/Program)                   (
geocities.com/hk/cloud_fan_school)                   (
geocities.com/hk)