OK, so without using PRU you would read from /dev/iio:device0, but the sampling rate isn’t going to be fast enough for you. You can increase the sampling rate by modifying the ADC dts parameters which you will find in the ADC overlay.
sudo sh -c "echo ‘BB-ADC' > /sys/devices/platform/bone_capemgr/slots" Problem is as you increase the sampling rate, the CPU utilization increases because the driver uses interrupts for each scan cycle. Currently the ADC driver is configured for 16x oversample, Open Delay = 152 cycles and Sample Delay = 1 cycles. time in us for processing a single channel, calculated as follows: num cycles = open delay + (sample delay + conv time) * averaging num cycles: 152 + (1 + 13) * 16 = 376 clock frequency: 24MHz / 8 = 3MHz clock period: 1 / 3MHz = 333ns processing time: 376 * 333ns = 125us Regards, John > On Jul 15, 2016, at 9:31 AM, keerthana manivannan > <[email protected]> wrote: > > oh. I'm like completely new to this but curious to learn: > > 1. I have an electret mic (this one > <http://www.dbunlimitedco.com/product-detail/MO095804-1>) which I'm trying to > get signals from using a beaglebone black. So if I level shift the analog > signal outputs from the mic and read it from ADC pins like > sys/devices/platform/omap/tsc/ain1 (or whatever pin), what will that result > in? > > Thanks for responding so quickly. I really really really really appreciate > you taking time to help. > > > > On Fri, Jul 15, 2016 at 11:05 AM, John Syne <[email protected] > <mailto:[email protected]>> wrote: > @TJF, > > You do realize that audio is more than just an ADC. Think equalization, > dynamic range, etc. Also, you need streaming and that requires a lot more > code on the ARM side which isn’t necessary when you use a CODEC and the ALSA > framework. > > Regards, > John > > > > >> On Jul 15, 2016, at 7:42 AM, TJF <[email protected] >> <mailto:[email protected]>> wrote: >> >> Hi! >> >> Am Freitag, 15. Juli 2016 00:33:44 UTC+2 schrieb [email protected] >> <http://gmail.com/>: >> I'm looking to use an electret microphone with a beaglebone black for my >> project. Can't I directly plug the mic into an analog pin and use the data? >> Do I need a pre amplifier circuit kind of thing to use the mic with a BBB? >> >> The AIN pins range is 0 to 1V8. You'd need an amplifier to shift the mic >> voltage (by 0V9) and limit the output (to 0V9). But no need for any codec >> nor Audio Cape. For high speed ADC (>4kS/s) use libpruio >> <http://beagleboard.org/project/libpruio/>. >> >> BR >> >> -- >> For more options, visit http://beagleboard.org/discuss >> <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] >> <mailto:[email protected]>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/beagleboard/0526f0e2-13d9-4a5e-922f-ba24e5eb86ef%40googlegroups.com >> >> <https://groups.google.com/d/msgid/beagleboard/0526f0e2-13d9-4a5e-922f-ba24e5eb86ef%40googlegroups.com?utm_medium=email&utm_source=footer>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > > -- 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/EB37A285-22F2-4989-A47F-DBDE4E0E7A8D%40gmail.com. For more options, visit https://groups.google.com/d/optout.
