' ********************************************************************** ' ** Program name: S1DEB4.BAS - Version : 1.1 - 02 June 1999 ** ' ** Compiler : BASCOM LT, (IDE V.1.20, LIB V.1.27) ** ' ** Board : GPC(r) 554 ** ' ** 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 ** ' ** ** ' ** Written by: Graziano Gaiba ** ' ********************************************************************** ' ' This program shows the status of jumper 2 on the lines of port 4. If jumper ' 2 is connected then all the red LEDs will be ON they will be OFF otherwise. ' To achieve the visualization of the lines, you should connect the CN5 ' connector of GPC(r) 554 board to the CN15 connector of DEB(r) 01 board by ' a 20 to 26-pin adapter flat cable. ' ATTENTION! To address correctly the 80552 I/O lines you shuold select the ' 80552 register file. To do this, select tab Misc from the Options/Compiler ' menu, click in the Register file text box then select the file 80552.DAT. ' '************************ Compiler Directives ******************************* ' $romstart = &H8050 ' start address of machine code $ramstart = &HD000 ' start address of data area $ramsize = &H2800 ' 10k of data area $crystal = 22118400 ' clock of microcontroller $baud = 19200 ' RS-232 baud rate $large ' 16 bit addressing mode ' '************************** Constant declarations **************************** ' Dim Rundebug As Const &HFFFD ' run/debug register ' '************************** Variable declarations **************************** ' Dim J2 As Byte ' Stores the status of jumper 2 ' '***************************** Main Program ********************************** ' Waitms 1 ' Delay for signals settling Print " Demonstration program 4 for section 1 of DEB(r) 01 board" Print : Print " Shows the status of jumper 2 on the lines of port 4. All red LEDs will be" Print " ON if jumper 2 is connected, they will be OFF otherwise." Print : Print " Running..." Print Do J2 = Inp(rundebug) ' Reads the run/debug register J2 = J2 And &B10000000 ' Extracts the status of jumper 2 If J2 = &B10000000 Then ' If jumper 2 is not connected P4 = 255 ' Turn OFF red LEDs Else P4 = 0 ' Turn ON red LEDs End If Loop End ' '*************************** End of Main program ***************************** '