'---------------------------------------------------------------------------------------- ' Name: SET_P3_HI_IMPED.TIG ' Type: Tiger-BASIC(tm) Source-Code ' Purpose: This example program shows how to set Tiger I/O-pins L33...L36 ' alternatively ' a) as INPUT to Hi-Impedance, or ' b) as INPUT with Pull-UP resistor to Vcc. ' ' (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 short example program was compiled with TIGER-BASIC 5.01 to run with ' BASIC-Tigers of the "ECONO"-line for ' ' (a) increasing the input impedance of the analog inputs AN0...AN3 ' which are double used with digital I/O-pins L33...L36. ' (b) getting used when a digital or analog input is intended to be ' "high" if pin is open. In such a case check ESD/EMI requirements ' and circuit needs of your application. ' ' When Port L3 pins are used as digital outputs, none of the above mentioned ' is relevant. '---------------------------------------------------------------------------------------- USER_VAR_STRICT ' <- recommended ' check for strict variable declaration #INCLUDE DEFINE_A.INC ' <- recommended ' general defines USER_EPORT ACT, NOACTIVE ' <- recommended ' disable eport system (for Econo-Tigers) TASK MAIN ' WHILE 6=6 ' <----------------------- endless loop -----------------------> DIR_PORT 3,00000000B ' Set L33...L37 to OUTPUT OUT 3,0FFH,0H ' Set OUT-data = 0 = Pull-up resistor "OFF" when pins are INPUTs DIR_PORT 3,01111111B ' Set L33...L36 to INPUT = AN0...AN3 => analog IN (Econo-Tigers) WAIT_DURATION 1500 ' (a) <--- see comments above DIR_PORT 3,00000000B ' Set L33...L37 to OUTPUT OUT 3,07FH,0FFH ' Set OUT-Data = 1 = Pull-up resistor "ON" when pins are INPUTs DIR_PORT 3,01111111B ' Set L33...L36 to INPUT = AN0...AN3 => analog IN (Econo-Tigers) WAIT_DURATION 1500 ' (b) <--- see comments above ENDWHILE ' END '