Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Using ftdi chip programming with Borland C++ Builder

Status
Not open for further replies.

H_u_n_t_e_r

Full Member level 2
Joined
Nov 24, 2001
Messages
149
Helped
6
Reputation
12
Reaction score
2
Trophy points
1,298
Activity points
1,054
First of all, thank you so much for your interest,
may be you will find this question is simple but not for me..

we have come to face to face following issue after we had been owercome some hardware problems:(

now i need your suggestion and experience on C++buildeer dll manipl.
ihave tried some code but result is not succsess..
i need to use ftdichip programming with Borland C++ Buildr..
"Dear F_tdi" already supply some example but i couldnt understand,
they supllies FTD2XX.H and FTD2XX.dll and FTD2XX.lib files...
**broken link removed**
.h file contains functions i think.
i need simply use following functions ft_open, ft_close, ft_read, ftwrite

how can i do that..( ihave borland c++ 60)
if possible a source code will be useful.
Sorry for your time..
Best Regards..
 

ftdxx.h

I´m not a GURU, but I work with those chips with Builder IDE.
I don´t understand exactly your problems.
But let me remember to you some steps:
- First time you plug a device, install the ftdxx drivers. NOT THE VCP ones.
- Use the mprog free software to burn some VID/PID or serial #
- (try the example, it is fully workable)
- Include the header file (.h) in your own builder program
- List the devices with, for example:
FT_ListDevices(&numDevs,NULL,FT_LIST_NUMBER_ONLY);
to get the status.
- Use FT_Open to get the handle

just let me know, if you need further help
 

ftd2xx.dll c++builder

i have created a project in a seperate directory.. and put .h .lib file into this directory..
and also FTD2XX.dll to system32


i have include FTD2XX.H in myproject.h
and i put into button_click following code

FT_HANDLE ftHandle;
FT_STATUS ftStatus;
ULONG Status;
int DevNum=0;
//
ftStatus =FT_OPEN (DevNum,&ftHandle) ;
if (!FT_SUCCESS(ftStatus))
Form1->Caption = "device not opened";
else
Form1->Caption = "device not opened";


but when i compile it

result is->
[C++ Error] myproject.cpp(66): E2268 CAll to undefined function 'FT_OPEN'


Thank you...
keep in touch
 

ft245rl c++builder

In C/C++ the names are case sensitive. So it isn't FT_OPEN but FT_Open. Check the .h file and the samples for more info.
 

    H_u_n_t_e_r

    Points: 2
    Helpful Answer Positive Rating
ft232 builder speed

Builder compiler is -by default- case sensitive. You can turn it of, but it is highly NOT recomended. You may look into header files as Gorilla says.
 

    H_u_n_t_e_r

    Points: 2
    Helpful Answer Positive Rating
c++ builder example

hi dpsman and Gorilla,
dpsman,
what kind of chip did you use ft232 or ft245 with buillder? could you post me?

dpsman and Gorilla,
and can i write a dll which can be use ftxxx.dll.. i mean that a dll can be use another dll?
 

c++ builder case sensitive

H_u_n_t_e_r said:
and can i write a dll which can be use ftxxx.dll.. i mean that a dll can be use another dll?

Yes, it works exactly the same as an ordinary executable. You can use an import library (I assume you've used this method, looking at the previous posts), or alternatively, LoadLibrary() and GetProcAddress() from the Win32 API.
 

ft_open code

I use FT232BM
 

ftd2xx.dll ftwrite

Gorilla,
Which one is suit "import library" or "loadlibrary"
 

ft245bm builder c++

H_u_n_t_e_r said:
Which one is suit "import library" or "loadlibrary"

I don't exactly know what you mean... But I'd use the import library method, since that is assumed in most of the sample code.

I basically means that you add the .lib file to your project/makefile, which in turn satisfies the linker when the FT_* functions are encountered.

Just try one of the example apps and tell us what problems you have left.
 

c++builder case sensitive compile

Thank you so much Gorilla,
Functions seems to be okay now, did you work with these chips(FT--245--BM)?
 

ftd2xx.lib

H_u_n_t_e_r said:
Thank you so much Gorilla,
Functions seems to be okay now, did you work with these chips(FT--245--BM)?

It's good to hear that it's working now!

Yes, I've written several applications and interface DLL's for these chips (the FT232BM to be exact). At my company we use them for programming and interface boards.

There are some issues, but in general the D2XX drivers are quite stable and easy to work with.
 

ftd2xx.h builder

I do not have experience with the PLX chips, but with similar chips from Philips (PDIUSBD*) and National Semiconductor (USBN*).

You really can't compare them with the FTDI chips, because you need to implement the USB handling in software. The FTDI chips take care of this for you, and run without additional firmware.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top