Hello Nils, thanks for the code. I think about including it in the libpruio examples folder, but your main loop is endless and the user cannot abort the program. (Shouldn't the file get closed?) Perhaps I can adapt it a bit.
Regarding the ADC speed I made some further testing and it seems that I mis-interpreted the TRM. The ADC subsystem can sample at least at 200 kS/s. This speed also works for multiple channels. Find an example of four channels at 44.1 kHz in this post <http://beagleboard.org/Community/Forums?place=msg%2Fbeagleboard%2F3AFiCNtxGis%2FH7q76xdk8ZQJ>. An overall sampling rate of 200 kHz was also possible (four channels). So the limiting in the current libpruio-0.2 is too much on the safe site. If you don't want to wait for the next version, you can adapt the code by yourself (FreeBASIC compiler required). Replace in file pruio_adc.bas in function PruIo.configure(...) the lines d *= (Conf->ADC_CLKDIV + 1) * 417 '417 ≈ 1000000 / 2400 (= 1 GHz / 2.4 MHz) d += 30 ' PRU cycles for restart [GHz] IF Tmr <= d THEN .Errr = @"sample rate too big" : RETURN .Errr by the following code d = (d * (Conf->ADC_CLKDIV + 1) * 1000) \ 24 IF Tmr <= d ORELSE Tmr < 5000 THEN _ .Errr = @"sample rate too big" : RETURN .Errr You may play a bit with the absolute value 5000. On my BBB the timing is OK up to a frequency of 240 kHz (4165). But this may vary from board to board. -- 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 beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.