'---------------------------------------------------------------------------------------- ' Name: ASK_PC_MODE_PIN_V001.TIG ' Type: Tiger-BASIC(tm) Source Code ' Purpose: Check the input of PC/Run mode pin (L41) in BASIC-Tiger, TINY-Tiger ' & Econo-Tiger ' ' (C) - Copyright Wilke Technology, P.O.Box 1727, D-52018 Aachen, Germany '---------------------------------------------------------------------------------------- ' ' Thank you for using BASIC Tigers in your products. If you have questions, ideas ' or special needs, please contact your next distributor or the Tiger support team ' and visit our web site: ' ' Wilke Technology GmbH ' The Tiger Support Team ' P.O.Box 1727, D-52018 Aachen, Germany ' Krefelder Str. 147, D-52070 Aachen, Germany ' ' email: support@wilke-technology.com (english) ' email: support@wilke.de (german) ' Phone: +49 (241) 918 900 Mo to Fr, 7:00 to 16:00 (GMT) ' Fax: +49 (241) 918 9068 ' ' New information, new drivers and free downloads see: ' ' www.wilke-technology.com (english) ' www.wilke.de (german) ' ' Sincerely, ' ' Your Tiger Support Team ' '---------------------------------------------------------------------------------------- ' ' This new system variable (81) allows to check on the PC/Run mode pin while a program ' is executed. ' ' Note: Checking the input level on PC/Run mode pin does N O T tell a program ' if it is executed in PC-Mode or RUN-Mode. ' ' The PC mode/Run mode selection on Pin L41 is only sampled after reset during ' boot phase. ' ' Later, while executing in either mode, this pin is N O T re-sampled by the system. ' ' To find out in which mode a program is running, use the system variable: ' ' SYSVARN (67, dummy) ' ' Program execution PC mode: value 1 is returned ' Program execution RUN mode: value 0 is returned (This does NOT reflect the signal ' applied to the PC-Mode pin!) ' ' Note: PC-Mode pin = 0 (low) at boot time ===> PC mode (debugging) ' = 1 (high) at boot time ===> RUN mode. Full speed, no debugging, ' no program stopps ' '---------------------------------------------------------------------------------------- TASK Main ' begin task MAIN INSTALL_DEVICE #1, "LCD1.TDD" ' install LCD driver LOOP 999999999 ' <----------------- just many loops -------------------> IF SYSVARN(67,0) = 0 THEN ' get execution mode: 0=PC mode, 1=Run mode PRINT #1, "<1>RUN-Mode "; ' output mode on LCD ELSE ' PRINT #1, "<1>PC-Mode "; ' output mode on LCD ENDIF ' IF SYSVARN(81,0) = 0 THEN ' get input level of L41 PRINT #1,"switch low " ' output level on LCD ELSE ' PRINT #1,"switch high" ' output level on LCD ENDIF ' WAIT_DURATION 300 ' wait 300 ms ENDLOOP ' END '