📄 frmdebug.frm
字号:
Left = 2040
TabIndex = 21
Top = 540
Width = 975
End
Begin VB.Label lblBuff3Signals
Alignment = 2 'Center
Caption = "SCLK"
BeginProperty Font
Name = "Small Fonts"
Size = 6.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Index = 1
Left = 1080
TabIndex = 20
Top = 540
Width = 855
End
Begin VB.Label lblBuff3Signals
Alignment = 2 'Center
Caption = "SDIO"
BeginProperty Font
Name = "Small Fonts"
Size = 6.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Index = 0
Left = 120
TabIndex = 19
Top = 540
Width = 855
End
Begin VB.Image imgBuff3Btn
Height = 615
Index = 7
Left = 7680
Picture = "frmDebug.frx":A6D2
Tag = "0"
Top = 480
Visible = 0 'False
Width = 870
End
Begin VB.Image imgBuff3Btn
Height = 615
Index = 6
Left = 7680
Picture = "frmDebug.frx":B4B0
Tag = "0"
Top = 240
Visible = 0 'False
Width = 870
End
Begin VB.Image imgBuff3Btn
Height = 615
Index = 5
Left = 7680
Picture = "frmDebug.frx":C28E
Tag = "0"
Top = 600
Visible = 0 'False
Width = 870
End
Begin VB.Image imgBuff3Btn
Height = 240
Index = 4
Left = 4080
Picture = "frmDebug.frx":D06C
Tag = "0"
Top = 240
Width = 870
End
Begin VB.Image imgBuff3Btn
Height = 240
Index = 3
Left = 3090
Picture = "frmDebug.frx":D86E
Tag = "0"
Top = 240
Width = 870
End
Begin VB.Image imgBuff3Btn
Height = 240
Index = 2
Left = 2100
Picture = "frmDebug.frx":E070
Tag = "0"
Top = 240
Width = 870
End
Begin VB.Image imgBuff3Btn
Height = 240
Index = 1
Left = 1110
Picture = "frmDebug.frx":E872
Tag = "0"
Top = 240
Width = 870
End
Begin VB.Image imgBuff3Btn
Height = 240
Index = 0
Left = 120
Picture = "frmDebug.frx":F074
Tag = "0"
Top = 240
Width = 870
End
End
Begin VB.Label lblProcessID
Caption = "Process ID:"
Height = 255
Left = 2040
TabIndex = 78
Top = 7800
Width = 855
End
Begin VB.Image imgGLED
Height = 180
Index = 1
Left = 7800
Picture = "frmDebug.frx":F876
Top = 6480
Visible = 0 'False
Width = 180
End
Begin VB.Image imgGLED
Height = 180
Index = 0
Left = 7560
Picture = "frmDebug.frx":F958
Top = 6480
Visible = 0 'False
Width = 180
End
Begin VB.Image imgButton
Height = 240
Index = 1
Left = 1080
Picture = "frmDebug.frx":FA3A
Top = 6480
Visible = 0 'False
Width = 870
End
Begin VB.Image imgButton
Height = 240
Index = 0
Left = 120
Picture = "frmDebug.frx":1023C
Top = 6480
Visible = 0 'False
Width = 870
End
End
Attribute VB_Name = "frmDebug"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private sRegSize(0 To 12) As Integer
Private BuffNeedsLoading(0 To 2) As Boolean
Const TwoWireColor = &H80FF80
Const ThreeWireColor = &H80C0FF
Private PS0Cntr As Integer
Private Togglerate As Long
Private Sub chkStopHiSpeed_Click()
End Sub
Private Sub chkStartPS0Toggle_Click()
If chkStartPS0Toggle.value = 1 Then
PS0Cntr = 0 'Reset the counter
tmrTogglePS0.Enabled = True
Else
tmrTogglePS0.Enabled = False
End If
End Sub
Private Sub chkTglPS0Dut1_Click()
If chkTglPS0Dut1.value = 1 Or chkTglPS0Dut2.value = 1 Then
chkStartPS0Toggle.Enabled = True
Else
chkStartPS0Toggle.Enabled = False
End If
End Sub
Private Sub chkTglPS0Dut2_Click()
If chkTglPS0Dut1.value = 1 Or chkTglPS0Dut2.value = 1 Then
chkStartPS0Toggle.Enabled = True
Else
chkStartPS0Toggle.Enabled = False
End If
End Sub
Private Sub cmbReadAddress_Click()
Dim RegBytes As Integer
Dim cntr As Integer
'Get the number of bytes to be sent
RegBytes = sRegSize(cmbReadAddress.ListIndex)
'Enable only the textboxes that can be sent
For cntr = 0 To 4
If cntr <= RegBytes - 1 Then
txtRData(cntr).Enabled = True
Else
txtRData(cntr).Enabled = False
End If
Next cntr
End Sub
Private Sub cmbSendAddr_Click()
Dim RegBytes As Integer
Dim cntr As Integer
Dim RegValLen As Integer
Dim CurrentRegVal As String
Dim dummuystr As String
'Get the number of bytes to be sent
RegBytes = sRegSize(cmbSendAddr.ListIndex)
'Enable only the textboxes that can be sent
For cntr = 0 To 4
If cntr <= RegBytes - 1 Then
txtSData(cntr).Enabled = True
' txtSData(cntr).Text = "00000000"
Else
txtSData(cntr).Enabled = False
' txtSData(cntr).Text = "00000000"
End If
Next cntr
' 'Get the current value of the register
' CurrentRegVal = EvalBd.sGetRegVal(cmbSendDUT.ListIndex - 1, cmbSendAddr.ItemData(cmbSendAddr.ListIndex))
' 'Get the length of the current value of the register
' RegValLen = Len(CurrentRegVal) / 8
'
' dummystr = CurrentRegVal
'
' For cntr = RegValLen To 0 Step -1
' 'Get the left 8 bits
' txtSData(cntr).Text = Left(dummystr, 8)
' 'Trim off the left 8 bits
' dummystr = Right(dummystr, cntr * 8)
' Next cntr
End Sub
Private Sub cmdDumpMemory_Click()
Dim DUTNum As String
Dim FileDescription As String
'Setup an error handler
On Error GoTo ErrorHandler
'Setup the common dialog for opening files
cdgRAMFile.flags = cdlOFNFileMustExist + cdlOFNHideReadOnly + cdlOFNLongNames + cdlOFNNoChangeDir
cdgRAMFile.DialogTitle = "Choose a file to DUMP the RAM to."
cdgRAMFile.CancelError = True
cdgRAMFile.filter = "RAM Files (*.ram)|*.ram|Text (*.txt)|*.txt|All Files (*.*)|*.*"
cdgRAMFile.FilterIndex = 0
cdgRAMFile.InitDir = App.path
'Show the open dialog
cdgRAMFile.ShowSave
'If the file exists then ask do they want to overwrite.
If FileExists(cdgRAMFile.filename) Then
If MsgBox("The file you have specified already exists." & vbCrLf & "Would you like to overwrite the file?", vbApplicationModal + vbYesNo + vbQuestion, "Overwrite File?") = vbYes Then
'Overwrite the specified file.
DUTNum = InputBox("Enter the DUT number you would like to DUMP the RAM info from." & vbCrLf & "Ex: 1 for DUT1" & vbCrLf & " 2 for DUT2" & vbCrLf & " 0 for Both DUTs", "Select A DUT", "1")
If DUTNum = "1" Or DUTNum = "2" Then
FileDescription = InputBox("Enter a short discription for the RAM dump file.", "Enter File Desciption")
EvalBd.RAMDumpFile CInt(DUTNum), cdgRAMFile.filename, FileDescription
End If
End If
Else
'Write the specified file.
DUTNum = InputBox("Enter the DUT number you would like to DUMP the RAM info from." & vbCrLf & "Ex: 1 for DUT1" & vbCrLf & " 2 for DUT2" & vbCrLf & " 0 for Both DUTs", "Select A DUT", "1")
If DUTNum = "1" Or DUTNum = "2" Then
FileDescription = InputBox("Enter a short discription for the RAM dump file.", "Enter File Desciption")
EvalBd.RAMDumpFile CInt(DUTNum), cdgRAMFile.filename, FileDescription
End If
End If
'Exit the subroutine before the errorhandler
Exit Sub
'Define an error handler
ErrorHandler:
'Check for the cancel button hit error
If Err.Number = cdlCancel Then
'Exit the subroutine if the cancel button was hit
Exit Sub
End If
End Sub
Private Sub cmdExcerciseIOLines_Click()
cmdExcerciseIOLines.Visible = False
Do
'Write all lines to 1's
EvalBd.PPIO.WritePort ppDataRegister, 255
'Latch in the data
EvalBd.PPIO.WritePort ppControlRegister, 11
EvalBd.PPIO.WritePort ppControlRegister, 0
'Write them to all 0's
EvalBd.PPIO.WritePort ppDataRegister, 0
'Latch in the data
EvalBd.PPIO.WritePort ppControlRegister, 11
EvalBd.PPIO.WritePort ppControlRegister, 0
'Allow the usr to stop
DoEvents
Loop Until chkStopExercise.value = 1
chkStopExercise.value = 0
cmdExcerciseIOLines.Visible = True
End Sub
Private Sub cmdHiSpeedStart_Click()
Dim cntr As Integer
Dim NumBytes As Integer
Dim OutputByte As Integer 'The Byte to output
Dim OpQue As Long 'The OP Que for the Driver X Driver
Const dbSCLK = 2
Const dbSDIO = 1
Const dbSCLKLo = 0
Const dbCLOCKF = 8
Const dbCLOCKFLo = 0
With frmLPTSelect.dxcParallelPort
OpQue = .AllocateOpQueue(0, 36, 0)
.QueueOutp OpQue, ppaDataRegister, dbSCLK 'Take SCLK High
.QueueOutp OpQue, ppaControlRegister, dbCLOCKF 'Latch SCLK through the Buffer by taking CLOCKF High
.QueueOutp OpQue, ppaControlRegister, dbCLOCKFLo 'Take CLOCKFLow
.QueueOutp OpQue, ppaDataRegister, dbSCLKLo 'Take SCLK Low
.QueueOutp OpQue, ppaControlRegister, dbCLOCKF 'Latch SCLK through the Buffer by taking CLOCKF High
.QueueOutp OpQue, ppaControlRegister, dbCLOCKFLo 'Take CLOCKFLow
.QueueOutp OpQue, ppaDataRegister, dbSCLK 'Take SCLK High
.QueueOutp OpQue, ppaControlRegister, dbCLOCKF 'Latch SCLK through the Buffer by taking CLOCKF High
.QueueOutp OpQue, ppaControlRegister, dbCLOCKFLo 'Take CLOCKFLow
.QueueOutp OpQue, ppaDataRegister, dbSCLKLo 'Take SCLK Low
.QueueOutp OpQue, ppaControlRegister, dbCLOCKF 'Latch SCLK through the Buffer by taking CLOCKF High
.QueueOutp OpQue, ppaControlRegister, dbCLOCKFLo 'Take CLOCKFLow
.QueueOutp OpQue, ppaDataRegister, dbSCLK 'Take SCLK High
.QueueOutp OpQue, ppaControlRegister, dbCLOCKF 'Latch SCLK through the Buffer by taking CLOCKF High
.QueueOutp OpQue, ppaControlRegister, dbCLOCKFLo 'Take CLOCKFLow
.QueueOutp OpQue, ppaDataRegister, dbSCLKLo 'Take SCLK Low
.QueueOutp OpQue, ppaControlRegister, dbCLOCKF 'Latch SCLK through the Buffer by taking CLOCKF High
.QueueOutp OpQue, ppaControlRegister, dbCLOCKFLo 'Take CLOCKFLow
.QueueOutp OpQue, ppaDataRegister, dbSCLK 'Take SCLK High
.QueueOutp OpQue, ppaControlRegister, dbCLOCKF 'Latch SCLK through the Buffer by taking CLOCKF High
.QueueOutp OpQue, ppaControlRegister, dbCLOCKFLo 'Take CLOCKFLow
.QueueOutp OpQue, ppaDataRegister, dbSCLKLo 'Take SCLK Low
.QueueOutp OpQue, ppaControlRegister, dbCLOCKF 'Latch SCLK through the Buffer by taking CLOCKF High
.QueueOutp OpQue, ppaControlRegister, dbCLOCKFLo 'Take CLOCKFLow
.QueueOutp OpQue, ppaDataRegister, dbSCLK 'Take SCLK High
.QueueOutp OpQue, ppaControlRegister,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -