Git Product home page Git Product logo

Comments (5)

E-wallace0001 avatar E-wallace0001 commented on July 19, 2024 1

I have just had a look at the c implementation on the pi zero2 W

Firstly, there are some optimizations you can do for the SPI communications; You can request multiple bytes from the lower level librarys, instead of going back and forth asking for each byte at a time. This will gain you approx 1KHz straight off.

Secondly, the clock is set to 1MHz, changing this will get you a much higher sampling rate. The clocks are hardcoded. BCM driver needs to set a clock divider, while the wiringpi, and dev lib need to be set. My clock seems to top out at 22MHz. This can be configured in /lib/config/dev_config.c under DEV_module_init.

With the above changes, 35KHz can be achieved with wiring pi.

I was a little bit surprised that not requesting the status bytes actually slowed down the sampling rate.

I feel a better interface to the underlying libraries would be beneficial.

Hope this helps.

from high-pricision_ad_hat.

mahdiaslanimk avatar mahdiaslanimk commented on July 19, 2024

Roughly the same problem here. @ChironeX1976 did you found any solutions?

from high-pricision_ad_hat.

ChironeX1976 avatar ChironeX1976 commented on July 19, 2024

from high-pricision_ad_hat.

mahdiaslanimk avatar mahdiaslanimk commented on July 19, 2024

@ChironeX1976 Read the FAQ in this link. There you can find the reason of low sps and an example code with higher rate (in both c an python). Hope this helps.

from high-pricision_ad_hat.

brendanwallison avatar brendanwallison commented on July 19, 2024

Hello, I was looking at buying this ADC for audio as well. I have a very basic question about the 38400 SPS. If you plug in multiple microphones, would the sample rate be divided by the number of microphones, or is this a per-channel figure?

from high-pricision_ad_hat.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.