## Negative voltage + Qbasic

Post general discussions on using our drivers to write your own software here
old_collector@btopenworld
Newbie
Posts: 1
Joined: Tue Nov 09, 2004 9:29 am

### Negative voltage + Qbasic

Dear Sarah,

I have 2 special requirements.

1. I will be collecting a lot of "specialized" data,
so I must be able to write my own program (in qBasic) ,
to feed data into a database.

I understand the examples of qBasic program for the ADC 11.
( I think that qBasic program is provided FREE with some (but not all) Window "installation CD" , even though windows does NOT install it. )
(There is no need to "compile" qBasic program, so it is easier to use !)

I do NOT understand the Visual Basic program or C program for ADC 16

------------------

2. Some channels will be a positive voltage.
Some channels will be a negative voltage.

---------------

One suggestion is I pay an extra £30 to have a modified ADC 11.

That is o.k. but do I have to modify the Qbasic program,
or do I simply assume that Channel 1 to Channel 8 is ALWAYS positive
and Channel 9 to Channel 11 is ALWAYS negative ?

If that is all I have to to to the Qbasic program,

-------------------------

Do you have any examples of qbasic programs for ADC 16 ?
This might be easier than modifying ADC 11.

markspencer
Posts: 598
Joined: Wed May 07, 2003 9:45 am
Hi,

Thank you for your questions. The ADC-11 does normally only measure voltage in the range 0-2.5volts. However, there are different number of specials, but if you went for the ADC-11 special that can measure -2.5 to +2.5 volts then in the QBasic example you would need to change the ADC count to voltage conversion. ie. the maximum ADC Count is 4096 points the mid point will be 0 voltage, 0 adc counts will be -2.5 and 4095 will be 2.5 volts. so therefore the calculation would be:

voltage = ((ADC Count - 2048) / 2048) * 2.5

Channels 4 - 11 will measure both positive and negaitive volage, but channels 1 - 3 will still only measure 0 - 2.5 volts. You also need to be aware that the imputimpedance drops down to 40kOhms when modified.

Best regards,
Regards,

Mark Spencer