通过delphi USB控件读写数据
源代码在线查看: lcdmain.dfm
object LCDMainForm: TLCDMainForm
Left = 447
Top = 164
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'IO-Warrior LCD Demo'
ClientHeight = 415
ClientWidth = 345
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
ShowHint = True
OnActivate = FormActivate
PixelsPerInch = 96
TextHeight = 16
object WriteBtn: TSpeedButton
Left = 8
Top = 323
Width = 65
Height = 22
AllowAllUp = True
Caption = 'Write'
Enabled = False
OnClick = WriteBtnClick
end
object IOWarriorAvailable: TLabel
Left = 8
Top = 8
Width = 118
Height = 16
Caption = 'No IO-Warrior found'
end
object ReadBtn: TSpeedButton
Left = 8
Top = 355
Width = 65
Height = 22
AllowAllUp = True
Caption = 'Read'
Enabled = False
OnClick = ReadBtnClick
end
object SaveBtn: TSpeedButton
Left = 8
Top = 387
Width = 65
Height = 22
AllowAllUp = True
Caption = 'Save'
OnClick = SaveBtnClick
end
object HistoryListBox: TListBox
Left = 0
Top = 32
Width = 345
Height = 257
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Courier New'
Font.Style = []
ItemHeight = 16
ParentFont = False
TabOrder = 0
end
object Write1: TEdit
Left = 80
Top = 322
Width = 25
Height = 24
Hint = 'Number of bytes to write in hex'
TabOrder = 3
end
object EnableChk: TCheckBox
Left = 8
Top = 296
Width = 97
Height = 17
Caption = 'Enable LCD'
Enabled = False
TabOrder = 1
OnClick = EnableChkClick
end
object Write2: TEdit
Left = 116
Top = 322
Width = 25
Height = 24
TabOrder = 4
end
object Write3: TEdit
Left = 144
Top = 322
Width = 25
Height = 24
TabOrder = 5
end
object Write4: TEdit
Left = 172
Top = 322
Width = 25
Height = 24
TabOrder = 6
end
object Write5: TEdit
Left = 200
Top = 322
Width = 25
Height = 24
TabOrder = 7
end
object Write6: TEdit
Left = 228
Top = 322
Width = 25
Height = 24
TabOrder = 8
end
object Write7: TEdit
Left = 256
Top = 322
Width = 25
Height = 24
TabOrder = 9
end
object Read1: TEdit
Left = 80
Top = 354
Width = 25
Height = 24
Hint = 'Number of bytes to read in hex'
TabOrder = 10
end
object RSBit: TCheckBox
Left = 152
Top = 296
Width = 161
Height = 17
Hint = 'register select bit for both read and write'
Caption = 'RS Register Select bit'
TabOrder = 2
end
object HidCtl: TJvHidDeviceController
OnDeviceChange = HidCtlDeviceChange
OnDeviceData = HidCtlDeviceData
Left = 296
Top = 8
end
object SaveDialog: TSaveDialog
DefaultExt = 'txt'
Filter = 'text files|*.txt|all files|*.*'
Left = 248
Top = 8
end
end