Ah, ça y est, j'ai réussi!!!![]()
![]()
Je l'ai testé sur un démo Aston Simba 202s en 11520 bauds/s, quand j'ai le signal DCD par "00", je balance entièrement l'Atr et c'est ok.
RX Data :
RX Data :
RX Data :
RX Data :
RX Data : 00
TX Data : 3B F7 11 00 01 40 96 70 70 07 0E 6C B6 D6 90 00
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data :
RX Data : C1 0E 00 00 08
Script D:\WinExplorer\Script\Test Atr Seca sur Aston Simba 202s v1.20.xvb Transmission Completed
Le script:
Sc.ClearOutputWindow
Const SND_SYNC = 0
Const SND_ASYNC = 1
Dim B1,B2,B3,B4,B5
Dim Atr0
Atr0= "3BF711000140967070070E6CB6D69000"
Sub Main()
Season2
Sc.PlaySound "Ding.wav", SND_ASYNC
Sc.Delay(1000)
EnvAtr0
Do
Sc.Delay(50)
Lecture
TestLong
Test00
TestIns
If (B1) = 1 Then
Exit Sub
End If
Loop
End Sub
Function Lecture()
B2 = Empty
B3 = Empty
B4 = Empty
B2 =Sc.Read(sc.bytesinbuffer)
For B3 = 0 to (B2-1)
B4 = B4 & HexString(Sc.GetByte(B3),2)
Next
End Function
Function TestLong()
If (B2) = 16 Then
Sc.PlaySound "Exclamation.wav", SND_ASYNC
End If
End Function
Function Test00()
If (B4) = "00" Then
EnvAtr0
End If
End Function
Function TestIns()
If (B4) = "C10E000008" Then
Sc.PlaySound "Exclamation.wav", SND_ASYNC
B1 = 1
End If
End Function
Function EnvAtr0()
Sc.Write Atr0
End Function
Function Season2()
Wx.ClosePort
wx.CommPort="Com1:"
wx.BaudRate=11520
wx.ResetBaudRate=11520
wx.ResetDelay=0
wx.ByteDelay=100
wx.RxByteTimeout=0
wx.Parity=2
wx.StopBits=2
wx.FlushBeforeWrite=0
wx.FlushEchoByte=0
wx.DTRControl=0
wx.RTSControl=1
wx.ResetMode=0
wx.IgnoreTimeouts=0
wx.ResetAfterTimeout=0
wx.ResetLine=1
wx.LogTransactions=0
wx.DisplayUSW=0
wx.DisplayFuse=0
wx.ByteConvention=1
Wx.OpenPort
End Function
Function HexString(Number,Length)
Dim RetVal
Dim CurLen
RetVal=Hex(Number)
CurLen=Len(RetVal)
If CurLen<Length Then
RetVal=String(Length-CurLen,"0") & RetVal
End If
HexString=RetVal
End Function
---------------------------------------------------
Maintenant je teste cela sur un démo Off,
A suivre...![]()
![]()





Reply With Quote