ADC11 Parallel Port and C++

 
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
Author Message
baasacJak
Guest





PostPosted: Sat Mar 04, 2006 7:21 pm    Post subject: ADC11 Parallel Port and C++ Reply with quote

I am using the free Borland command line compiler and I can't get even the test file to build(compile works but the linker throws unresolved externals for all the driver functions).

I have tried absolutely loads of things, amongst others:

> made a config file for the linker called ilink32.cfg and included a link to the folder which contains all the lib's and dll's.
> used the -L command line parameter to specify where the lib files are
> tried compiling as a dos app and a windows app
> writing a very simple program which only uses the adc11_get_driver_version function and prints the result

all of which have not worked. How do I make the compiler/linker aware of the lib's and dll's?

My C++ is working fine as I have written quite a few test programs with it, I just can't do anything with this adc11 problem!

My Borland compiler is v5.5

Thanks for any help

btw, I did try and register with this forum, but after putting my registration details in I just get a blank 'Information' screen.
Back to top
Sarah
Guest





PostPosted: Tue Mar 07, 2006 9:37 am    Post subject: Reply with quote

Hi

Thank you for your post.

What lib files are you using? You need to include the lib file into the solution for it to work. The dll should be in the same directory as the project but does not need to be included in the project as the lib file should do this.

As I am not familiar with Borland compilers I do not know exactly how the lib files should be included however it is important that they are and that the correct one is used. If you have a choice between adc11.lib and adc11ms.lib then you need to use the adc11.lib file. If you have a choice between adc11.lib and adc11bc.lib then you need to use adc11bc.lib. This is because the different files relate to different compilers.

Let me know how you get on.

Best Regards
Back to top
baasacJak
Guest





PostPosted: Tue Mar 07, 2006 11:13 pm    Post subject: thankyou so far Reply with quote

Thanks for the reply!

The lib file I'm supposed to use is adc1132.lib I think. The documentation says that's for Borland 32 bit apps. That right?

As far as including this file, all I have to do is use the command line parameter -L"pathname" right? I don't have to write anything extra in the code do I?
Back to top
baasacJak
Guest





PostPosted: Thu Mar 09, 2006 7:21 pm    Post subject: Wahey! Reply with quote

I managed to get the adc11tes.c to build successfully Very Happy !

For anyone who wants to know, using borland's free command line compiler v5.5 I used the following command line parameters:

bcc32 -tW adc11tes.c adc1132.lib

that's it Shocked!

What is the test program supposed to do? I doesn't appear to do anything on my adc11(just sits in my task manager taking up 0 cpu time)?
Back to top
baasacJak
Guest





PostPosted: Thu Mar 09, 2006 11:36 pm    Post subject: d'oh! Reply with quote

Have run into a problem again Embarassed

As I said, I got the darn test program to build and when it runs it doesn't appear to do anything? Well, if I run it again (while it's still in my task manager) the error message saying 'couldn't open driver' pops up. This I would've expected, bear with me...

I wrote a simple program to take a sample from the ADC11 and print the results, but I'm getting the 'pico.sys is missing' error from the adc11_get_unit_info. Is this why the test program is not doing anything?

Pico.sys is in my system32/drivers folder and picoscope works fine, but I can't find regdrive.exe to try and tell the OS that the driver is available. I've done a search for regdrive.exe on both my harddrives and also the cd but it returns no results. What can I do?

I've tried doing a repair installation with the device unplugged and then restarting the computer with the device in before powering up but this hasn't changed anything Sad

Thanks in particular to Sarah for your replies so far! Please help me some more Smile !

I've attatched my test program in case it helps, it's dead simple.



test.cpp
 Description:

Download
 Filename:  test.cpp
 Filesize:  1.64 KB
 Downloaded:  386 Time(s)

Back to top
baasacJak
Guest





PostPosted: Mon Mar 13, 2006 2:16 am    Post subject: regdrive.exe Reply with quote

Could someone please either post regdrive.exe in this thread, or private message me to arrange emailing it or something because I can't find it anywhere! It could be the solution to my above problem.

Thanks in advance Smile
Back to top
baasacJak
Guest





PostPosted: Mon Mar 13, 2006 3:40 pm    Post subject: Ok, forget regdrive Reply with quote

Michael in the 'Getting Started' forum says:

"You will no longer see the regdrive programm with our new installer package. This MSI installer writes to the registry without the regdrive."

So I've given up on regdrive.exe. The error message I get from my test program is this:

ADC11/22 DRIVER V4.2
pico.sys not found
pico.sys v2.0

A few questions:
    I see 5 people have dowloaded my test program, did anybody have any results from it?
    If pico.sys is not found, how does it know it's v2.0?
    How come picoScope works, it must need the same driver?
    What is the test program supposed to do?


Thanks for any help Smile
Back to top
Michael
Guru
Guru


Joined: 07 Jul 2005
Posts: 93
Location: St Neots, Cambridgeshire

PostPosted: Tue Mar 14, 2006 9:36 am    Post subject: Reply with quote

Hello,

Are you using the Parallel or USB version.

If it's the parallel version, are you using the correct parallel port mode??
(Normal, output only, or standard)

Check this in your BIOS settings. This will prevent the unit from opening and display the error message you have seen.

Please let me know how you get on.

Best regards,
Michael
Back to top
Sarah
Guest





PostPosted: Tue Mar 14, 2006 4:18 pm    Post subject: Reply with quote

Hi

Does the unit work with Pico software?

I suspect that the adc-11 test program is not the one you want to use. The file you want is adc11con.c as this is the main command line program. I have successfully compiled this in Visual C but have not tried with Borland.

Can you try this C file?

Best Regards
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group