@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 [email protected].
For more options, visit https://groups.google.com/d/optout.