$regfile = "m88def.dat"
$crystal = 8000000

'Config Lcd stelt de Lcd poort pinnen in
Config Lcdpin = Pin , Db4 = Portb.2 , Db5 = Portb.3 , Db6 = Portb.4 , Db7 = Portb.5 , E = Portb.1 , Rs = Portb.0
Config Lcdbus = 4                                           'Selecteer 4 bits mode
Config Lcd = 16 * 2                                         '16*2 type LCD display
'U kunt uw eigen LCD karakters maken met het Deflcdchar commando
'Gebruik hiervoor de Bascom LCD Designer, Tools -> LCD Designer menu
Cursor Off Noblink                                          'Geen cursor
                                       'Geen cursor

Cls                                                         'Dit maakt het scherm leeg

 Do
 Gosub Startsignaal
 Gosub Command
 Gosub Knipperled
 Gosub Relais1
 Gosub Relais2
 Gosub Relaisr3
 Gosub Groenknipperled
 Gosub Relaisr4
 Gosub Groenknipperled2
 Gosub Bascom2
 Loop



 Startsignaal:
   If Pinc.1 = 1 Then Locate 1 , 1 : Lcd "startsignaal"
  Wait 2
  Return

  Command:
  Cls
  Waitms 500

  If Pind.1 = 1 Then Locate 1 , 1 : Lcd "command"
   Wait 2
   Return

   Knipperled:
     Cls
  Waitms 500
  If Pinc.2 = 1 Then Locate 1 , 1 : Lcd "rood knipper"
  Locate 2 , 1 : Lcd "led"
  Wait 2
  Return


   Relais1:
   Waitms 500
  Cls

  If Pind.2 = 1 Then Locate 1 , 1 : Lcd "relais 1"
   Wait 2
   Return

   Relais2:
   Waitms 500
  Cls
  If Pind.3 = 1 Then Locate 1 , 1 : Lcd "Relais2"
  Wait 2
  Return


  Relaisr3:
  Waitms 500
  Cls
    If Pinc.3 = 1 Then Locate 1 , 1 : Lcd "relais R3"
  Waitms 500

  Return

  Groenknipperled:
  Waitms 500
  Cls
    If Pinc.5 = 1 Then Locate 1 , 1 : Lcd "groene"
  Locate 2 , 1 : Lcd "led"
  Waitms 500

  Return

  Relaisr4:
  Waitms 500
  Cls
  If Pinc.4 = 1 Then Locate 1 , 1 : Lcd "relais R3"
  Waitms 500
    Return

     Groenknipperled2:
     If Pinc.5 = 1 Then Locate 1 , 1 : Lcd "reset"
   Locate 2 , 1 : Lcd "led"
   Waitms 500
   Cls
   Return

     Bascom2:
    If Pinc.0 = 1 Then Locate 1 , 1 : Lcd "signaal 2"
   Locate 2 , 1 : Lcd "bascom 2"
   Waitms 500
   Cls
   Return

  End





