|
|
| Author |
Message |
Guest
|
Posted: Tue Mar 09, 2004 12:34 pm Post subject: ACD200 with BBC Basic Programming |
|
|
Hi,
I'm working on programming ADC-216 on BBC Basic, but I have some problems to be solved.
The problem is about linking to .DLL file. Basically, in BBC Basic, when I call the function on DLL file (adc20032.dll), I have to send the pointer for what variables that I need the function to return the variables. It works well with adc200_set_timebase function which gaive me exact value of ns and is_slow. However, the problem is caused when I call the function adc200_get_values. The buffer_A and buffer_B give all strange values which are out range (much much over 32768 and much much lower than -32768). I'm unsure where the problem happens. It would be very appreciated if someone can bring me out of maze.
Thanks,
Mayez |
|
| Back to top |
|
 |
markspencer Site Admin

Joined: 07 May 2003
Posts: 610
|
Posted: Wed Mar 10, 2004 8:47 am Post subject: |
|
|
Hi,
The problem that you seem to be having is a compatibility, the short in C is only 16 bits. It could be possible that you are passing a 32 bit data type.
Unfortuntely, I have not done any BBC Basic in a long time, but I would recommend that you have a look at the visual basic code and how the funtions to get_values are called along with the data types used.
Best regards, |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|