Advertisement
Wojtekd

Untitled

May 25th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.91 KB | None | 0 0
  1. $regfile = "m32def.dat"
  2. $crystal = 16000000
  3.  
  4. 'Podłšczenie pinów LCD do mikroprocesora
  5.  
  6. ' BL = PortC.1
  7. ' Rs = PortC.2
  8. ' E = PortC.3
  9. 'Db4 = PortC.4
  10. 'Db5 = PortC.5
  11. 'Db6 = PortC.6
  12. 'Db7 = PortC.7
  13.  
  14. Config Lcdpin = Pin , Rs = Portc.2 , E = Portc.3 , Db4 = Portc.4 , Db5 = Portc.5 , Db6 = Portc.6 , Db7 = Portc.7
  15. Config Lcd = 16 * 2
  16.  
  17. Deflcdchar 1 , 32 , 32 , 10 , 32 , 32 , 17 , 14 , 32        ' replace [x] with number (0-7)
  18.  
  19.  
  20. Dim A As Byte
  21. Dim B As Integer
  22. Dim C As Integer
  23. Dim D As Integer
  24.  
  25. B = 1
  26. C = 1
  27. D = 15
  28.  
  29.  
  30.  
  31.  
  32. Deflcdchar 1 , 32 , 4 , 14 , 4 , 4 , 4 , 31 , 14            ' replace [x] with number (0-7)
  33.  
  34. Deflcdchar 2 , 32 , 17 , 4 , 14 , 31 , 14 , 4 , 17          ' replace [x] with number (0-7)
  35.  
  36.  Do
  37. Cls
  38. Cursor Off Noblink
  39.  
  40. If C = 7 Then
  41. Locate 1 , 8
  42. Lcd Chr(2)
  43. Waitms 1000
  44. End If
  45.  
  46.  
  47. Locate B , C
  48. Lcd Chr(1)
  49. Locate B , D
  50. Lcd Chr(1)
  51. Waitms 1000
  52. Cls
  53. C = C + 1
  54. D = D - 1
  55.  
  56.  
  57.  
  58. Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement