00005 REM ****************************************************************** 00015 REM * Programa S1DEB7 Rel.1.0 per l'interprete NSB8 e BSZIC * 00025 REM * Utilizzando le schede GPC-81 e DEB-01 * 00035 REM * GRIFO(R) Via Dante, 1 40016 S.Giorgio di Piano (BO) * 00045 REM * Tel.(051)89.20.52 Fax.(051)89.36.61 * 00055 REM * * 00065 REM * Fa scorrere l'accensione di un LED in una direzione o nella * 00075 REM * altra, a seconda della posizione dello swich 1 del dip-swich * 00080 REM * * 00085 REM * By Pedrielli Adriano. 05 GIUGNO 1991 * 00095 REM ****************************************************************** 00105 REM 00115 REM Per il collegamento fra le due schede e'necessario un flat 00125 REM inserito nel connetore CN1 da 20 vie della GPC81 e nel connettore 00135 REM CN15 da 20 vie della DEB01 00145 REM 00155 REM *************************** Main program ************************ 00165 REM 00195 REM ********** Settaggio port A e C in out 00205 OUT 7,128 00215 REM ********** Spegnimento LED 00225 OUT 4,255\OUT 6,255 00235 REM ********** Leggo dip-swich 00245 A=INP(31) 00255 REM ********** Controllo dip-swich 00265 B=A-(INT(A/2)*2) \IF B=0 THEN GOTO 515 00275 REM ********** Loop incremento port A 00285 FOR I=0 TO 7 00295 REM ********** Ritardo 00305 FOR X=0 TO 100 \NEXT X 00315 REM ********** Accensione port A 00325 OUT 4,(255-2^I) 00335 NEXT I 00345 REM ********** Ritardo 00355 FOR X=0 TO 100 \NEXT X 00365 REM ********** Spegnimento LED port A 00375 OUT 4,255 00385 REM ********** Loop incremento port C 00395 FOR I=0 TO 7 00405 REM ********** Ritardo 00415 FOR X=0 TO 100 \NEXT X 00425 REM ********** Accensione LED port C 00435 OUT 6,(255-2^I) 00445 NEXT I 00455 REM ********** Ritardo 00465 FOR X=0 TO 100 \NEXT X 00475 REM ********** Spegnimento LED port C 00485 OUT 6,255 00495 GOTO 245 00505 REM ************* Acensione da destra verso sinistra ***************** 00515 REM ********** Loop decremento port C 00525 FOR I=7 TO 0 STEP -1 00535 REM ********** Ritardo 00545 FOR X=0 TO 100 \NEXT X 00555 OUT 6,(255-2^I) 00565 NEXT I 00575 REM ********** Ritardo 00585 FOR X=0 TO 100 \NEXT X 00595 REM ********** Spegnimento LED port C 00605 OUT 6,255 00615 REM ********** Loop decremento port A 00625 FOR I=7 TO 0 STEP -1 00635 REM ********** Ritardo 00645 FOR X=0 TO 100 \NEXT X 00655 OUT 4,(255-2^I) 00665 NEXT I 00675 REM ********** Ritardo 00685 FOR X=0 TO 100 \NEXT X 00695 REM ********** Spegnimento LED port A 00705 OUT 4,255 00715 GOTO 245