كود:
program matrix_sms
dim Rr, Xx, Vv, Oo, Ss,Pp as byte
dim Tt as byte ' 0 5 10 15 20 25 30 1,118,118,118,1
' A D O H E M _
const Ch as byte[35] = ( 126,9,9,9,126,127,65,65,65,62,62,65,65,65,62,
127,8,8,8,127,127,73,73,73,65,127,2,12,2,127,0,0,0,0,0)
const Le as byte[67] = ( 30,25,10,15,0,25,20,5,30,30,25,20,25,20,30,30,15,0,25,
5,20,30,30,25,0,15,25,10,5,30,30,20,25,0,5,30,30,15,0,
25,0,5,0,30,30,5,20,5,20,30,30,5,10,5,10,30,30,25,0,25,
0,30,30,5,0,5,30)
main:
trisa = 0
trisb = 0
portb = $ff
porta = $00
for Tt = 1 to 10
porta.1 = 0
porta.1 = 1
next Tt
for Tt = 1 to 67
Rr = Le[ Tt]
for Oo = 1 to 200
porta.0 = 1
porta.1 = 0
porta.1 = 1
for Vv = 0 to 4
Xx = Ch[ Rr + Vv]
Ss = Vv + 1
portb = not Xx
delay_us(300)
portb = $ff
delay_us(5)
porta.0 = 0
porta.1 = 0
porta.1 = 1
next Vv
next Oo
next Tt
goto main
end.