Hey TJF,

So, if I'm understandig it right, what I conclude is that with only one ADC 
working, the maximum sample rate we can get is around 93 kHz. 
Above when you answered to *jleb, *you said:

"The result is as expected, and even if I increase the frequencies, all 
looks good up to a sampling rate of 200 kHz." 

How can I get that sample rate? 200kHz is the maximum according to the 
features of processor AM3359. (
http://www.ti.com/product/AM3359/datasheet/abstract#SPRS7176831). 

Thank you for your attention.

BR,
Luciano.

Quarta-feira, 17 de Dezembro de 2014 19:03:03 UTC, TJF escreveu:
>
> @Luciano
>
> I changed your loop logic a bit, so that the GPIO output only changes 
> after the ADC value is present
>
>     IF .Adc->setStep(1, 0, 0, 0, 0) THEN _ '     configure fast Adc step
>                         ?"ADC setStep failed (" & *.Errr & ")" : EXIT DO
>
>     IF .config(1, 1 SHL 1) THEN _
>                              ?"config failed (" & *.Errr & ")" : EXIT DO
>
>       ...
>
>       FOR i AS INTEGER = 0 TO c
>         WHILE .Adc->Value[1] <= &h7FFF : WEND '          wait until high
>         IF .Gpio->setValue(POUT, 0) THEN _ '                set GPIO low
>                       ?"GPIO setValue failed (" & *.Errr & ")" : EXIT DO
>         WHILE .Adc->Value[1] > &h7FFF : WEND '            wait until low
>         IF .Gpio->setValue(POUT, 1) THEN _ '               set GPIO high
>                       ?"GPIO setValue failed (" & *.Errr & ")" : EXIT DO
>       NEXT
>       if .Cap->Value(PIN, @f2, @d2) then _ '               get CAP input
>                          ?"Cap->Value failed (" & *.Errr & ")" : EXIT DO, 
> DO
>       ...
>
> and I get higher frequencies
>
> ADC closed loop:
>   Minimum:  69589.421875
>   Avarage:  91196.43975694444
>   Maximum:  93196.6484375
>
>
>
Quarta-feira, 17 de Dezembro de 2014 19:03:03 UTC, TJF escreveu:
>
> @Luciano
>
> I changed your loop logic a bit, so that the GPIO output only changes 
> after the ADC value is present
>
>     IF .Adc->setStep(1, 0, 0, 0, 0) THEN _ '     configure fast Adc step
>                         ?"ADC setStep failed (" & *.Errr & ")" : EXIT DO
>
>     IF .config(1, 1 SHL 1) THEN _
>                              ?"config failed (" & *.Errr & ")" : EXIT DO
>
>       ...
>
>       FOR i AS INTEGER = 0 TO c
>         WHILE .Adc->Value[1] <= &h7FFF : WEND '          wait until high
>         IF .Gpio->setValue(POUT, 0) THEN _ '                set GPIO low
>                       ?"GPIO setValue failed (" & *.Errr & ")" : EXIT DO
>         WHILE .Adc->Value[1] > &h7FFF : WEND '            wait until low
>         IF .Gpio->setValue(POUT, 1) THEN _ '               set GPIO high
>                       ?"GPIO setValue failed (" & *.Errr & ")" : EXIT DO
>       NEXT
>       if .Cap->Value(PIN, @f2, @d2) then _ '               get CAP input
>                          ?"Cap->Value failed (" & *.Errr & ")" : EXIT DO, 
> DO
>       ...
>
> and I get higher frequencies
>
> ADC closed loop:
>   Minimum:  69589.421875
>   Avarage:  91196.43975694444
>   Maximum:  93196.6484375
>
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to