Facebook
From Queen Eider, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 252
  1. Ddra = &B11111111
  2. Porta = &B00000000
  3. Mcucr = &B00000011
  4. Tccr1b = &B00000011
  5. Tccr0b = &B00000011
  6. Gimsk.6 = 1
  7. Sreg.7 = 1
  8. Timsk1.0 = 1
  9. Timsk0 .0 = 1
  10.  
  11. Dim H As Byte
  12. H = 0
  13. Dim L As Byte
  14. L = 0
  15. Dim Hl As Word
  16. Hl = 0
  17. Dim Paski As Byte
  18. Dim Litera(5) As Byte
  19.  
  20. Ddrb = &B1011
  21. Portb = &B1001
  22.  
  23.  
  24. On Int0 _blink
  25. On Ovf0 _test
  26.  
  27. Do
  28. Loop
  29. End
  30.  
  31. _test:
  32.  
  33.  
  34. Tcnt0 = 255 - H
  35.  
  36. If Paski < 50 Then
  37. Porta = &B10101010
  38. Else
  39. Porta = &B00000000
  40. End If
  41.  
  42. Incr Paski
  43.  
  44.  
  45.  
  46. Return
  47.  
  48.  
  49. _blink:
  50.  
  51. L = Tcnt1l
  52. H = Tcnt1h
  53. Tcnt1h = 0
  54. Tcnt1l = 0
  55.  
  56. Paski = 0
  57.  
  58. Tcnt0 = 255 - H
  59.  
  60.  
  61.  
  62.  
  63. Return
  64.  
  65.