|
|
| Author |
Message |
mentalsurge Guest
|
Posted: Wed Nov 27, 2002 4:27 pm Post subject: More info on adc11_set_trigger function |
|
|
Hello,
Can you please give me some more info on the set_trigger function.
I cannot get it to work correctly in my program. (C++)
I need it to trigger when I get a voltage on channel 11, but it seems to just return straight away.
I was using the following syntax:
adc11_set_trigger(true, false, 0, 11, false, 300, 0);
The voltage that is my trigger is around 1V. My adc11 is V3, and I am using Visual C++ for windows.
Many thanks
Dan Tallentire. |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Nov 29, 2002 2:40 pm Post subject: ADC11 Set Trigger Values |
|
|
Hello,
It looks like you have scaled the 1V into adc counts incorrectly so the unit is trigger early.
A description of the function is given below
| Code: |
adc11_set_trigger(
true, //trigger enabled
false, // Auto trigger, not enabled
0, //Auto trigger set to false
11, //Chosen Channel
false, // Trigger direction, rising selected, select true for falling
300, //Trigger value in ADC counts
0); //Delay in percent, set to zero
|
As you have a V3 ADC11, this returns adc values between 0 and 4096.
To convert voltages to ADC counts, divide the voltage by 2.5 and then multply by 4096 i.e. for 1V the ADC count value is 1638, not 300.
Best regards
James |
|
| Back to top |
|
 |
mentalsurge Guest
|
Posted: Mon Dec 02, 2002 6:36 pm Post subject: ADC11 Set Trigger Values |
|
|
Thankyou for the response, but this still does not seem to be working.
It does not matter what I set the trigger value to, it still does not wait for the trigger. I know my ADC11 is working, as it intializes correctly in the code, and I have used the digital output from the code also.
I have also checked the channel using the Picoscope, and this shows the voltage change from the channel.
Changing the trigger value to well above the level of my voltage does not make any difference, as it still triggers straight away.
Any ideas?
Thanks,
Dan Tallentire. |
|
| Back to top |
|
 |
matthew Site Admin

Joined: 25 Sep 2002
Posts: 133
Location: Cambridgeshire, UK
|
Posted: Tue Dec 10, 2002 6:00 pm Post subject: |
|
|
Hi Dan,
Does the ADC-11 trigger correctly in PicoScope (you hint at this but do not state it explicitly)?
Try it in Auto-Trigger mode.
Regards, |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|