versuchs mal so:
Code:
$regfile = "M128def.dat"
$crystal = 8000000
$baud = 19200
Dim J as Byte
Dim Zeichen as String * 1
Dim Value As Byte
'Dim Variable1 As String * 15
'Dim Variable2 As String * 15
'Dim Variable3 As String * 15
Dim Befehl As String * 20
Dim Test As String * 20
Config Porte.6 = Output
Config Spi = Soft , Din = Pinb.3 , Dout = Pinb.2 , Clock = Pinb.1 ,
Spiinit
Befehl = "Dir"
Do
Porte.6 = 1
For j = 1 to len(Befehl)
Zeichen = Mid(Befehl , j , 1)
Value = ASC(Zeichen)
SPIOUT Value , 1
Next
'Variable1 = Mid(befehl , 0 , 1)
'Value = Asc(variable1)
'Spiout Value , 10
'Variable2 = Mid(befehl , 0 , 1)
'Value = Asc(variable2)
'Spiout Value , 10
'Variable3 = Mid(befehl , 0 , 1)
'Value = Asc(variable3)
'Spiout Value , 10
'Spiin Test , 10
'Printbin Test
Wait 2
Loop
End
Lesezeichen