Does anyone have examples or guidance for the following? I’m more of a software guy, just learning the hardware
I have a MAX4466 mic’s out hooked up to the CH0 on an MCP3008 ADC chip. I then plan on wiring the following to 4 GPIO pins on the BBB.
- CS (chip select)
First question is how to I grab the clock from the BBB to drive this chip?
Secondly, are there any examples on loading channel configuration data (Din)?
Any advice would be greatly appreciated and THANK YOU!!!
You didn’t say what your end goal is, so I have to guess what you are trying to do.
The CLK in question is the SPI CLK, not a sampling clock. So, should you want to use
this ADC, (and there are reasons you might not want to) You will probably be better off
using one of the two SPI interfaces, and not just any four GPIO lines.
This is not an audio ADC. This is an instrumentation ADC. The differences are that
audio codecs are usually twos-complement output, and use a sampling clock to get very
regular sampling intervals, and include the necessary input Nyquist filter as a
built-in as part of the chip.
This ADC only does one conversion when you access it and ask it with the SPI bus.
You could do some software calisthenics to call for the samples very regularly, but will
get a lot of jitter in the sampling because of the nature of (most) BBB Operating systems.
This will show up in the audio as distortion.
You could do the one-sided data to two’s complement conversion in software.
You could add a Nyquist filter in hardware between the microphone and the input
to this ADC.
So, it all depends what you are trying to do. If you want a minimum quality audio
input and an educational experience in the topics I listed above, keep going.
If you are trying to get a quality audio input for something, look at one of the
audio capes for the BBB. Or pick a real audio ADC for your hardware design.
Does anyone have examples or guidance for the following? I'm more of a
software guy, just learning the hardware
Have you consider hooking up the MAX4466 to the on board ADCs instead? Other
then having to put in some analog scaling and making sure things are the power
timing is met (use the 3V3B rail), it becomes largely a software exercise to
get things sampled without unacceptable amounts of jitter.
I have something similar rigged up with the on board ADC and it works well
enough with sphinx. Sorry, no useful code available at the moment.
OK, so I think the audio capes are the best advice at this point. What I’m doing is developing software to sample different types of sounds and do some audio fingerprinting. So I should stick to the software development and not make my life more difficult with wiring up mikes/adcs/dacs/mini-speakers
I really appreciate the education on this, though. Thanks so much for your time!