' ********************************************************************** ' ** Program: S1DEB6 - Version : 1.1 - 1 March 1999 ** ' ** Compilator : BASCOM LT, (IDE V.1.20, LIB V.1.27) ** ' ** Card : GPC(r) F2 ** ' ** Firm: grifo(r) ITALIAN TECHNOLOGY ** ' ** Via Dell' Artigiano 8/6 40016 San Giorgio di Piano (BO) ** ' ** Tel.+39 051 892 052 Fax +39 051 893 661 ** ' ** http://www.grifo.com http://www.grifo.it ** ' ** sales@grifo.it tech@grifo.it grifo@grifo.it ** ' ** ** ' ** Developed by: Enea Tassinari ** ' ********************************************************************** ' ' This program allows to display when the led is on. ' In order to make an easier visualization of the status lines, it is ' necessary to get a 20 pins flat cable for connecting GPC(r)F2 CN2 ' connector to TIO 16 CN1 connector, or DEB 01 CN15 connector. ' '*********************************************************************** ' '****************** Compiler directive ********************************* ' $romstart = &H8050 ' address start of the code machine $ramstart = &HD000 ' address start of the data area $ramsize = &H2800 ' put to 10K the data area $crystal = 11059200 ' clock frequency of the microcontroller $baud = 9600 ' RS-232 comunication speed $large ' address to 16 bit ' '****************** Constant declaration ******************************* ' Dim Cnt As Const &HFA03 ' register of command end control of the 82c55 Dim Pda As Const &HFA00 ' data register of A port Dim Pdb As Const &HFA01 ' data register of B port Dim Pdc As Const &HFA02 ' data register of C port ' '****************** Dichiarazione delle variabili ********************** ' Dim Led_pda As Integer ' lighting first led of the A port Dim Led_pdc As Integer ' lighting first led of C the port Dim Val_pda As Integer ' variable for work on A port in negative logic Dim Val_pdc As Integer ' variable for work on C port in negative logic Dim Tasto As Integer ' '************************* Program main ******************************** ' Main: Waitms 1 ' delay for signals arrangement Out Cnt , 130 ' program 0 mode, A,C port=output and B port=input Out Pda , 255 ' led off (A port) in the start time Out Pdc , 255 ' led off (C port) in the start time Print Print " VISUALIZATION OF THE LED RUN IN PROGRESS " Print " Reset the card for exit " Print Print Do Led_pdc = 1 ' prepare the lighting of the first led of the C port Led_pda = 1 ' prepare the lighting of the first led of the A port Do Val_pda = 255 - Led_pda ' the card work in negative logic Out Pda , Val_pda ' lighting the first led of the A port Waitms 100 ' delay of 100 ms Rotate Led_pda , Left ' shift, of 1 position, in the left direction, the contents of val_pda Loop Until Led_pda = 256 Do Out Pda , 255 ' Lod of the A port = OFF Val_pdc = 255 - Led_pdc ' the card work in negative logic Out Pdc , Val_pdc ' lighting the first led of C port Waitms 100 ' delay of 100 ms Rotate Led_pdc , Left ' shift, of 1 position, in the left direction, the contents of val_pdc Loop Until Led_pdc = 256 Out Pdc , 255 ' led of the C port = OFF Waitms 100 ' delay of 100 ms Print Chr(13); Tasto = Inkey Loop Until Tasto > 0 ' the program stop if you press one key > 0 (ASCII code) End End End ' '************************ End main program ***************************** '