Forum - MCS Electronics
View previous topic :: View next topic
Author
Message
b3hr@d Joined: 30 Oct 2008 Posts: 1
Posted: Thu Oct 30, 2008 8:12 pm Post subject: led moving message
hi i want to make a led moving message this is example program for 8*8 matrix please explain about the shift algorithm
$regfile = "m8def.dat"
$crystal = 8000000
Config Portb = Output
Config Portd = Output
Dim Col As Byte
Dim Scan As Byte
Dim Refresh As Byte
Dim Index As Byte
Dim S As Byte
Dim R As Byte
Do
For S = 0 To 9
R = 9 - S
For Refresh = 1 To 10
Scan = &B00000001
For Col = 0 To 4
Index = R + Col
Portb = Lookup(index , Gelayof)
Portd = Scan
Waitus 250
Rotate Scan , Left
Portd = &H00
Next Col
Next Refresh
Next S
Loop
End 'end program
Gelayof:
Data &B11111111
Data &B11111111
Data &B11111111
Data &B11111111
Data &B11111111
Data &B11110111
Data &B11110111
Data &B11010101
Data &B11100011
Data &B11110111
Data &B11111111
Data &B11111111
Data &B11111111
Data &B11111111
Data &B11111111
explain about how calculate index at above code
For S = 0 To 9
R = 9 - S
For Refresh = 1 To 10
Scan = &B00000001
For Col = 0 To 4
Index = R + Col
excuse me for my english
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum