Advertisement
Guest User

Untitled

a guest
Jan 28th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. '*** chuj ***
  2. '*** Autor: Jacek Ciesielka ***
  3. '*** II/stc/UP/Krakow/2019 ***
  4. '******************************
  5.  
  6. $regfile = "m32def.dat"
  7. $crystal = 16000000
  8. $hwstack = 40
  9. $swstack = 16
  10. $framesize = 32
  11. $sim
  12.  
  13. Deflcdchar 0,32,2,4,32,14,17,17,17 ' ń
  14.  
  15. '===========Konfiguracja=======
  16. Config Lcd = 16 * 2
  17.  
  18. Config Lcdpin = Pin , Db4 = Portb.4 , Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7 , E = Portb.2 , Rs = Portb.3
  19.  
  20. Config Porta = Input
  21. Config Portd = Output
  22. Portd.0 = 0
  23. Portd.7 = 0
  24. Dim czas As Word
  25. czas = 35000
  26. Dim stan As Integer
  27. stan = 1
  28.  
  29. Do
  30. Debounce Pina.0 , 0 , pom , Sub
  31. Debounce Pina.7 , 0 , nieb , Sub 'stop
  32. Loop until stan = 1
  33.  
  34.  
  35. '===========Podprogramy=========
  36.  
  37. pom:
  38. cls
  39. Locate 2 , 7
  40. Lcd "Pomara", char(0) "czowy"
  41. PORTD.0 = 1
  42.  
  43. nieb:
  44. cls
  45. Locate 2 , 7
  46. Lcd "Niebieski"
  47. PORTD.0 = 0
  48. PORTD.7 = 1
  49. Waitms czas
  50. PORTD.7 = 0
  51. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement