Guest User

Untitled

a guest
Jan 5th, 2018
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. '****************************************************************
  2. '*  Name    : ompoolmodule.BAS                                  *
  3. '*  Author  : Alwin Winius                                      *
  4. '*  Notice  : Copyright (c) 2011 Wetronic NL                    *
  5. '*          : All Rights Reserved                               *
  6. '*  Date    : 4-10-2011                                         *
  7. '*  Version : 1.0                                               *
  8. '*  Notes   :                                                   *
  9. '*          :                                                   *
  10. '****************************************************************
  11. Device 12F675               ;We gebruiken een 16F627A type
  12. Config INTRC_OSC_NOCLKOUT, WDT_OFF, PWRTE_ON, MCLRE_OFF
  13.  
  14. All_Digital true
  15.          ;76543210
  16. TRISIO = %00011000;
  17.  
  18. While 1 = 1
  19.   If GPIO.3 = 0 And GPIO.4 = 0 Then
  20.     GPIO.0 = 0
  21.     GPIO.1 = 0
  22.     DelayMS 100
  23.  
  24.   Else If GPIO.3 = 1 And GPIO.4 = 1 Then
  25.     GPIO.0 = 0
  26.     GPIO.1 = 0
  27.     DelayMS 100
  28.  
  29.   Else If GPIO.4 = 1 And GPIO.3 = 0 Then
  30.     GPIO.1 = 0
  31.     DelayMS 25
  32.     GPIO.0 = 1
  33.     DelayMS 100
  34.  
  35.   Else If GPIO.3 = 1 And GPIO.4 = 0 Then                
  36.     GPIO.0 = 0
  37.     DelayMS 25
  38.     GPIO.1 = 1
  39.     DelayMS 100
  40.  
  41.   End If
  42.  
  43. Wend
Add Comment
Please, Sign In to add comment