Re: obvod FTDI FT245BM

quattro QUATTRO quattro
Středa Březen 17 14:23:58 CET 2004


Tak si odpovim sam, uz jsem na to prisel

Chyba je v demonstracnim souboru prelozeneho v DELPHI, neni tam reset
ani timeout pro USB zarizeni a pak to tuhne a tuhne ...

Kdyby snad nekdo chtel pouzit tento demonstracni program tak se musi
udelat nize uvedena uprava ve zdrojovich programech a znovu prelozit.
S pozdravem Vladimir Loula ml.

v originalnim souboru MAIN.PAS je 
------------------------------------------------------------------ 
procedure TForm1.Timer1Timer(Sender: TObject); 
Var PortStatus : FT_Result; S : String; DeviceIndex : DWord; I :
Integer; 
begin 

Exit; //debug 
FT_Enable_Error_Report := False; // Turn off error dialog 
If Not DevicePresent then 
Begin 
PortStatus := Close_USB_Device; // In case device was already open 
PortStatus := Open_USB_Device; // Try and open device 
If PortStatus = FT_OK then // Device is Now Present ! 
Begin 
DevicePresent := True; 
Caption := 'D2XX Delphi Demo - Device Present ...'; 
Memo1.Enabled := True; 
FTPort_Configure.Enabled := True; 
FTSendFile.Enabled := True; 
FTReceiveFile.Enabled := True; 
End; 
---------------------------------------------------------------------

upravena procedura je 

---------------------------------------------------------------------
procedure TForm1.Timer1Timer(Sender: TObject); 
Var PortStatus : FT_Result; S : String; DeviceIndex : DWord; I :
Integer; 
begin 

Exit; //debug 
FT_Enable_Error_Report := False; // Turn off error dialog 
If Not DevicePresent then 
Begin 
PortStatus := Close_USB_Device; // In case device was already open 
PortStatus := Open_USB_Device; // Try and open device 
If PortStatus = FT_OK then // Device is Now Present ! 
Begin 
DevicePresent := True; 
Caption := 'D2XX Delphi Demo - Device Present ...'; 
Memo1.Enabled := True; 
FTPort_Configure.Enabled := True; 
FTSendFile.Enabled := True; 
FTReceiveFile.Enabled := True; 
Reset_USB_Device; // Reset USB zarizeni 
Set_USB_Device_TimeOuts(500,500); // timeout pro cteni a zapis je
nastaven na 500ms 
End; 
---------------------------------------------------------------------

______________________________________________________________________
Reklama:
http://audioexpert.cz / http://videoexpert.cz / http://fotoexpert.cz
...experti nejenom prodavaji :-)




Další informace o konferenci Hw-list