Advertisement
Kredens234

Untitled

May 10th, 2018
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. $regfile = "m8def.dat"
  2. $crystal = 8000000
  3. $hwstack = 40
  4. $swstack = 16
  5. $framesize = 32
  6.  
  7. Config Lcdpin = Portc.6 , Rs = Portc.0 , E = Portc.1 , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portc.5
  8. Config Lcd = 16 * 2
  9.  
  10. Config Timer1 = Pwm , Pwm = 8 , Prescale = 1 , Compare A Pwm = Clear Down , Compare B Pwm = Clear Down
  11. Config Pinb.3 = Output
  12. Enable Timer1
  13.  
  14. Pwm1a = 32
  15. Pwm1b = 32
  16.  
  17. Dim Speed As Integer
  18. Speed = 5
  19.  
  20. Do
  21. Cls
  22. Lcd "Abc"
  23.  
  24. Dim A As Integer
  25. For A = 0 To 255
  26.  
  27. Pwm1a = A
  28. Pwm1b = A
  29. Waitms Speed
  30. Next
  31.  
  32. Waitms Speed
  33.  
  34. For A = 0 To 255
  35. Pwm1a = 255 - A
  36. Pwm1b = 255 - A
  37. Waitms Speed
  38. Next
  39.  
  40. Waitms Speed
  41. Loop
  42. End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement