Advertisement
Guest User

Untitled

a guest
Jan 31st, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. $regfile = "m8def.dat"
  2. $crystal = 8000000
  3. Config Portd = Output
  4. Config Spi = Soft , Din = Pind.3 , Dout = Portd.4 , Ss = None , Clock = Portd.5
  5. Config Timer0 = Timer , Prescale = 1
  6. On Timer0 Przerwanie
  7. Enable Timer0
  8. Start Timer0
  9. Enable Interrupts
  10. Spiinit
  11. Wystaw Alias Portd.2
  12. Wystaw = 0
  13.  
  14.  
  15. Dim Odczyt As Word
  16. Dim Liczba As Word
  17. Dim Eee As Byte
  18.  
  19.  
  20. Liczba = 0
  21. Eee = &B00001111
  22.  
  23. Tabela:
  24. Data &B11000000 , &B11111001 , &B10100100 , &B10110000 , &B10011001 , &B10010010 , &B10000010 , &B11111000 , &B10000000 , &B10010000
  25.  
  26. Przerwanie:
  27. Odczyt = Lookup(liczba , Tabela)
  28. Spiout Odczyt , 1
  29. Spiout Eee , 1
  30. Wystaw = 1
  31. Wystaw = 0
  32.  
  33.  
  34. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement