On Sat, 28 Sep 2019 08:55:08 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Frederico Alves de Oliveira Silva
<
frederico.aos-Re5J...@public.gmane.org> 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