@Luciano
Am Dienstag, 9. Dezember 2014 13:01:30 UTC+1 schrieb Luciano:
>
> I did this way and I would be glad of you helped me in this question. I
> have installed Libpruio0.0.2, and I wrote a simple code just to read the
> ADC value (Value[1]) from the output port P9_14 to see it commute.(I don't
> need all that libraries, but they are there for further algorithms). In the
> circuit I added a voltage divider with two 10k resistors, to get about 1,7V
> to not cross 1,8V.
>
I made a similar test running this loop (FreeBASIC, libpruio-0.2.2 in IO
mode)
IF .Adc->setStep(1, 0, 0, 0, 0) THEN _ ' configure fast Adc step
?"ADC setStep failed (" & *.Errr & ")" : EXIT DO
...
FOR i AS INTEGER = 0 TO c
o = IIF(.Adc->Value[1] > &h7FFF, 0, 1)
IF .Gpio->setValue(POUT, o) THEN _ ' set GPIO output
?"GPIO setValue failed (" & *.Errr & ")" : EXIT DO
NEXT
IF .Cap->Value(PIN, @f2, @d2) THEN _ ' get CAP input
?"Cap->Value failed (" & *.Errr & ")" : EXIT DO, DO
...
The ADC step 1 is configured for maximum speed. I have no osziloscope, so I
measured the output frequency by a CAP pin.
Here's typical output from executing the above snippet about 50 times,
frequency values in Hz:
ADC closed loop:
Minimum: 54704.59375
Avarage: 61088.24790736607
Maximum: 80321.28125
--
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.