' ********************************************************************** ' ** Program name: S1DEB4.BAS - Version : 1.1 - 03 June 1999 ** ' ** Compiler : BASCOM LT, (IDE V.1.20, LIB V.1.27) ** ' ** Board : GPC(r) 324 + ETI 324 ** ' ** 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 1 on the lines of port A. ' To address correctly the ETI 324 board on ABACO(r) I/O Bus, you should ' configure the board to match the hex 80 address, to do this switch to OFF ' the switches from 1 to 4, switch to ON switch 5. ' To achieve the visualization of the lines, you should connect the CN3 ' connector of GPC(r) 324 board to the CN15 connector of DEB(r) 01 board by ' a 20-pin flat cable. ' '************************ 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 Pda As Const &HFF80 ' port A data register Dim Pdb As Const &HFF81 ' port B data register Dim Pdc As Const &HFF82 ' port C data register Dim Cnt As Const &HFF83 ' control register Dim Rundebug As Const &HFFF9 ' run/debug register ' '************************** Variable declarations **************************** ' Dim J1 As Byte ' Stores the status of dip-switches ' '***************************** 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 1 on the lines of port A." Print : Print " Running..." Print Out Cnt , &B10001011 ' Configures port A for output, ' port B and C fot input Do J1 = Inp(rundebug) ' Reads the run/debug register J1 = J1 And &B10000000 ' Reads status of jumper 1 If J1 = 0 Then ' If jumper 1 connected Out Pda , 0 ' All red LEDs on Else Out Pda , &HFF ' All red LEDs off End If Loop End ' '*************************** End of Main program ***************************** '