Parallel ADC
Jay Kickliter
Posts: 446
I looked and searched in the regular places but couldn't find any info. Does any one have sample PASM code for reading a parallel ADC? I know that's kind of vague, because I'm not entirely sure what I need, other than for the project I'm working needs to sample at ~44 kHz, and I'd like to keep it all in one cog if possible. I don't need many spare pins, and only about 10 bits of resolution., and 2 channels.
thanks,
Jay
thanks,
Jay
Comments
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
do I understand right 2 channels at 10 bit means 20 IO-Pins for reading in
reading-in-frequency around 44 kHz
and another question what are you doing with the values ?
how many of them do you have to store ?
I haven't read any datasheet of a parallel ADC. But I think the basic principles is to trigger a sampling through switching one PIN
from low to high or high to low and then readin the bits of the value and store them away.
in PASM
First step could be a loop toggling the sample-pin
Second step reading in a value and store it in a SPIN-variable (pointer to SPIN-var delivered to the PASM-cog via the "par" parameter
Third step experimenting with self-modifying code to change the RAM-adress to store values
combining all this to one PASM-program
So if you start with some PASM-code and come back with a detail question how do I ....
you will get help here surely
best regards
Stefan
I'll just buy one that seems the easiest to interface, and give it a go.
@Stefan, it is for a dynamic range compressor. It actually isn't my project, since I don't do recording. I'm trying help a buddy who is new to microcontrollers.
Jay
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
MOORE'S LAW: The capabilities of electronics shall double every 18 months.
cloyd's corollary: Hardware is easy, software is hard.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Typical signals would be:
One input line per bit of resolution ( 10 lines for 10 bit ADC )
One output bit to start a conversion.
One input bit to detect completion of a conversion.
One to three output bits to select the channel to convert.
For some ADC's each signal may be on a separate pin, but in most cases communication is over a data bus to address internal registers on the ADC chip. You may find a 12 bit ADC is easier to find and less expensive than a 10 bit one and the additional bits can be ignored. Also 12 bit chips at 20 million samples a second are not much more money than many of the slower chips. Never hurts to have some extra speed.
Agent420, thanks for pointing that out. I've always hear the term "anti aliasing" but never understood why it's important.
kwinn, that's about what gathered so far. I've seen some that take way more pins though, not sure what they're all for. You're right about 12 bits vs 10 bits. I never thought to just ignore some.