Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $regfile = "m8def.dat"
- $crystal = 8000000
- Config Portd = Output
- Config Spi = Soft , Din = Pind.3 , Dout = Portd.4 , Ss = None , Clock = Portd.5
- Config Timer0 = Timer , Prescale = 1
- On Timer0 Przerwanie
- Enable Timer0
- Start Timer0
- Enable Interrupts
- Spiinit
- Wystaw Alias Portd.2
- Wystaw = 0
- Dim Odczyt As Word
- Dim Liczba As Word
- Dim Eee As Byte
- Liczba = 0
- Eee = &B00001111
- Tabela:
- Data &B11000000 , &B11111001 , &B10100100 , &B10110000 , &B10011001 , &B10010010 , &B10000010 , &B11111000 , &B10000000 , &B10010000
- Przerwanie:
- Odczyt = Lookup(liczba , Tabela)
- Spiout Odczyt , 1
- Spiout Eee , 1
- Wystaw = 1
- Wystaw = 0
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement