On Sat, 28 Sep 2019 08:55:08 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Frederico Alves de Oliveira Silva
<[email protected]> wrote:

>I am a total begginner with BeagleBone.
>I would like to ask how can I control the sample rate of BeagleBone Black.
>Is there a minimal example?
>

        I'm going to assume you mean the ADC inputs...

        What programming language? If using Python, you might want to start
here: https://adafruit-beaglebone-io-python.readthedocs.io/en/latest/ (or
download as PDF from
https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/overview
[link on left middle of page]).

        Granted, that simplified interface is a one-shot read, so sample rate
doesn't apply. For more complex uses (from C/C++ say) you might want to
read the applicable section of the TI TRM (SPRUH73P -- Google it, and
download the PDF). The ADC is covered under "Touchscreen Controller" (and
for your OTHER post, SPI is under "Multichannel Serial Port Interface".

        I don't really see an obvious "sample rate" parameter for the ADC, just
delays at the start of "conversion" to allow (if needed) voltages to settle
down). There is a clock divider register.


        For SPI from Python, again see the BBIO documents for setting up the
channel, and the documents for the slave device for the commands to send.
(I don't find many examples for a SPI pot, lots for an I2C pot). You might
also want to look at Arduino code, and map it's C(++) library calls into
Python BBIO calls. (example:
https://www.arduino.cc/en/Tutorial/DigitalPotControl )


-- 
Dennis L Bieber

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/n24voedh5akcnlbkc5qa11o4h6s6v18emq%404ax.com.

Reply via email to