REM $INCLUDE: '7188.bi' REM $INCLUDE: 'printf.bas' dim i,j,c,temp as integer ChangeLine$=CHR$(10)+CHR$(13) InitLib ' driver initial Init5DigitLed ' 5-digit LED initial temp = InstallCom(4, 57600, 8, 0, 1) i=0 LedOn ' turn LED on for j=1 to 5 temp=Show5DigitLed(j,1) ' show 11111 next j temp=print4(ChangeLine$+"Press any Key to Enable WDT") WaitKey: c=IsCom(4) if c=0 then goto Waitkey c=ReadCom(4) EnableWDT temp=print4(ChangeLine$+"Press any Key to Stop refresh WDT") for i=0 to 20 step 0 RefreshWDT c=IsCom(4) if c<> 0 then ' check user keyboard c=ReadCom(4) ' get user's key-in exit for end if Delay(100) 'delay 0.1Sec next i temp=print4(ChangeLine$+"Stop to refresh WDT") for i=1 to 20 temp=print4(ChangeLine$+"i="+STR$(i)) c=IsCom(4) if (c<>0) then DisableWDT c=ReadCom(4) exit for end if Delay(100) next i temp=RestoreCom(4)