daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Jun 20th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $regfile = "m8def.dat"
  2. $crystal = 8000000
  3. $hwstack = 40
  4. $swstack = 16
  5. $framesize = 32
  6.  
  7. Config Lcdpin = Pin , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portc.5 , E = Portc.1 , Rs = Portc.0
  8.  
  9. Config Lcd = 16 * 2
  10.  
  11.  
  12. Cursor Off
  13.  
  14. Declare Sub C1()
  15. Declare Sub C2()
  16.  
  17. Dim A As Integer
  18. A = 2
  19.  
  20. Deflcdchar 1 , 4 , 14 , 27 , 14 , 32 , 32 , 32 , 32         ' replace [x] with number (0-7)
  21. Deflcdchar 2 , 32 , 32 , 32 , 32 , 32 , 4 , 14 , 31         ' replace [x] with number (0-7)
  22. Do
  23. If A = 1 Then
  24. C1
  25. Elseif A = 2 Then
  26. C2
  27. endif
  28. Cls                                                         'clear the LCD display
  29. Locate 1 , 1
  30. Lcd Chr(1)
  31. Locate 2 , 1
  32. Lcd Chr(2)
  33. Cls
  34. Locate 2 , 3
  35.  
  36. Lcd Chr(0)
  37.  
  38. Waitms 300
  39. Loop
  40. End
  41.  
  42.  
  43. Sub C1()
  44. Deflcdchar 0 , 32 , 4 , 32 , 32 , 32 , 32 , 32 , 32
  45. End Sub
  46.  
  47. Sub C2()
  48. Deflcdchar 0 , 32 , 32 , 32 , 32 , 32 , 4 , 32 , 32
  49. End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top